Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cornucopia.owasp.org/src/lib/components/cardBrowser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
if (browser) document.onkeydown = checkKey;
</script>
<noscript>
<div class="card-panel" id="card-face">
<div class="card-panel">
<div class="left">
<a href={cards.get(card.prevous)?.url + '/#card-face'} data-sveltekit-reload class="arrow" title="{$t('cards.cardBrowser.a1.title')}: {card.prevous}">&lt;</a>
</div>
Expand All @@ -58,7 +58,7 @@
</div>
</div>
</noscript>
<div class="card-panel script" id="card">
<div class="card-panel script">
<div class="left">
<a href={getUrl(cards.get(card.prevous))} onclick={(e)=>goToPrevious(e, card)} class="arrow" title="{$t('cards.cardBrowser.a1.title')}: {card.prevous}">&lt;</a>
</div>
Expand Down Expand Up @@ -108,7 +108,7 @@
justify-content: center;
}

@media (max-width: 1024px)
@media (max-width: 1024px)
{
.center
{
Expand Down
8 changes: 5 additions & 3 deletions cornucopia.owasp.org/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
import Footer from "$lib/components/footer.svelte";
import Metadata from "$lib/components/metadata.svelte";
import Navbar from "$lib/components/navigation/navbar.svelte";
import {updateTranslation, updateLang} from "$lib/stores/stores";
import {updateTranslation, updateLang} from "$lib/stores/stores";
interface Props {
data: Record<string, unknown>;
children?: import('svelte').Snippet;
}

let { data, children }: Props = $props();

// Initialize stores - these run on both server and client
updateTranslation(data.translation, data.fallbackTranslation);
updateLang(data.lang);

let content = $derived(data.content.get(data.lang) || data.content.get('en'));

function getFullWidthPages(path : string)
Expand Down Expand Up @@ -64,6 +64,8 @@
<div class="page">
<Navbar></Navbar>
<div class="slot-container" class:wide={getFullWidthPages($page.url.pathname)}>
<div id="card"></div>
<div id="card-face"></div>
<Breadcrumbs></Breadcrumbs>
{@render children?.()}
</div>
Expand Down
Loading