mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 06:49:37 +02:00
Change close button design
This commit is contained in:
parent
c7959350c4
commit
14b2ba2ae3
1 changed files with 28 additions and 4 deletions
|
@ -3,7 +3,6 @@
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
let modal: HTMLDialogElement;
|
let modal: HTMLDialogElement;
|
||||||
import { appVersion, copyrightYear, versionChangelog } from '$lib/config';
|
|
||||||
import type { Adventure } from '$lib/types';
|
import type { Adventure } from '$lib/types';
|
||||||
|
|
||||||
export let image: string;
|
export let image: string;
|
||||||
|
@ -36,16 +35,41 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||||
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<dialog id="my_modal_1" class="modal" on:click={handleClickOutside}>
|
<dialog id="my_modal_1" class="modal" on:click={handleClickOutside}>
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
||||||
<div class="modal-box w-11/12 max-w-5xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
|
<div class="modal-box w-11/12 max-w-5xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
|
||||||
<div class="modal-header flex justify-between items-center mb-4">
|
<div class="modal-header flex justify-between items-center mb-4">
|
||||||
<h3 class="font-bold text-2xl">{adventure.name}</h3>
|
<h3 class="font-bold text-2xl">{adventure.name}</h3>
|
||||||
<button class="close-btn" on:click={close} aria-label="Close" style="font-size: 3rem">×</button>
|
<button class="btn btn-circle btn-neutral" on:click={close}>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="h-6 w-6"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke="currentColor"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
d="M6 18L18 6M6 6l12 12"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center items-center" style="display: flex; justify-content: center; align-items: center;">
|
<div
|
||||||
<img src={image} alt={adventure.name} style="max-width: 100%; max-height: 75vh; object-fit: contain;" />
|
class="flex justify-center items-center"
|
||||||
|
style="display: flex; justify-content: center; align-items: center;"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src={image}
|
||||||
|
alt={adventure.name}
|
||||||
|
style="max-width: 100%; max-height: 75vh; object-fit: contain;"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue