📚 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
Fixes, new UI, new datatable, new components
Smaug6739c3be9e071ba6
diff --git a/.prettierrc b/.prettierrcnew file mode 100644index 00000000..48fa5990--- /dev/null+++ b/.prettierrc@@ -0,0 +1,7 @@+{+ "singleQuote": true,+ "printWidth": 250,+ "trailingComma": "all",+ "endOfLine": "lf",+ "arrowParens": "avoid"+}diff --git a/frontend/.prettierrc b/frontend/.prettierrcindex eec7ca31..48fa5990 100644--- a/frontend/.prettierrc+++ b/frontend/.prettierrc@@ -1,6 +1,6 @@{"singleQuote": true,- "printWidth": 150,+ "printWidth": 250,"trailingComma": "all","endOfLine": "lf","arrowParens": "avoid"diff --git a/frontend/bun.lockb b/frontend/bun.lockbindex 1a88a2cb..af6681e9 100755Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differdiff --git a/frontend/components/DHeader.vue b/frontend/components/DHeader.vueindex fe80764b..e0519787 100644--- a/frontend/components/DHeader.vue+++ b/frontend/components/DHeader.vue@@ -1,11 +1,11 @@<template>- <nav aria-label="breadcrumb">- <ol class="breadcrumb">- <li v-for="(segment, index) in breadcrumbs" :key="index" class="breadcrumb-item">- <NuxtLink :to="segment.path"> {{ segment.name }} </NuxtLink>- </li>- </ol>- </nav>+ <nav aria-label="breadcrumb">+ <ol class="breadcrumb">+ <li v-for="(segment, index) in breadcrumbs" :key="index" class="breadcrumb-item">+ <NuxtLink :to="segment.path"> {{ segment.name }} </NuxtLink>+ </li>+ </ol>+ </nav></template><script setup lang="ts">@@ -13,47 +13,46 @@ import type { RouteLocation } from 'vue-router';const route: RouteLocation = useRoute();const router = useRouter();-const breadcrumbs: Ref<Array<{ name: string, path: string }>> = ref([]);+const breadcrumbs: Ref<Array<{ name: string; path: string }>> = ref([]);declare module 'vue-router' {- interface RouteMeta {- breadcrumb: () => string;- }+ interface RouteMeta {+ breadcrumb: () => string;+ }}watchEffect(() => {- breadcrumbs.value = [];- route.matched.forEach((match) => {- let name = '';- if (typeof match.meta.breadcrumb == 'function') name = match.meta.breadcrumb();- else if (typeof match.meta.breadcrumb == 'string') name = match.meta.breadcrumb;- if (!name) return;- const r = router.resolve(match);- breadcrumbs.value.push({- name,- path: r.path- });- });--})+ breadcrumbs.value = [];+ route.matched.forEach(match => {+ let name = '';+ if (typeof match.meta.breadcrumb == 'function') name = match.meta.breadcrumb();+ else if (typeof match.meta.breadcrumb == 'string') name = match.meta.breadcrumb;+ if (!name) return;+ const r = router.resolve(match);+ breadcrumbs.value.push({+ name,+ path: r.path,+ });+ });+});</script><style scoped>.breadcrumb {- display: flex;- flex-wrap: wrap;- padding: 0;- list-style: none;- border-radius: 0.25rem;- font-family: Inter;+ display: flex;+ flex-wrap: wrap;+ padding: 0;+ list-style: none;+ border-radius: 0.25rem;+ font-family: Inter;}-.breadcrumb-item+.breadcrumb-item::before {- content: "/";- padding: 0 0.5rem;+.breadcrumb-item + .breadcrumb-item::before {+ content: '/';+ padding: 0 0.5rem;}.breadcrumb-item a {- font-size: 20px;- font-weight: 600;+ font-size: 20px;+ font-weight: 600;}</style>diff --git a/frontend/components/DataTable.vue b/frontend/components/DataTable.vueindex c1fcb096..091fbadf 100644--- a/frontend/components/DataTable.vue+++ b/frontend/components/DataTable.vue@@ -1,161 +1,226 @@<template>- <div class="container">- <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">- <path- d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" />- </svg>- <input type="text" placeholder="Search" v-model="searchInput" />- <table>- <thead>- <tr>- <th v-for="(header, index) in headers" :key="index" :class="{ noMobile: index > 1 }">- {{ header.title }}- </th>- </tr>- </thead>- <tbody>- <tr v-for="(row, index) in data" :key="index">- <td v-for=" (field, index) in row.fields" :key="index" :class="{ noMobile: index > 1 }">- <span v-if="!field.action" v-text="field.content"></span>- <span v-else>- <NuxtLink :to="field.action" type="button" v-text="field.content">- </NuxtLink>- </span>- </td>- </tr>- <tr>- <td colspan="100%">- <div class="actions-bar">- <div class="left">- <button type="button" @click="page--"><Previous</button>- <button type="button" @click="page++">Next></button>- </div>- <div class="right">- <span>Items per page</span>- <select v-model="itemsPerPage">- <option value="15">15</option>- <option value="30">30</option>- <option value="50">50</option>- <option value="100">100</option>- <option value="250">250</option>- </select>- </div>- </div>- </td>- </tr>- </tbody>- </table>- </div>+ <div class="container">+ <div class="header">+ <input type="text" v-model="searchInput" placeholder="Search..." />+ <div>+ <span>Rows per page</span>+ <select @change="(e: Event) => paginator.setMaxPerPage(parseInt((<HTMLSelectElement>e.target)?.value) || 10)">+ <option value="10">10</option>+ <option value="30">30</option>+ <option value="50">50</option>+ <option value="100">100</option>+ <option value="250">250</option>+ </select>+ </div>+ </div>+ <table>+ <thead>+ <tr>+ <th v-for="header in headers" :key="header.key">+ {{ header.label }}+ </th>+ </tr>+ </thead>+ <tbody>+ <tr v-for="row in data">+ <td v-for="header in headers">+ <span v-if="row[header.key]?.type === 'html'" v-html="row[header.key]?.content"></span>+ <NuxtLink v-else-if="row[header.key]?.type === 'link'" v-html="row[header.key]?.content" :to="row[header.key]?.to"></NuxtLink>+ <span v-else v-text="row[header.key]?.content"></span>+ </td>+ </tr>+ <tr>+ <td colspan="100%">+ <div class="footer">+ <p>Showing {{ paginator.startIndex.value }} to {{ paginator.endIndex.value }} of {{ paginator.totalItems.value }} entries</p>+ <div class="pagination">+ <button type="button" @click="paginator.previous()" :disabled="!paginator.hasPrevious()"><</button>+ <button v-if="shouldShowPage(1)" @click="paginator.setPage(1)" :class="{ active: paginator.currentPage.value === 1 }">1</button>+ <span v-if="shouldShowEllipsisBefore" class="ellipsis">...</span>+ <button v-for="page in visiblePages" :key="page" @click="paginator.setPage(page)" :class="{ active: paginator.currentPage.value === page }">{{ page }}</button>+ <span v-if="shouldShowEllipsisAfter" class="ellipsis">...</span>+ <button v-if="shouldShowPage(paginator.totalPages.value)" @click="paginator.setPage(paginator.totalPages.value)" :class="{ active: paginator.currentPage.value === paginator.totalPages.value }">{{ paginator.totalPages.value }}</button>+ <button type="button" @click="paginator.next()" :disabled="!paginator.hasNext()">></button>+ </div>+ </div>+ </td>+ </tr>+ </tbody>+ </table>+ </div></template>-<script lang="ts" setup>--const props = defineProps<{ headers: Header[], rows: Row[] }>()-const itemsPerPage = ref(15)-const page = ref(1)-const searchInput = ref('')--const data = computed(() => {- return props.rows.filter((row) => {- return row.fields.some((field) => {- return field.content.toLowerCase().includes(searchInput.value.toLowerCase())- })- }).slice((page.value - 1) * itemsPerPage.value, page.value * itemsPerPage.value)-})+import { Paginator } from '../helpers/paginator';+const props = defineProps<{ headers: Header[]; rows: Field[] }>();+const itemsPerPage = ref(10);+const searchInput = ref('');++const paginator = new Paginator<Field>(+ computed(() => props.rows),+ itemsPerPage.value,+);+paginator.filter(row => {+ return Object.values(row).some(value => value.content.toLowerCase().includes(searchInput.value.toLowerCase()));+});+const data = paginator.currentPageItems;++const maxVisiblePages = 3; // Number of pages to show around the current page++const visiblePages = computed(() => {+ const totalPages = paginator.totalPages.value;+ const currentPage = paginator.currentPage.value;+ const startPage = Math.max(2, currentPage - Math.floor(maxVisiblePages / 2));+ const endPage = Math.min(totalPages - 1, currentPage + Math.floor(maxVisiblePages / 2));+ const pages = Int16Array.from({ length: endPage - startPage + 1 }, (_, index) => startPage + index);+ return pages;+});++const shouldShowPage = (page: number) => page === 1 || page === paginator.totalPages.value;++const shouldShowEllipsisAfter = computed(() => {+ const lastVisiblePage = visiblePages.value[visiblePages.value.length - 1];+ return lastVisiblePage !== undefined && lastVisiblePage < paginator.totalPages.value - 1;+});+const shouldShowEllipsisBefore = computed(() => {+ const firstVisiblePage = visiblePages.value[0];+ return firstVisiblePage !== undefined && firstVisiblePage > 2;+});interface Header {- title: string;-}-interface Row {- fields: Field[];+ key: string;+ label: string;}interface Field {- content: string;- action?: string;+ [key: string]: {+ content: string;+ type?: 'html' | 'text' | 'link';+ to?: string;+ };}</script>+<style lang="scss" scoped>.container {- position: relative;- zoom: 0.7;+ border-radius: 15px;+ border: 1.5px solid var(--border-color);+ width: 100%;+}++.header {+ display: flex;+ justify-content: space-between;+ align-items: center;+ padding: 0 8px;}table {- width: 100%;+ width: 100%;+ border-collapse: collapse;+ table-layout: fixed;+ border-color: inherit;+}++th,+td {+ padding: 10px;+ text-align: left;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ width: 100%;}th {- text-align: left;+ color: var(--font-color-dark);+ border-top: 1px solid var(--border-color);}-button {- margin-right: 20px;- padding: 0.1rem 0.25rem;- font-size: 1rem;+td {+ color: var(--font-color-light);}-.noMobile {- display: none;+tr {+ border-bottom: 1px solid var(--border-color);}button {- background-color: $primary-400;- color: #fff;+ margin-right: 20px;+ padding: 0.1rem 0.25rem;+ font-size: 1rem;+ border: none;+ cursor: pointer;+ border-radius: 5px;++ &:disabled {+ background-color: var(--disabled-color);+ cursor: not-allowed;+ }++ &:hover,+ &.active {+ transform: none;+ font-weight: bold;+ }}-.actions-bar {- display: flex;- width: 100%;- justify-content: space-between;-- select {- max-width: 100px;- margin: 0;- margin-left: 10px;- }+.pagination {+ display: flex;+ justify-content: center;+ align-items: center;+}- .left,- .right {- display: flex;- align-items: center;- width: 100%;- }+.pagination button {+ margin: 0 5px;+}- .left {- justify-content: flex-start;- }+.pagination .active {+ background-color: var(--active-color);+}- .right {- justify-content: flex-end;- }+.footer {+ display: flex;+ width: 100%;+ justify-content: space-between;}+select {+ max-width: 100px;+ margin: 0;+ margin-left: 10px;+ padding: 0;+}svg {- position: absolute;- top: 13px;- left: 13px;- fill: var(--grey);+ position: absolute;+ top: 13px;+ left: 13px;+ fill: var(--grey);}input {- height: 50px;- padding: 0 0 0 45px;- outline: none;- border-radius: 10px;+ max-width: 300px;+ margin: 8px 5px;+ padding: 0.5rem;+ border: 1px solid var(--border-color);+ border-radius: 5px;+}++.ellipsis {+ margin: 0 5px;+ color: var(--font-color-dark);}@media screen and (min-width: 1000px) {- .container {- zoom: 1;- }+ .container {+ zoom: 1;+ }- .noMobile {- display: table-cell;- }+ .noMobile {+ display: table-cell;+ }- table {- zoom: 1;- }+ table {+ zoom: 1;+ }}-</style>\ No newline at end of file+</style>diff --git a/frontend/components/DocumentCardFooter.vue b/frontend/components/DocumentCardFooter.vueindex 2d383fee..2e2a2c1e 100644--- a/frontend/components/DocumentCardFooter.vue+++ b/frontend/components/DocumentCardFooter.vue@@ -5,7 +5,8 @@viewBox="0 -960 960 960" width="24"><pathd="M180-120q-24 0-42-18t-18-42v-600q0-24 18-42t42-18h405l-60 60H180v600h600v-348l60-60v408q0 24-18 42t-42 18H180Zm300-360ZM360-360v-170l382-382q9-9 20-13t22-4q11 0 22.317 4.5T827-911l83 84q8.609 8.958 13.304 19.782Q928-796.394 928-785.197q0 11.197-4.5 22.697T910-742L530-360H360Zm508-425-84-84 84 84ZM420-420h85l253-253-43-42-43-42-252 251v86Zm295-295-43-42 43 42 43 42-43-42Z" />- </svg> Edit this page</NuxtLink>+ </svg>+ Edit this page</NuxtLink><p>Last update: {{ new Date(parseInt(document.updated_timestamp)).toLocaleDateString() }}</p></div><div class="items">@@ -22,8 +23,8 @@</template><script lang="ts" setup>-import type { Document } from "@/store";-defineProps<{ document: Document; next?: Document; previous?: Document; }>();+import type { Document } from '@/store';+defineProps<{ document: Document; next?: Document; previous?: Document }>();</script><style scoped lang="scss">@@ -36,7 +37,6 @@ footer {display: flex;justify-content: space-between;}-}.item {@@ -49,7 +49,7 @@ footer {margin: 5px 0;font-weight: 500;font-size: 15px;- transition: color .25s;+ transition: color 0.25s;b {display: block;@@ -60,7 +60,6 @@ footer {}}-.right {margin-left: auto;text-align: right;@@ -90,4 +89,8 @@ footer {}}}-</style>\ No newline at end of file++svg {+ fill: var(--font-color);+}+</style>diff --git a/frontend/components/DocumentCardHeader.vue b/frontend/components/DocumentCardHeader.vueindex 25980bd0..d0d33580 100644--- a/frontend/components/DocumentCardHeader.vue+++ b/frontend/components/DocumentCardHeader.vue@@ -7,7 +7,7 @@<h1 class="title">{{ doc?.name }}</h1><p class="description">{{ doc?.description }}</p><div class="document-tags" v-if="doc.tags">- <span v-for="tag in doc.tags.split(',')" :key="tag" class="tag">{{ tag.trim() }}</span>+ <span v-for="tag in doc.tags.split(',')" :key="tag" class="tag blue">{{ tag.trim() }}</span></div></div><div class="icon">@@ -156,16 +156,6 @@ p {flex-wrap: wrap;}-.tag {- border-color: var(--blue-border);- color: var(--blue);- background-color: var(--blue-bg);- padding: 2px 5px;- border-radius: 8px;- margin-right: 5px;- margin-bottom: 5px;- font-size: 12px;-}@media print,screen and (min-width: 1024px) {diff --git a/frontend/components/Logo.vue b/frontend/components/Logo.vueindex 9a0c6659..0c2a1139 100644--- a/frontend/components/Logo.vue+++ b/frontend/components/Logo.vue@@ -1,10 +1,10 @@<script setup lang="ts">-const colorMode = useColorMode()+const colorMode = useColorMode();</script><template>- <div style="display:flex;align-items: center;column-gap: 0.5rem;">- <img style="width:50px" :src="`/Alexandrie-${colorMode.value}.svg`" alt="Alexandrie">- <p style="font-weight: 600;font-family: Poppins;">Alexandrie</p>+ <div style="display: flex; align-items: center; column-gap: 0.5rem">+ <img style="width: 50px" :src="`/Alexandrie-${colorMode.value}.svg`" alt="Alexandrie" />+ <p style="font-weight: 600; font-family: Poppins">Alexandrie</p></div>-</template>\ No newline at end of file+</template>diff --git a/frontend/components/MarkdownEditor/InlineToolbar.vue b/frontend/components/MarkdownEditor/InlineToolbar.vueindex a45dfbf2..a72ef76e 100644--- a/frontend/components/MarkdownEditor/InlineToolbar.vue+++ b/frontend/components/MarkdownEditor/InlineToolbar.vue@@ -1,28 +1,75 @@<template><div class="i_toolbar" ref="element"><div class="i_toolbar_swatches">- <button class="swatch blue" @click="emitAction('blue')"></button>- <button class="swatch green" @click="emitAction('green')"></button>- <button class="swatch red" @click="emitAction('red')"></button>+ <button class="swatch blue" @click="emitAction('blue')"></button>+ <button class="swatch green" @click="emitAction('green')"></button>+ <button class="swatch red" @click="emitAction('red')"></button><button class="swatch yellow" @click="emitAction('yellow')"></button>- <button class="swatch pink" @click="emitAction('pink')"></button>+ <button class="swatch pink" @click="emitAction('pink')"></button></div><div class="i_toolbar_buttons">- <button @click="emitAction('bold')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11"></path></svg>+ <button @click="emitAction('bold')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2"+ d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11">+ </path>+ </svg></button>- <button @click="emitAction('italic')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"></path></svg>+ <button @click="emitAction('italic')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17">+ </path>+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"></path>+ </svg></button>- <button @click="emitAction('strike')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.5 8.50001C13.5 7 10.935 6.66476 9.75315 7.79706C9.27092 8.25909 9 8.88574 9 9.53915C9 10.1926 9.27092 10.8192 9.75315 11.2812C10.9835 12.46 13.0165 11.5457 14.2468 12.7244C14.7291 13.1865 15 13.8131 15 14.4665C15 15.1199 14.7291 15.7466 14.2468 16.2086C12.8659 17.5317 10 17.5 9 16"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 12H18"/></svg>+ <button @click="emitAction('strike')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"+ d="M14.5 8.50001C13.5 7 10.935 6.66476 9.75315 7.79706C9.27092 8.25909 9 8.88574 9 9.53915C9 10.1926 9.27092 10.8192 9.75315 11.2812C10.9835 12.46 13.0165 11.5457 14.2468 12.7244C14.7291 13.1865 15 13.8131 15 14.4665C15 15.1199 14.7291 15.7466 14.2468 16.2086C12.8659 17.5317 10 17.5 9 16" />+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 12H18" />+ </svg></button>- <button @click="emitAction('underline')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 7.5V11.5C9 12.2956 9.31607 13.0587 9.87868 13.6213C10.4413 14.1839 11.2044 14.5 12 14.5C12.7956 14.5 13.5587 14.1839 14.1213 13.6213C14.6839 13.0587 15 12.2956 15 11.5V7.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7.71429 18H16.2857"/></svg>+ <button @click="emitAction('underline')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"+ fill="none" viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"+ d="M9 7.5V11.5C9 12.2956 9.31607 13.0587 9.87868 13.6213C10.4413 14.1839 11.2044 14.5 12 14.5C12.7956 14.5 13.5587 14.1839 14.1213 13.6213C14.6839 13.0587 15 12.2956 15 11.5V7.5" />+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"+ d="M7.71429 18H16.2857" />+ </svg></button>- <button @click="emitAction('link')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"></path></svg>+ <button @click="emitAction('link')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2"+ d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12">+ </path>+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2"+ d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72">+ </path>+ </svg></button>- <button @click="emitAction('quote')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.5 8L6.11524 11.8683C6.04926 11.9437 6.04926 12.0563 6.11524 12.1317L9.5 16"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15 8L18.3848 11.8683C18.4507 11.9437 18.4507 12.0563 18.3848 12.1317L15 16"></path></svg>+ <button @click="emitAction('quote')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2"+ d="M9.5 8L6.11524 11.8683C6.04926 11.9437 6.04926 12.0563 6.11524 12.1317L9.5 16"></path>+ <path stroke="currentColor" stroke-linecap="round" stroke-width="2"+ d="M15 8L18.3848 11.8683C18.4507 11.9437 18.4507 12.0563 18.3848 12.1317L15 16"></path>+ </svg></button>- <button @click="emitAction('code')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17C7 17 7 15.2536 7 13.5L5.5 12L7 10.5C7 8.74644 7 7 9 7"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17C17 17 17 15.2536 17 13.5L18.5 12L17 10.5C17 8.74644 17 7 15 7"/></svg>+ <button @click="emitAction('code')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"+ d="M9 17C7 17 7 15.2536 7 13.5L5.5 12L7 10.5C7 8.74644 7 7 9 7" />+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"+ d="M15 17C17 17 17 15.2536 17 13.5L18.5 12L17 10.5C17 8.74644 17 7 15 7" />+ </svg></button>- <button @click="emitAction('clear')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M11.3536 9.31802L12.7678 7.90381C13.5488 7.12276 14.8151 7.12276 15.5962 7.90381C16.3772 8.68486 16.3772 9.95119 15.5962 10.7322L14.182 12.1464M11.3536 9.31802L7.96729 12.7043C7.40889 13.2627 7.02827 13.9739 6.8734 14.7482L6.69798 15.6253C6.55804 16.325 7.17496 16.942 7.87468 16.802L8.75176 16.6266C9.52612 16.4717 10.2373 16.0911 10.7957 15.5327L14.182 12.1464M11.3536 9.31802L14.182 12.1464"></path><line x1="15" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"></line></svg>+ <button @click="emitAction('clear')"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"+ viewBox="0 0 24 24">+ <path stroke="currentColor" stroke-width="2"+ d="M11.3536 9.31802L12.7678 7.90381C13.5488 7.12276 14.8151 7.12276 15.5962 7.90381C16.3772 8.68486 16.3772 9.95119 15.5962 10.7322L14.182 12.1464M11.3536 9.31802L7.96729 12.7043C7.40889 13.2627 7.02827 13.9739 6.8734 14.7482L6.69798 15.6253C6.55804 16.325 7.17496 16.942 7.87468 16.802L8.75176 16.6266C9.52612 16.4717 10.2373 16.0911 10.7957 15.5327L14.182 12.1464M11.3536 9.31802L14.182 12.1464">+ </path>+ <line x1="15" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"></line>+ </svg></button></div></div>@@ -53,45 +100,58 @@ defineExpose({ element })padding: 0;}}+.i_toolbar_swatches {display: flex;gap: 5px;+.swatch {width: 20px;height: 20px;border-radius: 50%;+&:hover {outline-offset: 1px;}}+.blue {background-color: var(--blue);+&:hover {outline: 2px solid var(--blue);}}+.green {background-color: var(--green);+&:hover {outline: 2px solid var(--green);}}+.red {background-color: var(--red);+&:hover {outline: 2px solid var(--red);}}+.yellow {background-color: var(--yellow);+&:hover {outline: 2px solid var(--yellow);}}+.pink {- background-color: var(--pink);+ background-color: var(--red);+&:hover {- outline: 2px solid var(--pink);+ outline: 2px solid var(--red);}}}diff --git a/frontend/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/components/MarkdownEditor/LazyMarkdownEditor.vueindex eae79957..f450e5a8 100644--- a/frontend/components/MarkdownEditor/LazyMarkdownEditor.vue+++ b/frontend/components/MarkdownEditor/LazyMarkdownEditor.vue@@ -99,6 +99,11 @@ input,padding-left: 0;}+input {+ display: block;+ width: 100%;+}+[placeholder]:empty::before {content: attr(placeholder);color: #757575;diff --git a/frontend/components/MarkdownEditor/LazyToolbar.vue b/frontend/components/MarkdownEditor/LazyToolbar.vueindex c17dacd0..a0ca6d6f 100644--- a/frontend/components/MarkdownEditor/LazyToolbar.vue+++ b/frontend/components/MarkdownEditor/LazyToolbar.vue@@ -107,6 +107,7 @@ button {user-select: none;display: flex;align-items: stretch;+ flex-wrap: wrap;}svg,diff --git a/frontend/components/ThemeToggle.vue b/frontend/components/ThemeToggle.vueindex a0daed5f..9aca60e5 100644--- a/frontend/components/ThemeToggle.vue+++ b/frontend/components/ThemeToggle.vue@@ -24,7 +24,7 @@<script setup lang="ts">const colorMode = useColorMode();-const toggleColorMode = () => colorMode.value === 'light' ? colorMode.preference = 'dark' : colorMode.preference = 'light';+const toggleColorMode = () => (colorMode.value === 'light' ? (colorMode.preference = 'dark') : (colorMode.preference = 'light'));</script><style scoped lang="scss">@@ -32,4 +32,4 @@ svg {width: 25px;height: 25px;}-</style>\ No newline at end of file+</style>diff --git a/frontend/components/sidebar/helpers.ts b/frontend/components/sidebar/helpers.tsindex 81c7de62..cb761c0a 100644--- a/frontend/components/sidebar/helpers.ts+++ b/frontend/components/sidebar/helpers.ts@@ -54,7 +54,7 @@ export const icons = {'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path style="fill:var(--turquoise)" d="M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z"/></svg>',folder:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path style="fill:var(--yellow);" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640H447l-80-80H160v480l96-320h684L837-217q-8 26-29.5 41.5T760-160H160Zm84-80h516l72-240H316l-72 240Zm0 0 72-240-72 240Zm-84-400v-80 80Z"/></svg>',- file: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path style="fill:var(--pink);" d="M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z"/></svg>',+ file: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path style="fill:var(--red);" d="M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z"/></svg>',file_parent:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" ><path style="fill:var(--green);" d="M320-320h200v-200H320v200Zm0-280h480v-200H320v200Zm280 280h200v-200H600v200Zm-280 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Z"/></svg>',archive:diff --git a/frontend/composables/utils.ts b/frontend/composables/utils.tsindex 0bdf6e2f..a0c2351d 100644--- a/frontend/composables/utils.ts+++ b/frontend/composables/utils.ts@@ -1,4 +1,4 @@-const colors = ['var(--blue)', 'var(--turquoise)', 'var(--yellow)', 'var(--pink)', 'var(--red)'];+const colors = ['var(--blue)', 'var(--turquoise)', 'var(--yellow)', 'var(--red)', 'var(--red)'];export function useColorHash(str: string): string {// Calculer un hash unique pour la chaîne@@ -53,7 +53,6 @@ export async function makeRequest(}const decoded = await response.json();- console.log('[SUCCESS] Response data:', decoded);return decoded;}diff --git a/frontend/helpers/markdown/constants.ts b/frontend/helpers/markdown/constants.tsindex 641a1892..500ae4e8 100644--- a/frontend/helpers/markdown/constants.ts+++ b/frontend/helpers/markdown/constants.ts@@ -3,15 +3,8 @@ const svg_warning = `<svg style="align-self: center;" class="svg-icon" viewBox="function containerOpen(title: string, logo: string, color: string) {return `<div class="markdown-container">- <strong style="display: inline-flex; align-items: baseline;" class="${color}">+ <strong style="display: inline-flex; align-items: baseline;" class="${color} title">${logo}${title}</strong>`;}-function containerOpenInline(title: string, logo: string, color: string) {- return `<div :class="color" style="display: inline-block;">- <span style="display: inline-flex; align-items: baseline;" class="${color}">- ${logo}${title}- </span>- `;-}-export { svg_info, svg_warning, containerOpen, containerOpenInline };+export { svg_info, svg_warning, containerOpen };diff --git a/frontend/helpers/paginator.ts b/frontend/helpers/paginator.tsnew file mode 100644index 00000000..9fdb4cf6--- /dev/null+++ b/frontend/helpers/paginator.ts@@ -0,0 +1,80 @@+export class Paginator<T> {+ private data: Ref<T[]>;+ private maxPerPage: Ref<number>;+ public currentPage: Ref<number>;+ private filterCallback?: (item: T) => boolean;++ constructor(data: Ref<T[]>, maxPerPage: number = 5, currentPage: number = 1) {+ this.data = data;+ this.maxPerPage = ref(maxPerPage);+ this.currentPage = ref(currentPage);+ }++ public setPage(page: number): void {+ if (page >= 1 && page <= this.totalPages.value) {+ this.currentPage.value = page;+ }+ }++ public hasNext(): boolean {+ return this.currentPage.value < this.totalPages.value;+ }++ public hasPrevious(): boolean {+ return this.currentPage.value > 1;+ }++ public next(): void {+ if (this.hasNext()) {+ this.currentPage.value += 1;+ }+ }++ public previous(): void {+ if (this.hasPrevious()) {+ this.currentPage.value -= 1;+ }+ }+ public filter(filterCallback: (item: T) => boolean): void {+ this.filterCallback = filterCallback;+ this.setPage(1); // Reset to the first page+ }+ public get currentPageItems() {+ return computed(() => {+ const filteredData = this.data.value.filter(this.filterCallback || (() => true));+ const start = (this.currentPage.value - 1) * this.maxPerPage.value;+ const end = start + this.maxPerPage.value;+ return filteredData.slice(start, end);+ });+ }+ public get startIndex() {+ return computed(() => (this.currentPage.value - 1) * this.maxPerPage.value + 1);+ }+ public get endIndex() {+ return computed(() => {+ const end = this.currentPage.value * this.maxPerPage.value;+ return end > this.data.value.length ? this.data.value.length : end;+ });+ }+ public get totalItems() {+ return computed(() => this.data.value.length);+ }++ public get totalPages() {+ return computed(() => Math.ceil(this.data.value.length / this.maxPerPage.value));+ }++ public setMaxPerPage(maxPerPage: number): void {+ this.maxPerPage.value = maxPerPage;+ this.setPage(1); // Reset to the first page+ }++ public addData(newData: T[]): void {+ this.data.value = this.data.value.concat(newData);+ }++ public setData(newData: T[]): void {+ this.data.value = newData;+ this.setPage(1); // Reset to the first page+ }+}diff --git a/frontend/package.json b/frontend/package.jsonindex e7ad740a..bdf06dd0 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -32,6 +32,7 @@},"type": "module","dependencies": {+ "array-paginator": "^2.0.0","markdown-it-highlightjs": "^4.1.0"}}diff --git a/frontend/pages/dashboard.vue b/frontend/pages/dashboard.vueindex e921c4e2..4391b1f1 100644--- a/frontend/pages/dashboard.vue+++ b/frontend/pages/dashboard.vue@@ -9,7 +9,5 @@</template><script setup lang="ts">import Sidebar from '~/components/sidebar/Sidebar.vue';-definePageMeta({- breadcrumb: () => 'Dashboard'-});+definePageMeta({ breadcrumb: 'Dashboard' });</script>\ No newline at end of filediff --git a/frontend/pages/dashboard/categories.vue b/frontend/pages/dashboard/categories.vueindex ac64f914..360f9462 100644--- a/frontend/pages/dashboard/categories.vue+++ b/frontend/pages/dashboard/categories.vue@@ -3,7 +3,5 @@</template><script setup lang="ts">-definePageMeta({- breadcrumb: () => "Categories"-});+definePageMeta({ breadcrumb: "Categories" });</script>diff --git a/frontend/pages/dashboard/categories/[id].vue b/frontend/pages/dashboard/categories/[id].vueindex b9de0c8a..62830cd3 100644--- a/frontend/pages/dashboard/categories/[id].vue+++ b/frontend/pages/dashboard/categories/[id].vue@@ -10,7 +10,7 @@<p class="document-description">{{ document.description }}</p></div><div class="document-tags" v-if="document.tags">- <span v-for="tag in document.tags.split(',')" :key="tag" class="tag">{{ tag.trim() }}</span>+ <span v-for="tag in document.tags.split(',')" :key="tag" class="tag blue">{{ tag.trim() }}</span></div><footer class="document-footer"><div class="footer-item">@@ -22,7 +22,7 @@<span>{{ formatDate(parseInt(document.created_timestamp)) }}</span></div><div class="footer-item">- <span>Mis à jour: {{ formatDate(parseInt(document.updated_timestamp)) }}</span>+ <span>Updated : {{ formatDate(parseInt(document.updated_timestamp)) }}</span></div></footer></div>@@ -85,10 +85,6 @@ h1 {flex: 0 1 auto;}-.document-card:hover {- transform: scale(1.02);-}-.document-header {background-color: var(--bg-contrast-2);padding: 15px;@@ -119,17 +115,6 @@ h1 {flex-wrap: wrap;}-.tag {- border-color: var(--blue-border);- color: var(--blue);- background-color: var(--blue-bg);- padding: 2px 5px;- border-radius: 8px;- margin-right: 5px;- margin-bottom: 5px;- font-size: 12px;-}-.document-footer {padding: 15px;background-color: var(--bg-contrast);@@ -137,7 +122,7 @@ h1 {flex-direction: column;font-size: 14px;color: #777;- border-top: 1px solid #eaeaea;+ border-top: 1px solid var(--border-color);}.footer-item {diff --git a/frontend/pages/dashboard/cdn.vue b/frontend/pages/dashboard/cdn.vueindex 666b6274..89e583ef 100644--- a/frontend/pages/dashboard/cdn.vue+++ b/frontend/pages/dashboard/cdn.vue@@ -32,7 +32,7 @@</div></div><div v-else>- Aucune ressource disponible.+ No ressource found.</div></div></template>diff --git a/frontend/pages/dashboard/docs.vue b/frontend/pages/dashboard/docs.vueindex 01c45b04..b178f3c7 100644--- a/frontend/pages/dashboard/docs.vue+++ b/frontend/pages/dashboard/docs.vue@@ -3,7 +3,5 @@</template><script setup lang="ts">-definePageMeta({- breadcrumb: () => "Documents"-});+definePageMeta({ breadcrumb: "Documents" });</script>diff --git a/frontend/pages/dashboard/docs/index.vue b/frontend/pages/dashboard/docs/index.vueindex e7c4e5fe..0bc77e32 100644--- a/frontend/pages/dashboard/docs/index.vue+++ b/frontend/pages/dashboard/docs/index.vue@@ -1,5 +1,5 @@<template>- <h2 style="text-align: center;">Rechercher un document</h2>+ <h2 style="text-align: center;">Search documents</h2><DataTable :headers="headers" :rows="rows" /></template>@@ -9,21 +9,36 @@ import { useDocumentsStore, useCategoriesStore } from '~/store';const documents = computed(() => useDocumentsStore().getAll)const categoriesStore = useCategoriesStore();const headers = [- { title: 'Name' },- { title: 'Category' },- { title: 'Created At' },- { title: 'Updated At' },- { title: 'Actions' },+ { label: 'Name', key: 'name' },+ { label: 'Category', key: 'category' },+ { label: 'Tags', key: 'tags' },+ { label: 'Last update', key: 'last_update' },+ { label: 'Status', key: 'status' },+ { label: 'Actions', key: 'actions' },];const rows = computed(() => documents.value.map((doc) => {+ let badges = '';+ switch (doc.accessibility) {+ case 1:+ badges = '<span class="tag green">Document</span>';+ break;+ case 2:+ badges = '<span class="tag turquoise">Draft</span>';+ break;+ case 3:+ badges = '<span class="tag red">Archived</span>';+ }+ if (doc.parent_id) badges += '<span class="tag yellow">Child</span>';+ if (documents.value.some(d => d.parent_id === doc.id)) badges += '<span class="tag yellow">Parent</span>';+ const seeIcon = ` <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" style="margin:0 5px;" fill="var(--font-color-light)"><path d="M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"/></svg>`;+ const editIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" style="margin:0 5px;" fill="var(--font-color-light)"><path 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>`return {- fields: [- { content: doc.name, action: `/dashboard/docs/${doc.id}` },- { content: categoriesStore.getById(doc.category || '')?.name || '', action: `/dashboard/categories/${doc.category}` },- { content: new Date(parseInt(doc.created_timestamp)).toDateString() },- { content: new Date(parseInt(doc.updated_timestamp)).toDateString() },- { content: 'View document', action: `/dashboard/docs/${doc.id}` },- ],+ name: { content: doc.name, type: 'link', to: `/dashboard/docs/${doc.id}` },+ category: { content: categoriesStore.getById(doc.category || '')?.name || '' },+ tags: { content: doc.tags?.trim().length ? doc.tags?.trim().split(',').map(t => `<span class="tag blue">${t.trim()}</span>`).join('') : '', type: 'html' },+ last_update: { content: new Date(parseInt(doc.updated_timestamp)).toDateString() },+ status: { content: badges, type: 'html' },+ actions: { content: seeIcon + editIcon, type: 'link', to: `/dashboard/docs/${doc.id}` },};}));</script>diff --git a/frontend/styles/_variables.scss b/frontend/styles/_variables.scssindex 290f403e..cd4fb2f8 100644--- a/frontend/styles/_variables.scss+++ b/frontend/styles/_variables.scss@@ -29,7 +29,9 @@ $transition-duration: 0.3s;--bg-contrast: #F1F6FD;--bg-contrast-2: #ECF2FF;--selection-color: #e1f2ff;- --font-color: #111;+ --font-color: rgb(51, 65, 85);+ --font-color-dark: #333;+ --font-color-light: rgb(100, 116, 139);--border-color: rgba(0, 0, 0, 0.1);// COLORS \\--grey: #666;@@ -40,7 +42,7 @@ $transition-duration: 0.3s;--green: #009879;--green-bg: rgba(40, 167, 69, 0.15);--green-border: rgba(40, 167, 69, 0.3);- --red: #DC3545;+ --red: #FF204E;--red-bg: rgba(220, 53, 69, 0.15);--red-border: rgba(220, 53, 69, 0.3);--yellow: #F97300;@@ -50,37 +52,38 @@ $transition-duration: 0.3s;--turquoise-bg: rgba(23, 162, 184, 0.2);--turquoise-border: rgba(23, 162, 184, 0.25);- --pink: #FF204E;--info-border: #2573cf;}--.dark-mode {- --bg-color: #242424;- --bg-contrast: #2e3034;- --bg-contrast-2: #2b2d31;+ --bg-color: #252A34;+ --bg-contrast: #333a44;+ --bg-contrast-2: #4e545e;--selection-color: #4a90e2;- --font-color: #ddd;+ --font-color: rgb(229, 229, 229);+ --font-color-dark: #ccc;+ --font-color-light: rgb(179, 179, 179);--border-color: rgba(255, 255, 255, 0.1);+// COLORS \\--grey: #e0e0e0;--grey-bg: rgb(47, 47, 47);--blue: #47a6ff;--blue-bg: rgb(0, 140, 216, 0.2);--blue-border: rgba(0, 140, 216, 0.25);- --green: #03C988;- --green-bg: rgba(66, 184, 131, 0.2);- --green-border: rgba(66, 184, 131, 0.25);- --red: #ff4882;- --red-bg: rgba(237, 60, 80, 0.2);- --red-border: rgba(237, 60, 80, .25);+ --green: #009879;+ --green-bg: rgba(40, 167, 69, 0.15);+ --green-border: rgba(40, 167, 69, 0.3);+ --red: #DC3545;+ --red-bg: rgba(220, 53, 69, 0.15);+ --red-border: rgba(220, 53, 69, 0.3);--yellow: #F97300;--yellow-bg: rgba(255, 197, 23, 0.2);--yellow-border: rgba(255, 197, 23, .25);--turquoise: #00d6b4;--turquoise-bg: rgba(0, 255, 255, 0.2);--turquoise-border: rgba(0, 209, 178, .25);+}@mixin print-theme {diff --git a/frontend/styles/document-theme.scss b/frontend/styles/document-theme.scssindex 122b00b0..f47d7bcb 100644--- a/frontend/styles/document-theme.scss+++ b/frontend/styles/document-theme.scss@@ -8,5 +8,4 @@text-decoration: underline;}}-}\ No newline at end of filediff --git a/frontend/styles/markdown.scss b/frontend/styles/markdown.scssindex 009b46aa..ae1750a0 100644--- a/frontend/styles/markdown.scss+++ b/frontend/styles/markdown.scss@@ -1,32 +1,45 @@+red {+ color: var(--red);+}++blue {+ color: var(--blue);+}++green {+ color: var(--green);+}++yellow {+ color: var(--yellow);+}++pink {+ color: var(--red);+}+.markdown-container {margin-top: 10px;+ background-color: var(--bg-contrast);+ border-radius: 4px;+ padding: 10px;&:has(.blue) {- background-color: var(--bg-contrast);border-left: 4px solid var(--blue);- border-radius: 4px;padding: 10px;}&:has(.red) {- background-color: var(--bg-contrast);border-left: 4px solid var(--red);- border-radius: 4px;- padding: 10px;}&:has(.yellow) {- background-color: var(--bg-contrast);border-left: 4px solid var(--yellow);- border-radius: 4px;- padding: 10px;}&:has(.turquoise) {background-color: var(--bg-contrast);border-left: 4px solid var(--turquoise);- border-radius: 4px;- padding: 10px;}.svg-icon {@@ -43,10 +56,8 @@vertical-align: text-bottom}- .markdown-container-title {- font-weight: 600;- color: var(--blue);- margin-right: 5px;+ .title {+ background-color: transparent;}.red {@@ -102,42 +113,38 @@color: rgba(235, 235, 235, 1);}-.custom-block.grey {+.grey {border-color: var(--grey-border);color: var(--grey);background-color: var(--grey-bg);}-.custom-block.blue {+.blue {border-color: var(--blue-border);color: var(--blue);background-color: var(--blue-bg);}-.custom-block.green {+.green {border-color: var(--green-border);color: var(--green);background-color: var(--green-bg);-- code {- background-color: var(--green-border);- }}-.custom-block.turquoise {+.turquoise {border-color: var(--turquoise-border);color: var(--turquoise);background-color: var(--turquoise-bg);}-.custom-block.yellow {+.yellow {border-color: var(--yellow-border);color: var(--yellow);background-color: var(--yellow-bg);}-.custom-block.red {+.red {border-color: var(--red-border);color: var(--red);background-color: var(--red-bg);@@ -164,7 +171,6 @@text-align: center;}-.custom-block-title {font-weight: 700;}@@ -182,8 +188,6 @@}}--.custom-block a {color: inherit;font-weight: 600;@@ -194,22 +198,10 @@opacity: 0.6;}-red {- color: var(--red);-}--blue {- color: var(--blue);-}--green {- color: var(--green);-}--yellow {- color: var(--yellow);-}--pink {- color: var(--pink);+.tag {+ padding: 2px 5px;+ border-radius: 8px;+ margin-right: 5px;+ margin-bottom: 5px;+ font-size: 12px;}\ No newline at end of filediff --git a/frontend/styles/theme.scss b/frontend/styles/theme.scssindex 026ebe21..5cf97355 100644--- a/frontend/styles/theme.scss+++ b/frontend/styles/theme.scss@@ -54,6 +54,7 @@ h2 {font-weight: 600;line-height: 1.2;padding-bottom: 10px;+ color: var(--font-color-dark)}h3,@@ -114,24 +115,18 @@ img {input,select,textarea {- width: 100%;- padding: 12px 14px;+ padding: 8px 10px;margin: 0;+ background: var(--bg-color);border: 1px solid var(--border-color);color: var(--font-color);border-radius: 6px;- background-color: var(--bg-contrast);font-size: 15px;transition: border-color $transition-duration, box-shadow $transition-duration;&:focus {box-shadow: 0 0 5px rgba(var(--primary-color-rgb), 0.2);}-- &:disabled {- opacity: 0.6;- cursor: not-allowed;- }}label {@@ -151,7 +146,7 @@ option {padding: 8px 12px;&:hover {- background-color: var(--primary-color);+ box-shadow: 0 0 10px 100px #000 inset;}}@@ -167,7 +162,6 @@ select {table {border-collapse: collapse;- margin: 25px 0;font-size: 0.9em;min-width: 400px;overflow-x: auto;