π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
feat(themes): add the Academic document theme (#633)
Dipak Chaudhari0612e4334ff4
diff --git a/frontend/app/helpers/constants.ts b/frontend/app/helpers/constants.tsindex b32eea54..78337f48 100644--- a/frontend/app/helpers/constants.ts+++ b/frontend/app/helpers/constants.ts@@ -12,6 +12,7 @@ export const DOCUMENT_THEMES = [{ label: 'Latex style', id: 'latex' },{ label: 'Latex colored', id: 'latex-colored' },{ label: 'Modern', id: 'modern' },+ { label: 'Academic', id: 'academic' },];// Document visibility options (1 = Private, 3 = Published)diff --git a/frontend/app/styles/features/document-theme.scss b/frontend/app/styles/features/document-theme.scssindex 9316eee7..ebc90122 100644--- a/frontend/app/styles/features/document-theme.scss+++ b/frontend/app/styles/features/document-theme.scss@@ -432,4 +432,224 @@font-size: 14px;}}-}\ No newline at end of file+}++// Academic β for research papers, theses and scientific writing. Serif body at+// a comfortable reading measure, numbered headings, tighter leading than Modern,+// and figure/table captions that read as part of the document rather than UI.+.academic-theme {+ max-width: 100%;+ padding: 0 0.5rem;+ font-family: 'Libertinus Serif', 'LMRoman10', Georgia, serif !important;+ font-size: 17px;+ line-height: 1.65;+ color: var(--text-body);+ text-align: justify;++ // Automatic section numbering, the way a paper is structured. Counters are+ // reset on the container so every document numbers from 1.+ counter-reset: section;+ hyphens: auto;++ .header-anchor {+ display: none;+ }++ h1 {+ margin: 0 0 1.5rem;+ font-size: 1.9em;+ font-weight: 700;+ line-height: 1.25;+ text-align: center;+ }++ h2 {+ margin: 2rem 0 0.75rem;+ font-size: 1.35em;+ font-weight: 700;+ counter-reset: subsection;++ &::before {+ content: counter(section) '. ';+ counter-increment: section;+ }+ }++ h3 {+ margin: 1.25rem 0 0.5rem;+ font-size: 1.12em;+ font-weight: 600;++ &::before {+ content: counter(section) '.' counter(subsection) '. ';+ counter-increment: subsection;+ }+ }++ h4 {+ margin: 1rem 0 0.5rem;+ font-size: 1em;+ font-weight: 600;+ font-style: italic;+ }++ p {+ width: 100%;+ margin: 0;+ padding: 0.35em 0;+ }++ // Indent successive paragraphs instead of spacing them out β the typographic+ // convention in printed papers.+ p + p {+ text-indent: 1.5em;+ }++ a {+ color: var(--primary);+ text-decoration: none;++ &:hover {+ text-decoration: underline;+ }+ }++ code,+ pre {+ font-family: $font-mono;+ font-size: 0.88em;+ color: var(--text-body);+ }++ pre {+ padding: 0.75rem 1rem;+ border: 1px solid var(--border-color);+ border-radius: var(--radius-sm);+ text-align: left;+ hyphens: none;+ overflow-x: auto;+ }++ blockquote {+ margin: 1.25rem 2rem;+ padding: 0;+ border: none;+ font-size: 0.95em;+ font-style: italic;+ color: var(--text-muted);+ }++ ul,+ ol {+ margin: 0.5em 0;+ padding-left: 1.75rem;+ text-align: left;++ li {+ margin: 0.25em 0;+ }+ }++ img {+ display: block;+ max-width: 100%;+ margin: 1.5rem auto 0.5rem;+ }++ // Figure and table captions: small, centred, numbered.+ figure {+ margin: 1.5rem 0;++ figcaption {+ margin-top: 0.5rem;+ font-size: 0.85em;+ color: var(--text-muted);+ text-align: center;+ }+ }++ table {+ width: 100%;+ margin: 1.5em 0;+ font-size: 0.92em;+ text-align: left;+ border-collapse: collapse;++ // Booktabs-style rules: horizontal only, no vertical lines.+ th,+ td {+ padding: 0.45em 0.6em;+ border: none;+ border-bottom: 1px solid var(--border-color);+ }++ thead th {+ border-top: 2px solid var(--text-body);+ border-bottom: 1px solid var(--text-body);+ font-weight: 700;+ }++ tbody tr:last-child td {+ border-bottom: 2px solid var(--text-body);+ }+ }++ .custom-block {+ margin: 1.25rem 0;+ padding: 0.75rem 1rem;+ border-left: 3px solid var(--grey);+ border-radius: 0;+ font-size: 0.95em;+ text-align: left;+ background-color: var(--surface-raised);++ &.info,+ &.blue {+ border-left-color: var(--blue);+ }++ &.success,+ &.green {+ border-left-color: var(--green);+ }++ &.warning,+ &.yellow {+ border-left-color: var(--yellow);+ }++ &.danger,+ &.red {+ border-left-color: var(--red);+ }++ &.teal {+ border-left-color: var(--teal);+ }++ &.purple {+ border-left-color: var(--purple);+ }++ .custom-block-title {+ margin-bottom: 0.35rem;+ font-weight: 700;+ font-variant: small-caps;+ letter-spacing: 0.02em;+ }++ .custom-block-content p {+ margin: 0.35em 0;+ text-indent: 0;+ }+ }++ .katex {+ font-size: 18px;++ .text {+ font-family: 'Libertinus Math', serif !important;+ font-size: 14px;+ }+ }+}