+ by {byline(rootId, index)} +
++ {publishedAt(rootId, index)} +
+{/snippet} + {#snippet contentParagraph(content: string, publicationType: string)} {#if publicationType === 'novel'}{@html content}
+ {:else if publicationType === 'blog'} ++ {@html content} +
{:else}
{@html content}
@@ -222,25 +293,33 @@
{:else}
- {@render sectionHeading(title!, depth)}
+ {#if !(publicationType === 'blog' && depth === 1)}
+ {@render sectionHeading(title!, depth)}
+ {/if}
{/if}
- {#key subtreeUpdateCount}
- {#each orderedChildren as id, index}
-
+ You've reached the end of the publication. +
+ {/if} +You've reached the end of the publication.
- {/if} -{summary}
+Can't like, zap or highlight yet.
+You should totally check out the discussion though.
+(This ToC is only for demo purposes, and is not fully-functional.)
+ {#each tocItems as item} +Pardon our dust! The publication view is currently using an experimental loader, and may be unstable.
-New to Alexandria? Check out our Getting Started guide to learn more about using the library.
- -Each content section (30041 or 30818) is also a level in the table of contents, which can be accessed from the floating icon top-left in the - reading view. This allows for navigation within the publication. (This - functionality has been temporarily disabled.) + reading view. This allows for navigation within the publication. + Publications of type "blog" have a ToC which emphasizes that each entry + is a blog post. + + (This functionality has been temporarily disabled, but the TOC is visible.)
diff --git a/src/styles/base.css b/src/styles/base.css
index bd6213e..e655206 100644
--- a/src/styles/base.css
+++ b/src/styles/base.css
@@ -1,3 +1,9 @@
@tailwind base;
@tailwind components;
-@tailwind utilities;
\ No newline at end of file
+@tailwind utilities;
+
+@layer components {
+ body {
+ @apply bg-primary-0 dark:bg-primary-1000;
+ }
+}
\ No newline at end of file
diff --git a/src/styles/publications.css b/src/styles/publications.css
index 17adefc..f5c643c 100644
--- a/src/styles/publications.css
+++ b/src/styles/publications.css
@@ -1,55 +1,55 @@
@layer components {
/* AsciiDoc content */
- .note-leather p a {
+ .publication-leather p a {
@apply underline hover:text-primary-500 dark:hover:text-primary-400;
}
- .note-leather section p {
+ .publication-leather section p {
@apply w-full;
}
- .note-leather section p table {
+ .publication-leather section p table {
@apply w-full table-fixed space-x-2 space-y-2;
}
- .note-leather section p table td {
+ .publication-leather section p table td {
@apply p-2;
}
- .note-leather section p table td .content:has(> .imageblock) {
+ .publication-leather section p table td .content:has(> .imageblock) {
@apply flex flex-col items-center;
}
- .note-leather .imageblock {
+ .publication-leather .imageblock {
@apply flex flex-col space-y-2;
}
- .note-leather .imageblock .content {
+ .publication-leather .imageblock .content {
@apply flex justify-center;
}
- .note-leather .imageblock .title {
+ .publication-leather .imageblock .title {
@apply text-center;
}
- .note-leather .imageblock.left .content {
+ .publication-leather .imageblock.left .content {
@apply justify-start;
}
- .note-leather .imageblock.left .title {
+ .publication-leather .imageblock.left .title {
@apply text-left;
}
- .note-leather .imageblock.right .content {
+ .publication-leather .imageblock.right .content {
@apply justify-end;
}
- .note-leather .imageblock.right .title {
+ .publication-leather .imageblock.right .title {
@apply text-right;
}
- .note-leather section p table td .literalblock {
+ .publication-leather section p table td .literalblock {
@apply my-2 p-2 border rounded border-gray-400 dark:border-gray-600;
}
- .note-leather .literalblock pre {
+ .publication-leather .literalblock pre {
@apply p-3 text-wrap break-words;
}
@@ -58,7 +58,7 @@
}
/* lists */
- .note-leather .ulist ul {
+ .publication-leather .ulist ul {
@apply space-y-1 list-disc list-inside;
}
@@ -104,7 +104,7 @@
}
.publication-leather .verseblock pre.content {
- @apply text-base font-sans;
+ @apply text-base font-sans overflow-x-scroll py-1;
}
.publication-leather .attribution {
@@ -234,6 +234,34 @@
@apply w-full;
}
+ .coverImage {
+ @apply max-h-[230px] overflow-hidden;
+ }
+
+ .coverImage.depth-0 {
+ @apply max-h-[460px] overflow-hidden;
+ }
+
+ .coverImage img {
+ @apply object-contain w-full;
+ }
+
+ .coverImage.depth-0 img {
+ @apply m-auto w-auto;
+ }
+
+ /** blog */
+ @screen lg {
+ @media (hover: hover) {
+ .blog .discreet .card-leather:not(:hover) {
+ @apply bg-primary-50 dark:bg-primary-1000 opacity-75 transition duration-500 ease-in-out ;
+ }
+ .blog .discreet .group {
+ @apply bg-transparent;
+ }
+ }
+ }
+
/* Discrete headers */
h3.discrete,
h4.discrete,
diff --git a/src/styles/scrollbar.css b/src/styles/scrollbar.css
new file mode 100644
index 0000000..8d2735d
--- /dev/null
+++ b/src/styles/scrollbar.css
@@ -0,0 +1,20 @@
+@layer components {
+ /* Global scrollbar styles */
+ * {
+ scrollbar-color: rgba(87, 66, 41, 0.8) transparent; /* Transparent track, default scrollbar thumb */
+ }
+
+ /* Webkit Browsers (Chrome, Safari, Edge) */
+ *::-webkit-scrollbar {
+ width: 12px; /* Thin scrollbar */
+ }
+
+ *::-webkit-scrollbar-track {
+ background: transparent; /* Fully transparent track */
+ }
+
+ *::-webkit-scrollbar-thumb {
+ @apply bg-primary-500 dark:bg-primary-600 hover:bg-primary-600 dark:hover:bg-primary-800;;
+ border-radius: 6px; /* Rounded scrollbar */
+ }
+}
\ No newline at end of file
diff --git a/static/screenshots/ToC_blog.png b/static/screenshots/ToC_blog.png
new file mode 100644
index 0000000..8e1c6e9
Binary files /dev/null and b/static/screenshots/ToC_blog.png differ
diff --git a/static/screenshots/ToC_normal.png b/static/screenshots/ToC_normal.png
new file mode 100644
index 0000000..297a503
Binary files /dev/null and b/static/screenshots/ToC_normal.png differ
diff --git a/tailwind.config.cjs b/tailwind.config.cjs
index 5ca08f6..e28c2eb 100644
--- a/tailwind.config.cjs
+++ b/tailwind.config.cjs
@@ -22,11 +22,11 @@ const config = {
400: '#ad8351',
500: '#c6a885',
600: '#795c39',
- 700: '#574229',
- 800: '#342718',
- 900: '#231a10',
- 950: '#17110A',
- 1000: '#110d08',
+ 700: '#564a3e',
+ 800: '#3c352c',
+ 900: '#2a241c',
+ 950: '#1d1812',
+ 1000: '#15110d',
},
success: {
50: '#e3f2e7',
@@ -80,6 +80,14 @@ const config = {
listStyleType: {
'upper-alpha': 'upper-alpha', // Uppercase letters
'lower-alpha': 'lower-alpha', // Lowercase letters
+ },
+ flexGrow: {
+ '1': '1',
+ '2': '2',
+ '3': '3',
+ },
+ hueRotate: {
+ 20: '20deg',
}
},
},