Hide delete button if new entry, reshow image styling
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<style>
|
||||
@import 'tailwindcss';
|
||||
|
||||
/*#img-upload-button {
|
||||
#img-upload-button {
|
||||
@apply text-center bg-white/30 h-60 w-full rounded-2xl block hover:text-white/30 transition-all;
|
||||
}*/
|
||||
}
|
||||
</style>
|
||||
@@ -42,15 +42,19 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row mb-2">
|
||||
<p class="text-3xl font-bold">{entry ? formatDate(entry.date) : formatDate(newEntryDate)}</p>
|
||||
<p class="text-3xl font-bold mr-auto">{entry ? formatDate(entry.date) : formatDate(newEntryDate)}</p>
|
||||
|
||||
{#if edit}
|
||||
<button
|
||||
class="bg-red-500 px-3 rounded-lg ml-auto"
|
||||
onclick={deleteEntry}
|
||||
>
|
||||
delete
|
||||
</button>
|
||||
|
||||
{#if !isNewEntry}
|
||||
<button
|
||||
class="bg-red-500 px-3 rounded-lg"
|
||||
onclick={deleteEntry}
|
||||
>
|
||||
delete
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<button
|
||||
class="bg-white/10 px-3 rounded-lg ml-1"
|
||||
onclick={() => edit = false}
|
||||
|
||||
Reference in New Issue
Block a user