diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index c9ce3e3..09bb269 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -34,6 +34,25 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified border-radius: 20px; cursor: pointer; display: inline-block; + text-decoration: none; + color: inherit; +} +.card-main-link { + position: absolute; + inset: 0; + z-index: 1; + text-decoration: none; +} +.card-main-link .visually-hidden { + position: absolute; + width: 1px; + height: 1px; + margin: -1px; + padding: 0; + overflow: hidden; + clip: rect(0,0,0,0); + white-space: nowrap; + border: 0; } .card{ --card-width: 300px; @@ -73,7 +92,8 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified font-size: 1.5em; box-shadow: 0em 0em 1em 0.1em rgba(0, 0, 0, 0.6); transition: 100ms; - z-index: 5; + z-index: 10; + text-decoration: none; } #image{ width: 300px; @@ -148,7 +168,7 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified } .tag{ cursor: pointer; - text-decoration: unset; + text-decoration: none; background-color: var(--nord4); color: var(--nord0); border-radius: 100px; @@ -158,6 +178,9 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified transition: 100ms; box-shadow: 0em 0em 0.2em 0.05em rgba(0, 0, 0, 0.3); border: none; + position: relative; + z-index: 10; + display: inline-block; } .tag:hover, .tag:focus-visible @@ -184,6 +207,8 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified transition: 100ms; border: none; cursor: pointer; + z-index: 10; + display: inline-block; } .card_title .category:hover, .card_title .category:focus-within @@ -226,8 +251,11 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified } -
window.location.href = `/rezepte/${recipe.short_name}`}> +
+ + View recipe: {recipe.name} +