Browse Source

Publications, part 1

master
Nuša Pukšič 6 months ago committed by buttercat1791
parent
commit
9425026b52
  1. 9
      src/lib/components/publications/Publication.svelte
  2. 2
      src/lib/components/publications/PublicationHeader.svelte
  3. 2
      src/routes/publication/[type]/[identifier]/+page.svelte

9
src/lib/components/publications/Publication.svelte

@ -252,12 +252,13 @@
</script> </script>
<!-- Table of contents --> <!-- Table of contents -->
{#if publicationType !== "blog" || !isLeaf} {#if publicationType !== "blog" && !isLeaf}
<Sidebar <Sidebar
isOpen={isTocOpen} isOpen={isTocOpen}
closeSidebar={closeTocSidebar} closeSidebar={closeTocSidebar}
class="z-50 h-full pt-6 ml-4 bg-transparent sticky top-[80px]" class="z-50 max-h-[calc(100vh-170px)] ml-4 bg-transparent"
backdrop={true} position="static"
backdrop={false}
activeUrl={`#${activeAddress ?? ""}`} activeUrl={`#${activeAddress ?? ""}`}
classes={{ classes={{
div: 'bg-primary-50 dark:bg-primary-1000 border border-s-4 rounded border-primary-200 dark:border-primary-800', div: 'bg-primary-50 dark:bg-primary-1000 border border-s-4 rounded border-primary-200 dark:border-primary-800',
@ -352,7 +353,7 @@
{#if isInnerActive()} {#if isInnerActive()}
{#key currentBlog} {#key currentBlog}
<div <div
class="flex flex-col p-4 max-w-3xl overflow-auto flex-grow-2 max-h-[calc(100vh-146px)] sticky top-[146px]" class="flex flex-col p-4 max-w-3xl overflow-auto flex-grow-2 max-h-[calc(100vh-170px)] sticky"
> >
{#each leaves as leaf, i} {#each leaves as leaf, i}
{#if leaf && leaf.tagAddress() === currentBlog} {#if leaf && leaf.tagAddress() === currentBlog}

2
src/lib/components/publications/PublicationHeader.svelte

@ -49,7 +49,7 @@
</script> </script>
{#if title != null && href != null} {#if title != null && href != null}
<Card class="ArticleBox card-leather w-full relative flex flex-col sm:flex-row sm:space-x-4 overflow-hidden"> <Card class="ArticleBox card-leather w-full relative flex flex-col sm:flex-row sm:space-x-2 overflow-hidden">
<!-- Image block: full width on mobile, fixed side on md+ --> <!-- Image block: full width on mobile, fixed side on md+ -->
<div class="w-full h-48 sm:min-w-40 sm:w-40 sm:h-40 overflow-hidden flex items-center justify-center sm:rounded-l rounded-t sm:rounded-t-none"> <div class="w-full h-48 sm:min-w-40 sm:w-40 sm:h-40 overflow-hidden flex items-center justify-center sm:rounded-l rounded-t sm:rounded-t-none">
{#if image} {#if image}

2
src/routes/publication/[type]/[identifier]/+page.svelte

@ -186,7 +186,7 @@
indexEvent={indexEvent} indexEvent={indexEvent}
/> />
<div class="publication {data.publicationType} p-4 space-y-4 overflow-auto flex-grow-2 mt-[100px]"> <div class="publication flex flex-row {data.publicationType} px-4 space-y-4 overflow-auto mx-auto flex-grow-2 mt-[70px]">
<Publication <Publication
rootAddress={indexEvent.tagAddress()} rootAddress={indexEvent.tagAddress()}
publicationType={data.publicationType} publicationType={data.publicationType}

Loading…
Cancel
Save