opengist/templates/pages/create.html

88 lines
7.2 KiB
HTML
Raw Normal View History

2023-03-14 15:22:52 +00:00
{{ template "header" .}}
<div class="py-10">
<header>
2023-05-27 11:58:08 +00:00
<h1 class="text-2xl font-bold leading-tight text-slate-700 dark:text-slate-300">
2023-03-14 15:22:52 +00:00
New Gist
</h1>
</header>
<main class="mt-4">
<form id="create" class="space-y-4" method="post" action="/">
<div class="grid grid-cols-12 gap-x-4">
2023-04-07 22:21:22 +00:00
<div class="col-span-8 sm:col-span-4">
2023-03-14 15:22:52 +00:00
<div class="mt-1">
2023-05-27 11:58:08 +00:00
<input type="text" placeholder="Title" name="title" id="title" class="bg-white dark:bg-black shadow-sm focus:ring-primary-500 focus:border-primary-500 block w-full sm:text-sm border-gray-200 dark:border-gray-700 rounded-md">
2023-03-14 15:22:52 +00:00
</div>
</div>
2023-04-07 22:21:22 +00:00
<div class="col-span-12 sm:col-span-8">
2023-03-14 15:22:52 +00:00
<div class="mt-1">
2023-05-27 11:58:08 +00:00
<input type="text" placeholder="Description" name="description" id="description" class="bg-white dark:bg-black shadow-sm focus:ring-primary-500 focus:border-primary-500 block w-full sm:text-sm border-gray-200 dark:border-gray-700 rounded-md">
2023-03-14 15:22:52 +00:00
</div>
</div>
</div>
<div id="editors" class="space-y-4">
2023-05-27 11:58:08 +00:00
<div class="rounded-md border border-1 border-gray-200 dark:border-gray-700 editor">
<div class="border-b-1 border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 my-auto flex">
2023-03-14 15:22:52 +00:00
<p class="mx-2 my-2 inline-flex">
2023-05-27 11:58:08 +00:00
<input type="text" name="name" placeholder="Filename with extension" style="line-height: 0.05em" class="form-filename bg-white dark:bg-gray-900 shadow-sm focus:ring-primary-500 focus:border-primary-500 block w-full sm:text-sm border-gray-200 dark:border-gray-700 rounded-md">
2023-03-14 15:22:52 +00:00
</p>
2023-04-07 22:21:22 +00:00
<div class="hidden mx-2 my-2 sm:inline-flex ml-auto space-x-2">
2023-05-27 11:58:08 +00:00
<select class="editor-indent-type whitespace-nowrap text-slate-700 dark:text-slate-300 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-900 pr-8 text-xs font-medium shadow-sm hover:bg-gray-200 dark:hover:bg-gray-700 hover:border-gray-500 hover:text-slate-700 dark:hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500">
<optgroup label="Indent mode">
<option value="space">Space</option>
<option value="tab">Tabs</option>
</optgroup>
</select>
2023-05-27 11:58:08 +00:00
<select class="editor-indent-size whitespace-nowrap text-slate-700 dark:text-slate-300 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-900 pr-8 text-xs font-medium shadow-sm hover:bg-gray-200 dark:hover:bg-gray-700 hover:border-gray-500 hover:text-slate-700 dark:hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500">
<optgroup label="Indent size">
<option value="2">2</option>
<option value="4">4</option>
<option value="8">8</option>
</optgroup>
</select>
2023-05-27 11:58:08 +00:00
<select class="editor-wrap-mode whitespace-nowrap text-slate-700 dark:text-slate-300 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-900 pr-8 text-xs font-medium shadow-sm hover:bg-gray-200 dark:hover:bg-gray-700 hover:border-gray-500 hover:text-slate-700 dark:hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500">
<optgroup label="Wrap mode">
<option value="no">No wrap</option>
<option value="soft">Soft wrap</option>
</optgroup>
</select>
</div>
2023-03-14 15:22:52 +00:00
</div>
<input type="hidden" value="" name="content" class="form-filecontent">
</div>
</div>
<div class="flex">
2023-05-27 11:58:08 +00:00
<button type="button" id="add-file" class="inline-flex items-center px-4 py-2 border border-transparent border-gray-200 dark:border-gray-700 text-sm font-medium rounded-md shadow-sm text-gray-700 dark:text-white bg-gray-100 dark:bg-gray-600 hover:bg-gray-200 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500">Add file</button>
<div class="ml-auto inline-flex ">
<button id="submit-gist" type="submit" name="private" value="0" class="ml-2 items-center px-4 py-2 border border-transparent border-primary-200 dark:border-primary-700 text-sm font-medium rounded-l-md shadow-sm text-white dark:text-white bg-primary-500 hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 z-20">Create public gist</button>
<div class="relative -ml-px block">
<button type="button" class="relative inline-flex items-center rounded-r-md bg-primary-500 hover:bg-primary-600 px-2 py-2 text-gray-400 border border-transparent border-primary-200 dark:border-primary-700 focus:z-10" id="gist-visibility-menu-button">
<span class="sr-only">Open options</span>
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="white" aria-hidden="true">
<path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd" />
</svg>
</button>
<div id="gist-menu-visibility" class="hidden absolute right-0 z-10 mt-2 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="gist-visibility-menu-button">
<div class="rounded-md dark:bg-gray-800 bg-white shadow-lg ring-1 ring-gray-50 dark:ring-gray-700 focus:outline-none" role="none">
<span class="text-gray-700 block px-4 py-2 text-sm cursor-pointer dark:text-slate-300 hover:text-slate-500 dark:hover:text-slate-400 gist-visibility-option" data-visibility="0" role="menuitem">Public</span>
<span class="text-gray-700 block px-4 py-2 text-sm cursor-pointer dark:text-slate-300 hover:text-slate-500 dark:hover:text-slate-400 gist-visibility-option" data-visibility="1" role="menuitem">Unlisted</span>
<span class="text-gray-700 block px-4 py-2 text-sm cursor-pointer dark:text-slate-300 hover:text-slate-500 dark:hover:text-slate-400 gist-visibility-option" data-visibility="2" role="menuitem">Private</span>
</div>
</div>
</div>
</div>
2023-03-14 15:22:52 +00:00
</div>
{{ .csrfHtml }}
</form>
</main>
</div>
2023-04-03 21:37:54 +00:00
<script type="module" src="{{ asset "editor.ts" }}"></script>
2023-03-14 15:22:52 +00:00
{{ template "footer" .}}