From 5a6c2bb171585da1b239a234305ff73b158b1f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nu=C5=A1a=20Puk=C5=A1i=C4=8D?= Date: Fri, 12 Sep 2025 14:28:05 +0200 Subject: [PATCH] Hide discussion and center publication --- .../publications/Publication.svelte | 37 ++++++++++--------- src/lib/stores.ts | 2 +- .../[type]/[identifier]/+page.svelte | 9 +---- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/lib/components/publications/Publication.svelte b/src/lib/components/publications/Publication.svelte index 00d1cac..f6bbacb 100644 --- a/src/lib/components/publications/Publication.svelte +++ b/src/lib/components/publications/Publication.svelte @@ -265,9 +265,7 @@ {#if publicationType !== "blog" && !isLeaf} - publicationTree.setBookmark(address)} - onLoadMore={() => { - if (!isLoading && !isDone && publicationTree) { - loadMore(4); - } - }} - /> + {#if $publicationColumnVisibility.toc} + publicationTree.setBookmark(address)} + onLoadMore={() => { + if (!isLoading && !isDone && publicationTree) { + loadMore(4); + } + }} + /> + {/if} {/if} @@ -295,7 +295,7 @@ {#if $publicationColumnVisibility.main} -
+
@@ -371,9 +371,10 @@ {#if $publicationColumnVisibility.discussion} diff --git a/src/lib/stores.ts b/src/lib/stores.ts index 2b6bd13..3cefe7c 100644 --- a/src/lib/stores.ts +++ b/src/lib/stores.ts @@ -21,7 +21,7 @@ const defaultVisibility: PublicationLayoutVisibility = { blog: true, main: true, inner: false, - discussion: true, + discussion: false, editing: false, }; diff --git a/src/routes/publication/[type]/[identifier]/+page.svelte b/src/routes/publication/[type]/[identifier]/+page.svelte index e7bedd9..abad926 100644 --- a/src/routes/publication/[type]/[identifier]/+page.svelte +++ b/src/routes/publication/[type]/[identifier]/+page.svelte @@ -3,7 +3,6 @@ import type { PageProps } from "./$types"; import { onDestroy, onMount, setContext } from "svelte"; import Processor from "asciidoctor"; - import ArticleNav from "$components/util/ArticleNav.svelte"; import { SveltePublicationTree } from "$lib/components/publications/svelte_publication_tree.svelte"; import { TableOfContents } from "$lib/components/publications/table_of_contents.svelte"; import { page } from "$app/state"; @@ -180,12 +179,6 @@ {#if indexEvent && publicationTree && toc} {@const debugInfo = `indexEvent: ${!!indexEvent}, publicationTree: ${!!publicationTree}, toc: ${!!toc}`} {@const debugElement = console.debug('[Publication] Rendering publication with:', debugInfo)} - - Loading publication...

-{/if} \ No newline at end of file +{/if}