This commit is contained in:
Thomas Miceli 2023-04-10 21:43:18 +02:00
parent 8cfeab6dbc
commit 2e92b997fd
No known key found for this signature in database
GPG Key ID: D86C6F6390AF050F
3 changed files with 4 additions and 2 deletions

View File

@ -44,6 +44,7 @@
<div class="flex space-x-4">
<a href="/all" class="text-slate-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium" aria-current="page">All</a>
{{ if .userLogged }}
<a href="/" class="text-slate-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">New</a>
<a href="/{{ .userLogged.Username }}" class="text-slate-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">My gists</a>
{{ end }}
</div>
@ -85,6 +86,7 @@
<div class="px-2 pt-2 pb-3 space-y-1">
<a href="/all" class="bg-gray-900 text-white block px-3 py-2 rounded-md text-base font-medium" aria-current="page">All</a>
{{ if .userLogged }}
<a href="/" class="text-slate-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">New</a>
<a href="/{{ .userLogged.Username }}" class="text-slate-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">My gists</a>
<a href="/settings" class="text-slate-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Settings</a>

View File

@ -29,7 +29,7 @@
</a>
</form>
{{ if ne .userLogged.ID .gist.User.ID }}
<form id="fork" class="ml-2 hidden md:flex items-center " method="post" action="/{{ .gist.User.Username }}/{{ .gist.Uuid }}/fork">
<form id="fork" class="ml-2 flex items-center " method="post" action="/{{ .gist.User.Username }}/{{ .gist.Uuid }}/fork">
{{ .csrfHtml }}
<button type="submit" class="ml-auto focus-within:z-10 text-slate-300 relative inline-flex items-center space-x-2 rounded-l-md border border-gray-600 bg-gray-800 px-2 py-1.5 text-xs font-medium text-slate-300 hover:bg-gray-700 hover:border-gray-500 hover:text-slate-300 focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500 leading-3">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 mr-2">

View File

@ -28,7 +28,7 @@
<td class="whitespace-nowrap px-2 py-2 text-sm text-slate-300">{{ $gist.NbLikes }}</td>
<td class="whitespace-nowrap px-2 py-2 text-sm text-slate-300"><span class="moment-timestamp-date">{{ $gist.CreatedAt }}</span></td>
<td class="relative whitespace-nowrap py-2 pl-3 pr-4 text-right text-sm font-medium sm:pr-0">
<form action="/admin/gists/{{ $gist.ID }}/delete" method="POST" onsubmit="return confirm('Do you want to delete this user ?')">
<form action="/admin/gists/{{ $gist.ID }}/delete" method="POST" onsubmit="return confirm('Do you want to delete this gist ?')">
{{ $.csrfHtml }}
<button type="submit" class="text-rose-500 hover:text-rose-600">Delete</button>
</form>