mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-20 08:48:00 +02:00
Add topics for Gists (#413)
This commit is contained in:
4
templates/pages/all.html
vendored
4
templates/pages/all.html
vendored
@ -18,6 +18,8 @@
|
||||
<h1 class="text-2xl font-bold leading-tight">{{ .locale.Tr "gist.list.all" }}</h1>
|
||||
{{ else if eq .mode "search" }}
|
||||
<h1 class="text-2xl font-bold leading-tight">{{ .locale.Tr "gist.list.search-results" }}</h1>
|
||||
{{ else if eq .mode "topics" }}
|
||||
<h1 class="text-2xl font-bold leading-tight">{{ .locale.Tr "gist.list.topic-results" }} <span class="items-center px-2 py-0.5 rounded bg-primary-200 text-primary-900 hover:bg-primary-300 dark:bg-primary-950 dark:text-primary-200 dark:hover:bg-primary-900">{{ .topic }}</span></h1>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
@ -58,7 +60,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ if and (ne .mode "all") (ne .mode "search") }}
|
||||
{{ if and (ne .mode "all") (ne .mode "search") (ne .mode "topics") }}
|
||||
<div class="mt-4">
|
||||
<div class="sm:hidden">
|
||||
<label for="tabs" class="sr-only">{{ .locale.Tr "gist.list.select-tab" }}</label>
|
||||
|
4
templates/pages/create.html
vendored
4
templates/pages/create.html
vendored
@ -25,6 +25,10 @@
|
||||
<div class="col-span-6 sm:col-span-3 mt-2">
|
||||
<input type="text" placeholder="{{ .locale.Tr "gist.new.url" }}" name="url" id="url" 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" maxlength="32">
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 sm:col-span-9 mt-2">
|
||||
<input type="text" placeholder="{{ .locale.Tr "gist.new.topics" }}" name="topics" id="topics" 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">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editors" class="space-y-4">
|
||||
|
3
templates/pages/edit.html
vendored
3
templates/pages/edit.html
vendored
@ -58,6 +58,9 @@
|
||||
<div class="col-span-6 sm:col-span-3 mt-2">
|
||||
<input type="text" value="{{ .gist.URL }}" placeholder="{{ .locale.Tr "gist.new.url" }}" name="url" id="url" 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" maxlength="32">
|
||||
</div>
|
||||
<div class="col-span-12 sm:col-span-9 mt-2">
|
||||
<input type="text" value="{{ topicsToStr .gist.Topics }}" placeholder="{{ .locale.Tr "gist.new.topics" }}" name="topics" id="topics" 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">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editors" class="space-y-4">
|
||||
|
Reference in New Issue
Block a user