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.

Fixes

Veauville Raphaeldaa17a9b4b8a
diff --git a/@alexandrie/styles/src/_variables.scss b/@alexandrie/styles/src/_variables.scss
index a73a161c..9f5c331d 100644
--- a/@alexandrie/styles/src/_variables.scss
+++ b/@alexandrie/styles/src/_variables.scss
@@ -14,13 +14,17 @@ $primary-400: #00ADB5;
$primary-300: lighten($primary-400, 10%);
$primary-500: darken($primary-400, 10%);
-$selection-color: $primary-400;
+$selection-color: $blue;
+
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700&display=swap");
$internal-font: 'Roboto', sans-serif;
$external-font: 'Poppins', sans-serif;
+// Transitions
+$transition-duration: 0.3s;
+
:root {
diff --git a/@alexandrie/styles/src/document-theme.scss b/@alexandrie/styles/src/document-theme.scss
new file mode 100644
index 00000000..801e2749
--- /dev/null
+++ b/@alexandrie/styles/src/document-theme.scss
@@ -0,0 +1,9 @@
+.document-theme {
+ a {
+ color: $primary-400;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
\ No newline at end of file
diff --git a/@alexandrie/styles/src/katex.scss b/@alexandrie/styles/src/katex.scss
index 1841d9ac..3b3f9a92 100644
--- a/@alexandrie/styles/src/katex.scss
+++ b/@alexandrie/styles/src/katex.scss
@@ -1,5 +1,15 @@
@import url("/katex/katex.css");
+.katex-container {
+ display: inline-flex;
+ line-height: 1.8em;
+ max-width: 100%;
+ overflow-x: auto;
+ overflow-y: hidden;
+ padding-right: 2px;
+ vertical-align: baseline;
+}
+
.katex {
font-display: swap;
}
@@ -8,14 +18,4 @@
.katex-display>.katex,
.katex-display>.katex>.katex-html {
display: inline;
-}
-
-.katex-container {
- line-height: 1.8em;
- display: inline-flex;
- vertical-align: baseline;
- max-width: 100%;
- overflow-y: hidden;
- overflow-x: auto;
- padding-right: 2px;
}
\ No newline at end of file
diff --git a/@alexandrie/styles/src/main.scss b/@alexandrie/styles/src/main.scss
index 154a7e65..14fabe08 100644
--- a/@alexandrie/styles/src/main.scss
+++ b/@alexandrie/styles/src/main.scss
@@ -1,6 +1,7 @@
@import "./theme.scss";
@import "./katex.scss";
@import "./markdown.scss";
+@import "./document-theme.scss";
* {
-webkit-font-smoothing: antialiased;
diff --git a/@alexandrie/styles/src/markdown.scss b/@alexandrie/styles/src/markdown.scss
index cb498e8c..04a36bba 100644
--- a/@alexandrie/styles/src/markdown.scss
+++ b/@alexandrie/styles/src/markdown.scss
@@ -75,13 +75,8 @@
border-color: var(--grey-border);
color: var(--grey);
background-color: var(--grey-bg);
-
- code {
- background-color: var(--grey-border);
- }
}
-//TODO: Fix containers code block missing (blue etc.)
.custom-block.blue {
border-color: var(--blue-border);
color: var(--blue);
@@ -108,10 +103,6 @@
border-color: var(--yellow-border);
color: var(--yellow);
background-color: var(--yellow-bg);
-
- code {
- background-color: var(--yellow-border);
- }
}
@@ -119,10 +110,6 @@
border-color: var(--red-border);
color: var(--red);
background-color: var(--red-bg);
-
- code {
- background-color: var(--red-border);
- }
}
@@ -140,10 +127,6 @@
margin: 8px 0;
}
}
-
- code {
- background-color: #f9f9f9;
- }
}
@@ -176,8 +159,4 @@
.custom-block a:hover {
opacity: 0.6;
-}
-
-.custom-block code {
- font-size: 13px;
}
\ No newline at end of file
diff --git a/@alexandrie/styles/src/theme.scss b/@alexandrie/styles/src/theme.scss
index bb14eb42..6e5608d2 100644
--- a/@alexandrie/styles/src/theme.scss
+++ b/@alexandrie/styles/src/theme.scss
@@ -1,20 +1,46 @@
a {
- color: $primary-400;
text-decoration: none;
+ color: var(--font-color);
+ transition: color $transition-duration;
+
+ &:hover {
+ color: $primary-400;
+ }
}
blockquote {
border-left: 4px solid $primary-400;
- color: var(--font-color-dimmed);
- padding: 0 15px
-}
+ padding: 0 15px;
+
+ > :first-child {
+ margin-top: 0;
+ }
-blockquote> :first-child {
- margin-top: 0
+ > :last-child {
+ margin-bottom: 0;
+ }
}
-blockquote> :last-child {
- margin-bottom: 0
+button {
+ padding: 8px 16px;
+ background-color: $primary-400;
+ border: none;
+ border-radius: 6px;
+ color: var(--font-color);
+ font-size: 15px;
+ cursor: pointer;
+ transition: transform $transition-duration;
+ width: fit-content;
+
+ &:hover {
+ transform: translateY(-2px);
+ background-color: $primary-500;
+ }
+
+ &:disabled {
+ opacity: 0.6;
+ cursor: not-allowed;
+ }
}
code,
@@ -24,16 +50,15 @@ tt {
border-radius: 3px;
margin: 0 2px;
padding: 0 5px;
- white-space: nowrap
+ white-space: nowrap;
}
fieldset {
margin: auto;
margin-top: 3% !important;
- padding: 10px
+ padding: 10px;
}
-
h1,
h2 {
border-bottom: 1px solid var(--border-color);
@@ -41,6 +66,14 @@ h2 {
line-height: 1.2;
margin: 25px 0 15px 0;
padding-bottom: 10px;
+
+ h1 {
+ font-size: 2em;
+ }
+
+ h2 {
+ font-size: 1.5em;
+ }
}
h3,
@@ -50,35 +83,25 @@ h6 {
font-weight: 600;
margin: 8px 0 10px 0;
padding-bottom: 6px;
- text-decoration: underline
-}
+ text-decoration: underline;
-h1 {
- font-size: 2em
-}
-
-h2 {
- font-size: 1.5em
-}
-
-h3 {
- font-size: 1.17em
-}
+ h3 {
+ font-size: 1.17em;
+ }
-h4 {
- font-size: 1em
-}
+ h4 {
+ font-size: 1em;
+ }
-h5 {
- font-size: .83em
-}
+ h5 {
+ font-size: 0.83em;
+ }
-h6 {
- font-size: .67em
+ h6 {
+ font-size: 0.67em;
+ }
}
-
-
hr {
background-color: var(--border-color);
border: none;
@@ -93,14 +116,7 @@ img {
margin-bottom: 5px;
max-height: 400px;
max-width: 100%;
- width: auto
-}
-
-label {
- display: block;
- margin-bottom: 0.5rem;
- color: var(--font-color);
- font-weight: 600;
+ width: auto;
}
input,
@@ -114,35 +130,10 @@ textarea {
border-radius: 6px;
background-color: var(--bg-contrast-2);
font-size: 15px;
- transition: border-color 0.15s, box-shadow 0.15s;
-}
-
-input:focus,
-select:focus {
- border-color: var(--bg-contrast);
- box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
- outline: none;
-}
-
-input:disabled {
- opacity: 0.6;
- cursor: not-allowed;
-}
-
-button {
- padding: 8px 16px;
- background-color: $primary-400;
- border: none;
- border-radius: 6px;
- font-size: 15px;
- cursor: pointer;
- transition: transform 0.15s;
- color: var(--font-color);
- width: fit-content;
+ transition: border-color $transition-duration, box-shadow $transition-duration;
- &:hover {
- transform: translateY(-2px);
- background-color: $primary-500;
+ &:focus {
+ box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}
&:disabled {
@@ -151,10 +142,14 @@ button {
}
}
-
+label {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-weight: 600;
+}
li p.first {
- display: inline-block
+ display: inline-block;
}
option {
@@ -174,7 +169,7 @@ ol,
dl,
table,
pre {
- margin: 10px 0
+ margin: 10px 0;
}
pre {
@@ -182,91 +177,70 @@ pre {
border: 1px solid #000;
border-radius: 3px;
overflow: auto;
- padding: 3px 5px
-}
+ padding: 3px 5px;
-pre code {
- background: transparent;
- margin: 0;
- padding: 0;
- white-space: pre
-}
-
-pre code,
-pre tt {
- background-color: transparent;
- border: none
+ code,
+ tt {
+ background-color: transparent;
+ border: none;
+ }
}
select {
font-family: $external-font;
- font-size: 16px;
- color: var(--font-color);
border: 1px solid var(--border-color);
border-radius: 5px;
- background-color: var(--bg-contrast);
- margin-left: 5px;
}
table {
border-collapse: separate;
border-spacing: 0;
-}
+ background-color: var(--contrast-color);
-table tr:first-child th:first-child {
- border-top-left-radius: 10px
-}
+ tr:first-child {
+ th:first-child {
+ border-top-left-radius: 10px;
+ }
-table tr:first-child th:last-child {
- border-top-right-radius: 10px
-}
+ th:last-child {
+ border-top-right-radius: 10px;
+ }
+ }
-table tr:last-child td:first-child {
- border-bottom-left-radius: 10px
-}
+ tr:last-child {
+ td:first-child {
+ border-bottom-left-radius: 10px;
+ }
-table tr:last-child td:last-child {
- border-bottom-right-radius: 10px
-}
+ td:last-child {
+ border-bottom-right-radius: 10px;
+ }
+ }
-@media (max-width: 600px) {
- table {
- zoom: .9
+ td,
+ th {
+ border: 1px solid var(--border-color);
+ padding: 6px;
}
-}
-td,
-th {
- border: 1px solid var(--border-color);
- padding: 6px
+ @media (max-width: 600px) {
+ zoom: 0.9;
+ }
}
textarea {
font-family: $external-font, sans-serif;
font-size: 16px;
-}
-textarea:focus,
-input:focus {
- border-color: transparent !important
-}
-
-th {
- background-color: var(--contrast-color-after);
- padding-bottom: 12px;
- padding-top: 12px;
- text-align: left
+ &:focus,
+ input:focus {
+ border-color: transparent !important;
+ }
}
-tr {
- background-color: var(--contrast-color)
-}
-tr:nth-child(even) {
- background-color: var(--contrast-color-after)
-}
ul,
ol {
- padding-left: 22px
+ padding-left: 22px;
}
\ No newline at end of file
diff --git a/dashboard/app.vue b/dashboard/app.vue
index a8d843f3..2e0bfcb0 100644
--- a/dashboard/app.vue
+++ b/dashboard/app.vue
@@ -6,7 +6,7 @@
</template>
<script setup lang="ts">
import { useDocumentsStore, useCategoriesStore } from './store';
-import Navbar from './components/navbar/Navbar.vue';
+import Navbar from './components/Navbar.vue';
import Notification from "../components/Notification/Notification.vue";
// @ts-ignore
diff --git a/dashboard/components/documents-list/List.vue b/dashboard/components/DocumentsList/List.vue
similarity index 83%
rename from dashboard/components/documents-list/List.vue
rename to dashboard/components/DocumentsList/List.vue
index fe55ba71..14fdbd98 100644
--- a/dashboard/components/documents-list/List.vue
+++ b/dashboard/components/DocumentsList/List.vue
@@ -33,8 +33,10 @@ const docs = computed(() => {
const normal = (() => {
return useDocumentsStore().getAll
.filter((doc) => {
+ console.log(doc.category);
+
if (!route.query.category) return true;
- if (route.query.category === 'uncategorized') return doc.category === '';
+ if (route.query.category === 'uncategorized') return !doc.category;
if (route.query.category === 'draft') return doc.accessibility === 2
if (route.query.category === 'archive') return doc.accessibility === 3
if (route.query.category === 'trash') return doc.accessibility === 4
@@ -54,14 +56,9 @@ const linkTo = (id: string) => {
<style lang="scss" scoped>
aside {
- height: 100%;
- width: 100%;
background: var(--bg-color);
padding: .7rem;
overflow-y: scroll;
- font-family: $external-font;
- font-size: 1rem;
- font-weight: normal;
}
.header {
@@ -79,20 +76,19 @@ aside {
.item-container {
margin: 0.5rem 0;
padding: 0.5rem;
- border-radius: 10px;
- transition: all 0.2s ease;
+ border-radius: 5px;
+ transition: all $transition-duration ease;
&:hover,
&.active {
- background-color: var(--bg-contrast-2);
+ background-color: var(--bg-contrast);
}
}
.item {
display: block;
- transition: all 0.3s ease-in-out;
- border-bottom: 1px solid lighten($grey, 20%);
- color: var(--font-color);
+ transition: all $transition-duration ease-in-out;
+ border-bottom: 1px solid var(--border-color);
.header {
display: flex;
@@ -102,7 +98,7 @@ aside {
}
.title {
- font-size: 1.1rem;
+ font-size: 1rem;
font-weight: 500;
}
@@ -112,7 +108,7 @@ aside {
}
.description {
- font-size: 15px;
+ font-size: 14px;
font-weight: 400;
margin: 0.3rem 0;
}
diff --git a/dashboard/components/documents-list/Search.vue b/dashboard/components/DocumentsList/Search.vue
similarity index 89%
rename from dashboard/components/documents-list/Search.vue
rename to dashboard/components/DocumentsList/Search.vue
index fd590c98..196cbdaa 100644
--- a/dashboard/components/documents-list/Search.vue
+++ b/dashboard/components/DocumentsList/Search.vue
@@ -14,7 +14,7 @@ input {
font-size: 0.9rem;
line-height: 2rem;
padding: 0.5rem 0.5rem 0.5rem 2rem;
- transition: all ease 0.3s;
+ transition: all ease $transition-duration;
background: var(--bg-color) url('search.svg') 0.6rem 0.5rem no-repeat;
background-size: 1rem;
}
diff --git a/dashboard/components/documents-list/search.svg b/dashboard/components/DocumentsList/search.svg
similarity index 100%
rename from dashboard/components/documents-list/search.svg
rename to dashboard/components/DocumentsList/search.svg
diff --git a/dashboard/components/MarkdownEditor/MarkdownEditor.vue b/dashboard/components/MarkdownEditor/MarkdownEditor.vue
index 4df48e5a..e51813f0 100644
--- a/dashboard/components/MarkdownEditor/MarkdownEditor.vue
+++ b/dashboard/components/MarkdownEditor/MarkdownEditor.vue
@@ -79,7 +79,6 @@ function exec(action: string) {
width: 100%;
height: 100%;
background-color: var(--bg-contrast);
- color: var(--font-color);
border-radius: 10px;
padding: 5px;
display: flex;
@@ -118,8 +117,8 @@ function exec(action: string) {
.input {
border: none;
outline: none;
- color: var(--font-color);
background-color: var(--bg-contrast);
+ padding-left: 0;
&::placeholder {
color: $grey;
diff --git a/dashboard/components/MarkdownEditor/Toolbar.vue b/dashboard/components/MarkdownEditor/Toolbar.vue
index bc0d3f32..fa5dccb4 100644
--- a/dashboard/components/MarkdownEditor/Toolbar.vue
+++ b/dashboard/components/MarkdownEditor/Toolbar.vue
@@ -126,7 +126,6 @@ const toolbar = [
input {
border: none;
outline: none;
- color: var(--font-color);
background-color: var(--bg-contrast-2);
}
diff --git a/dashboard/components/navbar/Navbar.vue b/dashboard/components/Navbar.vue
similarity index 91%
rename from dashboard/components/navbar/Navbar.vue
rename to dashboard/components/Navbar.vue
index aff2e811..bdfd6f0b 100644
--- a/dashboard/components/navbar/Navbar.vue
+++ b/dashboard/components/Navbar.vue
@@ -27,7 +27,6 @@ nav {
p {
padding: 0 10px;
- color: var(--font-color);
font-weight: 500;
font-size: large;
margin: auto;
diff --git a/dashboard/components/Notification/Notification.vue b/dashboard/components/Notification/Notification.vue
index c359d9f7..91a2461a 100644
--- a/dashboard/components/Notification/Notification.vue
+++ b/dashboard/components/Notification/Notification.vue
@@ -54,7 +54,7 @@ p {
.close-icon {
cursor: pointer;
margin-left: 12px;
- transition: transform 0.3s ease;
+ transition: transform $transition-duration ease;
}
.close-icon:hover {
@@ -62,7 +62,7 @@ p {
}
.info {
- background-color: #3498db;
+ background-color: $blue;
}
.error {
@@ -70,17 +70,17 @@ p {
}
.success {
- background-color: #2ecc71;
+ background-color: $green;
}
.warning {
- background-color: #f1c40f;
+ background-color: $yellow;
}
/* Transitions */
.notification-slide-enter-active,
.notification-slide-leave-active {
- transition: transform 0.5s, opacity 0.5s;
+ transition: transform $transition-duration, opacity $transition-duration;
}
.notification-enter-from {
diff --git a/dashboard/components/Preview.vue b/dashboard/components/Preview.vue
index d7a98340..96995be1 100644
--- a/dashboard/components/Preview.vue
+++ b/dashboard/components/Preview.vue
@@ -14,20 +14,20 @@
d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z" />
</svg>
</NuxtLink>
- <NuxtLink @click="deleteDoc(doc.id)">
+ <NuxtLink @click="print">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">
<path
- d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z" />
+ d="M640-640v-120H320v120h-80v-200h480v200h-80Zm-480 80h640-640Zm560 100q17 0 28.5-11.5T760-500q0-17-11.5-28.5T720-540q-17 0-28.5 11.5T680-500q0 17 11.5 28.5T720-460Zm-80 260v-160H320v160h320Zm80 80H240v-160H80v-240q0-51 35-85.5t85-34.5h560q51 0 85.5 34.5T880-520v240H720v160Zm80-240v-160q0-17-11.5-28.5T760-560H200q-17 0-28.5 11.5T160-520v160h80v-80h480v80h80Z" />
</svg>
</NuxtLink>
- <NuxtLink @click="print">
+ <NuxtLink @click="deleteDoc(doc.id)">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">
<path
- d="M640-640v-120H320v120h-80v-200h480v200h-80Zm-480 80h640-640Zm560 100q17 0 28.5-11.5T760-500q0-17-11.5-28.5T720-540q-17 0-28.5 11.5T680-500q0 17 11.5 28.5T720-460Zm-80 260v-160H320v160h320Zm80 80H240v-160H80v-240q0-51 35-85.5t85-34.5h560q51 0 85.5 34.5T880-520v240H720v160Zm80-240v-160q0-17-11.5-28.5T760-560H200q-17 0-28.5 11.5T160-520v160h80v-80h480v80h80Z" />
+ d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z" />
</svg>
</NuxtLink>
</div>
- <div class="card" id="doc" v-html="doc.content_html"></div>
+ <div class="document-theme card" id="doc" v-html="doc.content_html"></div>
</div>
</template>
<script setup lang="ts">
diff --git a/dashboard/components/navbar/ThemeToggle.vue b/dashboard/components/navbar/ThemeToggle.vue
deleted file mode 100644
index 48fd5477..00000000
--- a/dashboard/components/navbar/ThemeToggle.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-<template>
- <i @click="toggleTheme" :name='themeIcon'></i>
-</template>
-
-<script lang="ts" setup>
-
-import { ref } from 'vue'
-const themeIcon = ref('bx-moon');
-
-function toggleTheme() {
- if (document.documentElement.getAttribute("data-theme") === "dark") {
- document.documentElement.setAttribute("data-theme", "light");
- themeIcon.value = "bx-sun";
- } else if (document.documentElement.getAttribute("data-theme") === "light") {
- document.documentElement.setAttribute("data-theme", "dark");
- themeIcon.value = "bx bx-moon";
- } else {
- document.documentElement.setAttribute("data-theme", "light");
- themeIcon.value = "bx bx-sun";
- }
-}
-</script>
-
-<style scoped lang="scss">
-i {
- cursor: pointer;
- opacity: 0.5;
- font-size: 1.5rem;
-
- &:hover {
- opacity: 1;
- }
-}
-</style>
\ No newline at end of file
diff --git a/dashboard/components/sidebar/Sidebar.vue b/dashboard/components/sidebar/Sidebar.vue
index 48b3b874..d88f4b7f 100644
--- a/dashboard/components/sidebar/Sidebar.vue
+++ b/dashboard/components/sidebar/Sidebar.vue
@@ -30,8 +30,6 @@
</template>
<script setup lang="ts" scoped>
-import { onBeforeUnmount, watch } from 'vue';
-import { useRoute } from 'vue-router';
import { useCategoriesStore, type Category, useNotifications } from '~/store';
import { isOpened, type Item, defaultItems, hasSidebar } from "./helpers";
import Collapse from './Collapse.vue';
diff --git a/dashboard/components/sidebar/sidebar.scss b/dashboard/components/sidebar/sidebar.scss
index 63899fae..3dbf21db 100644
--- a/dashboard/components/sidebar/sidebar.scss
+++ b/dashboard/components/sidebar/sidebar.scss
@@ -6,35 +6,34 @@ $bg: #1e2430;
// Sidebar
.sidebar {
background: $bg;
- color: var(--font-color);
+ border-bottom-right-radius: 10px;
+ border-top-right-radius: 10px;
display: flex;
flex-direction: column;
font: 1rem $internal-font;
height: 100%;
- position: fixed;
- top: 0;
left: 0;
- width: $sidebar-width;
overflow-x: hidden;
overflow-y: auto;
- z-index: 100;
+ position: fixed;
+ top: 0;
transform: translateX(-100%);
- transition: all 0.2s ease;
- border-top-right-radius: 10px;
- border-bottom-right-radius: 10px;
+ transition: all $transition-duration ease;
+ width: $sidebar-width;
+ z-index: 100;
&.open {
transform: translateX(0);
}
@media screen and (min-width: 768px) {
- position: relative;
- transform: translateX(0);
- width: 0;
-
&.open {
width: $sidebar-width;
}
+
+ position: relative;
+ transform: translateX(0);
+ width: 0;
}
}
@@ -79,7 +78,7 @@ $bg: #1e2430;
border-radius: 5px;
color: var(--font-color);
cursor: pointer;
- transition: all 0.2s ease;
+ transition: all $transition-duration ease;
opacity: 0.7;
&:hover,
diff --git a/dashboard/helpers/date.ts b/dashboard/helpers/date.ts
deleted file mode 100644
index 6ec27596..00000000
--- a/dashboard/helpers/date.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export function timestampToString(timestamp: number | string): string {
- const date = new Date(parseInt(timestamp as string));
- return date.toLocaleString('fr-FR', {
- year: 'numeric',
- month: 'numeric',
- day: 'numeric',
- hour: undefined,
- minute: undefined,
- second: undefined,
- });
-}
diff --git a/dashboard/pages/dashboard/categories/edit.vue b/dashboard/pages/dashboard/categories/edit.vue
index a4eb00f0..b1079d5d 100644
--- a/dashboard/pages/dashboard/categories/edit.vue
+++ b/dashboard/pages/dashboard/categories/edit.vue
@@ -40,7 +40,6 @@
<script lang="ts" setup>
import { useCategoriesStore, useNotifications } from '~/store';
-import { useRoute } from 'vue-router';
const route = useRoute();
const categoriesStore = useCategoriesStore();
@@ -79,9 +78,6 @@ const deleteCategory = async () => {
h2 {
font-size: 26px;
- margin-bottom: 30px;
- color: var(--font-color);
-
text-align: center;
}
@@ -96,7 +92,6 @@ h2 {
display: block;
font-weight: 600;
border: 2px solid var(--bg-contrast);
- color: var(--font-color);
&.update {
background-color: $primary-400;
diff --git a/dashboard/pages/dashboard/categories/index.vue b/dashboard/pages/dashboard/categories/index.vue
index 4165b563..3a79bb9a 100644
--- a/dashboard/pages/dashboard/categories/index.vue
+++ b/dashboard/pages/dashboard/categories/index.vue
@@ -55,14 +55,15 @@
padding: 15px;
border-radius: 8px;
position: relative;
- transition: box-shadow 0.3s;
+ transition: box-shadow $transition-duration;
margin-bottom: 10px;
-}
-.category-card:hover {
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
+ &:hover {
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
+ }
}
+
.main-category {
font-weight: bold;
font-size: 1.2em;
diff --git a/dashboard/pages/dashboard/categories/new.vue b/dashboard/pages/dashboard/categories/new.vue
index e0c7ad75..96ffe05c 100644
--- a/dashboard/pages/dashboard/categories/new.vue
+++ b/dashboard/pages/dashboard/categories/new.vue
@@ -31,7 +31,6 @@
</template>
<script lang="ts" setup>
-import { ref } from 'vue';
import { type Category, useCategoriesStore, useNotifications } from '~/store';
const categoriesStore = useCategoriesStore();
diff --git a/dashboard/pages/dashboard/cdn.vue b/dashboard/pages/dashboard/cdn.vue
index 4f0aff4d..bd58cb4e 100644
--- a/dashboard/pages/dashboard/cdn.vue
+++ b/dashboard/pages/dashboard/cdn.vue
@@ -22,7 +22,6 @@
</div>
</template>
<script setup lang="ts">
-import { ref } from 'vue';
import { useNotifications } from '~/store';
const selectedFile: Ref<File | null> = ref(null);
@@ -96,7 +95,7 @@ const clearForm = () => selectedFile.value = null;
font-size: 14px;
color: #9e9e9e;
position: relative;
- transition: background-color 0.2s;
+ transition: background-color $transition-duration;
background-color: var(--dropzone-bg, transparent);
&:hover {
@@ -160,7 +159,7 @@ const clearForm = () => selectedFile.value = null;
.dropzone.drag-over {
background-color: #E3F2FD;
border-color: #2196F3;
- transition: background-color 0.3s, border-color 0.3s;
+ transition: background-color $transition-duration, border-color $transition-duration;
}
.file-info {
diff --git a/dashboard/pages/dashboard/edit.vue b/dashboard/pages/dashboard/edit.vue
index f407a180..e84ac131 100644
--- a/dashboard/pages/dashboard/edit.vue
+++ b/dashboard/pages/dashboard/edit.vue
@@ -1,5 +1,5 @@
<template>
- <div v-if="document" class="container">
+ <div v-if="document" class="edit-component">
<MarkdownEditorVue ref="editor" :doc="document" @save="(data) => save(data)" />
</div>
</template>
@@ -33,7 +33,7 @@ function save(doc: Document) {
</script>
<style lang="scss" scoped>
-.container {
+.edit-component {
width: 100%;
padding: 12px;
}
diff --git a/dashboard/pages/dashboard/index.vue b/dashboard/pages/dashboard/index.vue
index 0b03c6a7..a1c3a3f4 100644
--- a/dashboard/pages/dashboard/index.vue
+++ b/dashboard/pages/dashboard/index.vue
@@ -6,7 +6,7 @@
</template>
<script lang="ts" setup>
-import DocumentList from "../components/documents-list/List.vue";
+import DocumentList from "../components/DocumentsList/List.vue";
import Preview from "../components/Preview.vue";
</script>
diff --git a/dashboard/pages/dashboard/new.vue b/dashboard/pages/dashboard/new.vue
index 2817b5a6..913d1d46 100644
--- a/dashboard/pages/dashboard/new.vue
+++ b/dashboard/pages/dashboard/new.vue
@@ -1,5 +1,5 @@
<template>
- <div class="container">
+ <div class="new-component">
<MarkdownEditorVue ref="editor" :doc="document" @save="(data) => save(data)" />
</div>
</template>
@@ -22,7 +22,7 @@ function save(doc: Document) {
</script>
<style lang="scss" scoped>
-.container {
+.new-component {
width: 100%;
padding: 12px;
}
diff --git a/dashboard/pages/login.vue b/dashboard/pages/login.vue
index f76cad5b..c7433355 100644
--- a/dashboard/pages/login.vue
+++ b/dashboard/pages/login.vue
@@ -110,7 +110,6 @@ async function connect(username: string, password: string) {
margin-top: -0.5rem;
margin-bottom: 1rem;
text-align: right;
- color: var(--font-color);
text-decoration: none;
&:hover {
@@ -134,7 +133,6 @@ async function connect(username: string, password: string) {
border: none;
cursor: pointer;
outline: none;
- color: var(--font-color);
&:hover {
text-decoration: underline;
diff --git a/frontend/App.vue b/frontend/App.vue
index a1c42c74..0c4a392e 100644
--- a/frontend/App.vue
+++ b/frontend/App.vue
@@ -19,7 +19,6 @@ useCategoriesStore().fetch();
flex-direction: column;
height: 100vh;
width: 100%;
- color: var(--font-color);
max-width: 100% !important;
}
</style>
diff --git a/frontend/components/BackToTop.vue b/frontend/components/BackToTop.vue
index 462807b2..589e5f91 100644
--- a/frontend/components/BackToTop.vue
+++ b/frontend/components/BackToTop.vue
@@ -49,7 +49,7 @@ onMounted(() => {
.back-to-top-enter-active,
.back-to-top-leave-active {
- transition: opacity 0.3s;
+ transition: opacity $transition-duration;
}
.back-to-top-enter-from,
diff --git a/frontend/components/DocumentFooter.vue b/frontend/components/DocumentFooter.vue
index a60ba549..47712092 100644
--- a/frontend/components/DocumentFooter.vue
+++ b/frontend/components/DocumentFooter.vue
@@ -76,12 +76,10 @@ footer {
}
.min {
- color: var(--font-color);
font-size: small;
}
.update {
- color: var(--font-color);
border-bottom: 1px solid lighten($grey, 20%);
}
</style>
\ No newline at end of file
diff --git a/frontend/components/Navbar.vue b/frontend/components/Navbar.vue
index 9f654fbd..b9dcb91d 100644
--- a/frontend/components/Navbar.vue
+++ b/frontend/components/Navbar.vue
@@ -9,16 +9,16 @@
</span>
<ul>
<li>
- <NuxtLink class="a-classic no-mobile" to="/">Home</NuxtLink>
+ <NuxtLink class="no-mobile" to="/">Home</NuxtLink>
</li>
<li class="no-mobile">
- <NuxtLink class="a-classic" to="https://dashboard.alexandrie-hub.fr" target="_blank">Dashboard</NuxtLink>
+ <NuxtLink to="https://dashboard.alexandrie-hub.fr" target="_blank">Dashboard</NuxtLink>
</li>
<li style="margin-right: 0px;">
<Search />
</li>
<li>
- <NuxtLink class="a-classic" to="https://github.com/Smaug6739" target="_blank">
+ <NuxtLink to="https://github.com/Smaug6739" target="_blank">
<Icon
svg='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>' />
</NuxtLink>
diff --git a/frontend/components/Search.vue b/frontend/components/Search.vue
index ec4cbce0..ab88c6bb 100644
--- a/frontend/components/Search.vue
+++ b/frontend/components/Search.vue
@@ -5,7 +5,7 @@
<ul v-if="isActive && inputText.length > 0" class="suggestions">
<li v-if="results.length" v-for="result in results" :key="result.id" class="suggestion"
@mousedown="(e) => e.preventDefault()">
- <NuxtLink :to="result.path" class="a-classic" @click="leave()"> {{ result.name }} </NuxtLink>
+ <NuxtLink :to="result.path" @click="leave()"> {{ result.name }} </NuxtLink>
</li>
<li v-else>Aucun résultat...</li>
</ul>
@@ -14,21 +14,13 @@
<style scoped lang="scss">
input {
- -webkit-appearance: none;
- appearance: none;
- cursor: text;
width: 200px;
height: 2.1rem;
- color: var(--font-color);
- display: inline-block;
- border: 1px solid var(--border-color);
- border-radius: .7rem;
- font-size: 0.9rem;
- line-height: 2rem;
+ border-radius: .5rem;
padding: 0 0.5rem 0 2rem;
- transition: all ease 0.3s;
+ transition: all ease $transition-duration;
background: var(--bg-contrast) url('/svg/search.svg') 0.6rem 0.55rem no-repeat;
- background-size: .8rem;
+ outline: none;
}
input:focus {
diff --git a/frontend/components/sidebar/Sidebar.vue b/frontend/components/sidebar/Sidebar.vue
index 39035455..2fd3dbac 100644
--- a/frontend/components/sidebar/Sidebar.vue
+++ b/frontend/components/sidebar/Sidebar.vue
@@ -21,10 +21,6 @@
</template>
<script setup lang="ts">
-
-import { ref, onBeforeUnmount, computed } from 'vue';
-import { useRoute } from 'vue-router';
-
import SidebarGroup from './SidebarGroup.vue';
import SidebarSearch from './SidebarSearch.vue';
import Icon from "@/components/Icon.vue";
@@ -33,7 +29,6 @@ import { hasSidebar, isOpened } from "./helpers"
import { useDocumentsStore, useCategoriesStore } from '@/store';
import type { MenuItem } from './types'
-import { onMounted, watch } from 'vue';
const route = useRoute();
const documentsStore = useDocumentsStore();
@@ -106,7 +101,7 @@ const menuItems = computed((): MenuItem[] => {
top: 0;
min-height: min-content;
z-index: 100;
- transition: all 0.2s ease;
+ transition: all $transition-duration ease;
background: var(--bg-color);
height: 100%;
width: 300px;
@@ -131,11 +126,10 @@ const menuItems = computed((): MenuItem[] => {
text-align: right;
font-size: 27px;
cursor: pointer;
- transition: all 0.2s ease;
+ transition: all $transition-duration ease;
}
.name {
- color: var(--font-color);
font-size: 19px;
font-weight: 600;
display: flex;
diff --git a/frontend/components/sidebar/SidebarGroup.vue b/frontend/components/sidebar/SidebarGroup.vue
index 52666b3a..c3ca98a4 100644
--- a/frontend/components/sidebar/SidebarGroup.vue
+++ b/frontend/components/sidebar/SidebarGroup.vue
@@ -6,7 +6,7 @@
</NuxtLink>
<ul>
<li v-for="(children, index) of menuItem.childrens" :key="index" class="children" @click="emit('closeMobile')">
- <NuxtLink :to="children.link" class="sub_link a-classic">{{ children.name }}</NuxtLink>
+ <NuxtLink :to="children.link" class="sub_link">{{ children.name }}</NuxtLink>
</li>
</ul>
</div>
@@ -38,7 +38,7 @@ const emit = defineEmits(['closeMobile']);
}
&:hover {
- transition: all 0.2s ease;
+ transition: all $transition-duration ease;
background: var(--bg-contrast);
.parent_name {
@@ -56,10 +56,9 @@ const emit = defineEmits(['closeMobile']);
}
.parent_name {
- color: var(--font-color);
font: normal 700 15px arial;
opacity: 0;
- transition: 0.4s;
+ transition: $transition-duration;
}
.sub_link {
@@ -70,13 +69,4 @@ ul {
padding: 0;
margin: 0;
}
-
-.a-classic {
- text-decoration: none;
- color: var(--font-color);
-
- &:hover {
- color: $primary-400;
- }
-}
</style>
\ No newline at end of file
diff --git a/frontend/components/sidebar/SidebarSearch.vue b/frontend/components/sidebar/SidebarSearch.vue
index dadeeffe..0fee3eec 100644
--- a/frontend/components/sidebar/SidebarSearch.vue
+++ b/frontend/components/sidebar/SidebarSearch.vue
@@ -21,7 +21,7 @@ input {
height: 50px;
border: none;
border-radius: 12px;
- transition: all 0.2s ease;
+ transition: all $transition-duration ease;
background: var(--bg-contrast);
font-size: 15px;
color: var(--font-color);
diff --git a/frontend/components/table-of-content/NodeTree.vue b/frontend/components/table-of-content/NodeTree.vue
index 8c663952..49a37c70 100644
--- a/frontend/components/table-of-content/NodeTree.vue
+++ b/frontend/components/table-of-content/NodeTree.vue
@@ -19,7 +19,6 @@ defineProps<{ node: Node; }>();
<style scoped>
a {
- color: var(--font-color-dimmed);
opacity: 0.85;
}
diff --git a/frontend/pages/docs/[category]/[id].vue b/frontend/pages/docs/[category]/[id].vue
index fba6966a..fde509e6 100644
--- a/frontend/pages/docs/[category]/[id].vue
+++ b/frontend/pages/docs/[category]/[id].vue
@@ -2,7 +2,8 @@
<Transition name="fade" mode="out-in">
<div class="view-medium" v-if="article?.id" style="display:flex;">
<div style="width:100%;">
- <article style="max-width: 100%;overflow: auto;" ref="element" v-html="article.content_html"></article>
+ <article class="document-theme" style="max-width: 100%;overflow: auto;" ref="element"
+ v-html="article.content_html"></article>
<DocumentFooter :document="article" :next="next" :previous="previous" class="footer" />
</div>
<TableOfContent :element="element" class="toc" />
diff --git a/frontend/pages/docs/[category]/index.vue b/frontend/pages/docs/[category]/index.vue
index 259bfc6e..d1becbc0 100644
--- a/frontend/pages/docs/[category]/index.vue
+++ b/frontend/pages/docs/[category]/index.vue
@@ -12,7 +12,6 @@
<script setup lang="ts">
import { useCategoriesStore, useDocumentsStore } from '~/store';
-import { useRoute } from 'vue-router';
const route = useRoute();
const categoriesStore = useCategoriesStore();
@@ -44,7 +43,7 @@ const allDocuments = computed(() => {
padding: 15px;
border-radius: 8px;
position: relative;
- transition: box-shadow 0.3s;
+ transition: box-shadow $transition-duration;
margin-bottom: 10px;
}
diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue
index 8bd81735..427a28aa 100644
--- a/frontend/pages/index.vue
+++ b/frontend/pages/index.vue
@@ -90,7 +90,7 @@
a {
text-decoration: none;
color: var(--font-color);
- transition: color 0.3s;
+ transition: color $transition-duration;
&:hover {
color: $primary-400;
@@ -108,11 +108,11 @@
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
justify-content: center;
margin-top: 20px;
- transition: all 0.3s;
+ transition: all $transition-duration;
padding: 20px;
.category-card {
- transition: transform 0.3s;
+ transition: transform $transition-duration;
&:hover {
transform: scale(1.05);
@@ -126,7 +126,6 @@
<script setup lang="ts">
import { useDocumentsStore, useCategoriesStore } from '~/store';
-import { computed } from 'vue';
const recentDocuments = computed(() => useDocumentsStore().getRecents(6));
const categories = computed(() => useCategoriesStore().getParents);
diff --git a/frontend/styles/main.scss b/frontend/styles/main.scss
index dbb13407..90a584af 100644
--- a/frontend/styles/main.scss
+++ b/frontend/styles/main.scss
@@ -13,7 +13,7 @@
.fade-enter-active,
.fade-leave-active {
opacity: 0;
- transition: opacity 0.3s;
+ transition: opacity $transition-duration;
}
.fade-enter-to,
@@ -21,16 +21,6 @@
opacity: 1;
}
-.a-classic {
- color: var(--font-color);
- text-decoration: none;
-
- &:hover {
- color: $primary-400;
- text-decoration: none;
- }
-}
-
:root {
--padding: calc((100vw - 1700px) / 2);
}
\ No newline at end of file