Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

fix(themes): clean up themes by marging & removing useless latex themes (#697)

Smaug8ffd6724c55f
diff --git a/frontend/app/components/Node/Modals/Metadata.vue b/frontend/app/components/Node/Modals/Metadata.vue
index 276da638..59343892 100644
--- a/frontend/app/components/Node/Modals/Metadata.vue
+++ b/frontend/app/components/Node/Modals/Metadata.vue
@@ -33,7 +33,7 @@
<span class="sec-title">{{ t('nodes.modals.metadata.labelAppearance') }}</span>
<template v-if="node.role == 3">
<label for="category">{{ t('settings.documents.theme') }}</label>
- <AppSelect v-model="node.theme" :items="DOCUMENT_THEMES" :placeholder="t('settings.documents.theme')" />
+ <AppSelect v-model="node.theme" :items="DOCUMENT_THEMES" :nullable="true" :placeholder="t('settings.documents.theme')" />
</template>
<div class="setting-row">
<label for="accessibility">{{ t('common.labels.color') }}</label>
diff --git a/frontend/app/helpers/constants.ts b/frontend/app/helpers/constants.ts
index b7cd0511..220db9d3 100644
--- a/frontend/app/helpers/constants.ts
+++ b/frontend/app/helpers/constants.ts
@@ -9,8 +9,6 @@ export const appColors = ['blue', 'red', 'green', 'yellow', 'orange', 'purple',
// Document display themes
export const DOCUMENT_THEMES = [
{ label: 'Alexandrie', id: 'alexandrie' },
- { label: 'Latex style', id: 'latex' },
- { label: 'Latex colored', id: 'latex-colored' },
{ label: 'Modern', id: 'modern' },
{ label: 'Academic', id: 'academic' },
{ label: 'Material', id: 'material' },
diff --git a/frontend/app/styles/features/document-theme.scss b/frontend/app/styles/features/document-theme.scss
index c5e030b4..09da1024 100644
--- a/frontend/app/styles/features/document-theme.scss
+++ b/frontend/app/styles/features/document-theme.scss
@@ -17,253 +17,6 @@
}
}
-.latex-theme {
- max-width: 100%;
- font-family: "LMRoman10", serif !important;
- font-size: 17px;
-
- h1 {
- font-size: 1.5em;
- }
-
- h2 {
- margin: 0.5rem 0;
- font-size: 1.3em;
- }
-
- h3 {
- margin: 0.5rem 0;
- font-size: 1.1em;
- }
-
- p {
- width: 100%;
- padding: 0.5em 0;
- }
-
- .header-anchor {
- display: none;
- }
-
- .markdown-container {
- display: flex;
- gap: 1rem;
- margin: 0.5em 0;
- padding: 0;
- border: none;
- color: var(--text-body);
- background-color: transparent;
-
- .title {
- min-width: 150px;
- max-width: 170px;
- padding: 5px 12px;
- border-right: 1px solid var(--text-body);
- font-size: 15px;
- color: var(--text-primary);
-
- svg {
- display: none;
- }
- }
-
- p {
- padding: 0 0.5em;
- }
- }
-
- .custom-block {
- display: flex;
- flex-wrap: wrap;
- margin: 2em 0;
- padding: 0;
- border: none;
- font-size: 16px;
- color: var(--text-body);
- background-color: transparent;
-
- .custom-block-title {
- min-width: 150px;
- max-width: 170px;
- padding: 5px 12px;
- border-right: 1px solid var(--text-body);
- font-weight: bold;
- color: var(--text-primary);
- }
-
-
-
- .custom-block-content {
- flex: 1;
- padding: 0 0.5em;
-
- p {
- padding: 0 0.5em;
- }
- }
- }
-
- .katex {
- font-size: 18px;
-
- .text {
- font-family: 'Libertinus Math', serif !important;
- font-size: 14px;
- }
- }
-
-}
-
-.latex-colored-theme {
- max-width: 100%;
- font-family: "LMRoman10", serif !important;
- font-size: 17px;
-
- h1 {
- font-size: 1.5em;
- }
-
- h2 {
- margin: 0.5rem 0;
- font-size: 1.3em;
- }
-
- h3 {
- margin: 0.5rem 0;
- font-size: 1.1em;
- }
-
- p {
- width: 100%;
- padding: 0.5em 0;
- }
-
- .header-anchor {
- display: none;
- }
-
- .markdown-container {
- display: flex;
- gap: 1rem;
- margin: 0.5em 0;
- padding: 0;
- border-radius: var(--radius-xs);
- color: var(--text-body);
- background-color: transparent;
-
- .title {
- min-width: 150px;
- max-width: 170px;
- padding: 5px 12px;
- border-right: 1px solid var(--text-body);
- font-size: 15px;
-
- svg {
- display: none;
- }
- }
-
- p {
- padding: 0 0.5em;
- }
- }
-
- .custom-block {
- display: flex;
- flex-wrap: wrap;
- margin: 2em 0;
- padding: 4px;
- border: none;
- border-radius: var(--radius-xs);
- font-size: 16px;
- color: var(--text-body);
-
- .grey {
- border-left: 4px solid var(--grey);
- color: var(--grey);
- background-color: var(--grey-bg-light);
- }
-
- &.blue {
- border-left: 4px solid var(--blue);
- color: var(--blue);
- background-color: var(--blue-bg-light);
- }
-
- &.green {
- border-left: 4px solid var(--green);
- color: var(--green);
- background-color: var(--green-bg-light);
- }
-
- &.teal {
- border-left: 4px solid var(--teal);
- color: var(--teal);
- background-color: var(--teal-bg-light);
- }
-
- &.yellow {
- border-left: 4px solid var(--yellow);
- color: var(--yellow);
- background-color: var(--yellow-bg-light);
- }
-
- &.orange {
- border-left: 4px solid var(--orange);
- color: var(--orange);
- background-color: var(--orange-bg-light);
- }
-
-
- &.red {
- border-left: 4px solid var(--red);
- color: var(--red);
- background-color: var(--red-bg-light);
- }
-
- &.purple {
- border-left: 4px solid var(--purple);
- color: var(--purple);
- background-color: var(--purple-bg-light);
- }
-
-
- &.custom-block.details {
- border-left: 4px solid var(--blue);
- color: var(--blue);
- background-color: var(--blue-bg-light);
- }
-
- .custom-block-title {
- min-width: 150px;
- max-width: 170px;
- padding: 5px 12px;
- border-right: 1px solid var(--border);
- font-weight: bold;
- }
-
-
-
- .custom-block-content {
- flex: 1;
- padding: 0 0.5em;
-
- p {
- padding: 0 0.5em;
- }
- }
- }
-
- .katex {
- font-size: 18px;
-
- .text {
- font-family: 'Libertinus Math', serif !important;
- font-size: 14px;
- }
- }
-
-}
.modern-theme {
max-width: 100%;
@@ -455,12 +208,11 @@
.academic-theme {
margin: auto;
padding: 0 3rem;
- font-family: "Libertinus Serif", Georgia, serif !important;
+ font-family: "LMRoman10", "Libertinus Serif", Georgia, serif !important;
font-size: 18px;
line-height: 1.85;
color: var(--text-body);
text-align: justify;
- counter-reset: section subsection;
hyphens: auto;
.header-anchor {
@@ -473,47 +225,48 @@
}
&.numbering {
- h2::before {
- font-size: 1.8rem;
- font-weight: 700;
- color: var(--text-primary);
- letter-spacing: normal;
- content: counter(section, decimal-leading-zero);
+ counter-reset: section;
+
+ h2 {
counter-increment: section;
+ counter-reset: subsection;
+
+ &::before {
+ font-size: 1.4rem;
+ font-weight: 700;
+ color: var(--text-primary);
+ letter-spacing: normal;
+ content: counter(section, decimal-leading-zero) " ";
+ }
}
- h3::before {
- color: var(--text-muted);
- content: counter(section) "." counter(subsection) " ";
- counter-increment: subsection;
+ h3 {
+ &::before {
+ color: var(--text-muted);
+ content: counter(section) "." counter(subsection) " ";
+ counter-increment: subsection;
+ }
}
}
/* ---------- Title ---------- */
h1 {
- margin: 0 0 4rem;
padding-bottom: 1.5rem;
border-bottom: 2px solid var(--border);
- font-size: 3rem;
+ font-size: 1.5rem;
font-weight: 700;
line-height: 1.15;
text-align: center;
- letter-spacing: -.03em;
}
h2 {
display: flex;
align-items: center;
gap: 1rem;
- margin: 2rem 0;
- font-size: .95rem;
+ font-size: 1.1rem;
font-weight: 700;
text-transform: uppercase;
- letter-spacing: .25em;
- counter-reset: subsection;
-
-
}
h3 {
@@ -669,15 +422,23 @@
.markdown-container {
display: flex;
gap: 1rem;
- margin: 0.5em 0;
- padding: 0;
+ margin: 2em 0;
+ padding: 0 !important;
border: none !important;
color: var(--text-body);
background-color: transparent !important;
+ * {
+ fill: var(--text-body) !important;
+
+ path {
+ fill: var(--text-body) !important;
+ }
+ }
+
.title {
- min-width: 150px;
- max-width: 170px;
+ flex: 0 0 150px;
+ box-sizing: border-box;
padding: 5px 12px;
border-right: 1px solid var(--text-body);
font-size: 15px;
@@ -689,13 +450,14 @@
}
p {
+ flex: 1;
padding: 0 0.5em;
}
}
.custom-block {
display: flex;
- flex-wrap: wrap;
+ flex-wrap: nowrap;
margin: 2em 0;
padding: 0;
border: none;
@@ -703,19 +465,26 @@
color: var(--text-body);
background-color: transparent;
+ * {
+ fill: var(--text-body) !important;
+
+ path {
+ fill: var(--text-body) !important;
+ }
+ }
+
.custom-block-title {
- min-width: 150px;
- max-width: 170px;
+ flex: 0 0 150px;
+ box-sizing: border-box;
padding: 5px 12px;
border-right: 1px solid var(--text-body);
font-weight: bold;
color: var(--text-primary);
}
-
-
.custom-block-content {
flex: 1;
+ min-width: 0;
padding: 0 0.5em;
p {
@@ -1362,7 +1131,7 @@
letter-spacing: 0.05em;
}
- .custom-block-content > :last-child {
+ .custom-block-content> :last-child {
margin-bottom: 0;
}