mirror of
https://github.com/LukeHagar/OpenAPI.gg.git
synced 2025-12-06 04:20:29 +00:00
Adjusted styling
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form
|
<form
|
||||||
class="container mx-auto border-token rounded-container-token bg-surface-backdrop-token px-6 py-4 space-y-4"
|
class="container mx-auto border-token rounded-container-token bg-surface-backdrop-token px-6 py-4 min-h-20 space-y-4"
|
||||||
>
|
>
|
||||||
{#each $openApiStore.security as schema, index}
|
{#each $openApiStore.security as schema, index}
|
||||||
<div class="card w-full p-4">
|
<div class="card w-full p-4">
|
||||||
@@ -68,14 +68,14 @@
|
|||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<span class="flex justify-center items-center gap-2 max-w-sm mx-auto">
|
<span class="flex justify-center items-center gap-2 max-w-sm mx-auto">
|
||||||
<select name="security-schema" bind:value={selectedSchema} class="input w-fit">
|
<select name="security-schema" bind:value={selectedSchema} class="input w-fit text-sm">
|
||||||
<option value="basicAuth" selected>Basic Auth</option>
|
<option value="basicAuth" selected>Basic Auth</option>
|
||||||
<option value="bearerAuth">Bearer Auth</option>
|
<option value="bearerAuth">Bearer Auth</option>
|
||||||
<option value="ApiKeyAuth">API Key Auth</option>
|
<option value="ApiKeyAuth">API Key Auth</option>
|
||||||
<option value="openId">OpenID</option>
|
<option value="openId">OpenID</option>
|
||||||
<option value="oAuthSample">OAuth2</option>
|
<option value="oAuthSample">OAuth2</option>
|
||||||
</select>
|
</select>
|
||||||
<button type="button" class="btn variant-filled-primary" on:click={addSecuritySchema}>
|
<button type="button" class="btn text-sm variant-filled-primary" on:click={addSecuritySchema}>
|
||||||
Add Security Schema
|
Add Security Schema
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
import { openApiStore } from '$lib';
|
import { openApiStore } from '$lib';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form class="container mx-auto card px-6 py-4 space-y-4">
|
<form
|
||||||
<label class="text-xl space-y-2">
|
class="container mx-auto border-token rounded-container-token bg-surface-backdrop-token px-6 py-4 space-y-2"
|
||||||
<span>Title (required)</span>
|
>
|
||||||
|
<label class=" space-y-1">
|
||||||
|
<span class="text-sm">Title (required)</span>
|
||||||
<input
|
<input
|
||||||
class="input"
|
class="input text-sm"
|
||||||
name="title"
|
name="title"
|
||||||
placeholder="Sample API"
|
placeholder="Sample API"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -16,8 +18,8 @@
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class="text-xl space-y-2">
|
<label class=" space-y-1">
|
||||||
<span> Description (optional) </span>
|
<span class="text-sm"> Description (optional) </span>
|
||||||
<textarea
|
<textarea
|
||||||
class="textarea"
|
class="textarea"
|
||||||
name="description"
|
name="description"
|
||||||
@@ -25,10 +27,10 @@
|
|||||||
bind:value={$openApiStore.info.description}
|
bind:value={$openApiStore.info.description}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class="text-xl space-y-2">
|
<label class=" space-y-1">
|
||||||
<span>Version (required)</span>
|
<span class="text-sm">Version (required)</span>
|
||||||
<input
|
<input
|
||||||
class="input"
|
class="input text-sm"
|
||||||
name="version"
|
name="version"
|
||||||
placeholder="0.1.0"
|
placeholder="0.1.0"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -36,42 +38,42 @@
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class="text-xl space-y-2">
|
<label class=" space-y-1">
|
||||||
<span>Terms of Service (optional)</span>
|
<span class="text-sm">Terms of Service (optional)</span>
|
||||||
<input
|
<input
|
||||||
class="input"
|
class="input text-sm"
|
||||||
name="termsOfService"
|
name="termsOfService"
|
||||||
placeholder="https://example.com/terms"
|
placeholder="https://example.com/terms"
|
||||||
type="url"
|
type="url"
|
||||||
bind:value={$openApiStore.info.termsOfService}
|
bind:value={$openApiStore.info.termsOfService}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<div class="border-token rounded-container-token space-y-4 p-4">
|
<div class="border-token rounded-container-token space-y-2 p-4">
|
||||||
<h4 class="h4">Contact Information</h4>
|
<h4 class="h4">Contact Information</h4>
|
||||||
<label class="text-xl space-y-2">
|
<label class=" space-y-1">
|
||||||
<span>Name (optional)</span>
|
<span class="text-sm">Name (optional)</span>
|
||||||
<input
|
<input
|
||||||
class="input"
|
class="input text-sm"
|
||||||
name="contactName"
|
name="contactName"
|
||||||
placeholder="John Doe"
|
placeholder="John Doe"
|
||||||
type="text"
|
type="text"
|
||||||
bind:value={$openApiStore.info.contact.name}
|
bind:value={$openApiStore.info.contact.name}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class="text-xl space-y-2">
|
<label class=" space-y-1">
|
||||||
<span>Email (optional)</span>
|
<span class="text-sm">Email (optional)</span>
|
||||||
<input
|
<input
|
||||||
class="input"
|
class="input text-sm"
|
||||||
name="contactEmail"
|
name="contactEmail"
|
||||||
placeholder="email@example.com"
|
placeholder="email@example.com"
|
||||||
type="email"
|
type="email"
|
||||||
bind:value={$openApiStore.info.contact.email}
|
bind:value={$openApiStore.info.contact.email}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class="text-xl space-y-2">
|
<label class=" space-y-1">
|
||||||
<span>URL (optional)</span>
|
<span class="text-sm">URL (optional)</span>
|
||||||
<input
|
<input
|
||||||
class="input"
|
class="input text-sm"
|
||||||
name="contactUrl"
|
name="contactUrl"
|
||||||
placeholder="https://example.com"
|
placeholder="https://example.com"
|
||||||
type="url"
|
type="url"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { openApiStore, pathRegex, sortPathsAlphabetically } from '$lib';
|
import { openApiStore, pathRegex, sortPathsAlphabetically } from '$lib';
|
||||||
import { pathTemplate } from '$lib/pathTemplate';
|
import { pathTemplate } from '$lib/pathTemplate';
|
||||||
import PathListItem from '../atoms/PathListItem.svelte';
|
import PathListItem from '../atoms/PathListItem.svelte';
|
||||||
import AddPathButtons from '../atoms/AddPathButtons.svelte';
|
import PathButtons from '../atoms/PathButtons.svelte';
|
||||||
import { getModalStore } from '@skeletonlabs/skeleton';
|
import { getModalStore } from '@skeletonlabs/skeleton';
|
||||||
|
|
||||||
const modalStore = getModalStore();
|
const modalStore = getModalStore();
|
||||||
@@ -43,17 +43,17 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="container mx-auto border-token rounded-container-token bg-surface-backdrop-token px-6 py-4 space-y-3"
|
class="container mx-auto border-token rounded-container-token bg-surface-backdrop-token px-6 py-4 min-h-20 space-y-3"
|
||||||
>
|
>
|
||||||
{#if Object.keys($openApiStore.paths).length > 0}
|
{#if Object.keys($openApiStore.paths).length > 0}
|
||||||
<AddPathButtons />
|
<PathButtons />
|
||||||
<hr />
|
<hr />
|
||||||
{#each Object.keys($openApiStore.paths) as pathName, index}
|
{#each Object.keys($openApiStore.paths) as pathName, index}
|
||||||
<PathListItem {pathName} id={index} />
|
<PathListItem {pathName} id={index} />
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<AddPathButtons />
|
<PathButtons />
|
||||||
{:else}
|
{:else}
|
||||||
<AddPathButtons justify="justify-center" sort={false} />
|
<PathButtons justify="justify-center" sort={false} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form class="container mx-auto card px-6 py-4 space-y-6">
|
<form
|
||||||
|
class="container mx-auto border-token rounded-container-token bg-surface-backdrop-token px-6 py-4 min-h-20 space-y-6"
|
||||||
|
>
|
||||||
<!-- If openApiStore.servers isnt an array show add button -->
|
<!-- If openApiStore.servers isnt an array show add button -->
|
||||||
{#if Array.isArray($openApiStore.servers)}
|
{#if Array.isArray($openApiStore.servers)}
|
||||||
<ul class="list space-y-6">
|
<ul class="list space-y-6">
|
||||||
@@ -46,13 +48,13 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
<span class="flex justify-center" class:!mt-0={$openApiStore.servers.length === 0}>
|
<span class="flex justify-center" class:!mt-0={$openApiStore.servers.length === 0}>
|
||||||
<button type="button" class="btn variant-filled-primary" on:click={addServer}>
|
<button type="button" class="btn text-sm variant-filled-primary" on:click={addServer}>
|
||||||
Add Server
|
Add Server
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="flex justify-center mt-0">
|
<span class="flex justify-center mt-0">
|
||||||
<button type="button" class="btn variant-filled-primary" on:click={addServer}>
|
<button type="button" class="btn text-sm variant-filled-primary" on:click={addServer}>
|
||||||
Add Server
|
Add Server
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user