📚 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
Enhance landing page with improved design and animation
Sheita3e481cd4a5cc
diff --git a/backend/bun.lockb b/backend/bun.lockbindex 17e36373..5218c4bf 100755Binary files a/backend/bun.lockb and b/backend/bun.lockb differdiff --git a/backend/main.ts b/backend/main.tsindex 6f8743a5..506fa154 100644--- a/backend/main.ts+++ b/backend/main.ts@@ -10,4 +10,4 @@ config({const server: App = new App(constants);server.start();-export default server;+export { server };diff --git a/backend/middlewares/multer.cdn.ts b/backend/middlewares/multer.cdn.tsindex 161a83f9..ce9053a9 100644--- a/backend/middlewares/multer.cdn.ts+++ b/backend/middlewares/multer.cdn.ts@@ -1,6 +1,6 @@import multer from 'multer';import { RessourcesManager } from '../classes';-import server from '../main';+import { server } from '../main';import { MIME_TYPES_IMAGE, ACCEPTED_MIME_TYPES } from '../utils/constants';import { config } from '../config';import type { IObject } from '../types';diff --git a/backend/package.json b/backend/package.jsonindex 030b97f1..dc9d4cdf 100644--- a/backend/package.json+++ b/backend/package.json@@ -21,23 +21,23 @@"homepage": "https://github.com/Smaug6739/docs#readme","devDependencies": {"@types/bcrypt": "^5.0.2",- "@types/bun": "^1.1.8",+ "@types/bun": "^1.1.14","@types/express": "^4.17.21",- "@types/jsonwebtoken": "^9.0.6",+ "@types/jsonwebtoken": "^9.0.7","@types/multer": "^1.4.12","morgan": "^1.10.0",- "nodemon": "^3.1.4",- "typescript": "^5.5.4"+ "nodemon": "^3.1.9",+ "typescript": "^5.7.2"},"dependencies": {"bcrypt": "^5.1.1",- "dotenv": "^16.4.5",- "express": "^4.19.2",- "json-stream-stringify": "^3.1.4",+ "dotenv": "^16.4.7",+ "express": "^4.21.2",+ "json-stream-stringify": "^3.1.6","jsonwebtoken": "^9.0.2","multer": "^1.4.5-lts.1",- "mysql2": "^3.11.0",+ "mysql2": "^3.11.5","sharp": "^0.33.5",- "tslib": "^2.7.0"+ "tslib": "^2.8.1"}}diff --git a/frontend/components/AppFooter.vue b/frontend/components/AppFooter.vueindex a47bece1..024aab8f 100644--- a/frontend/components/AppFooter.vue+++ b/frontend/components/AppFooter.vue@@ -7,16 +7,38 @@<style scoped lang="scss">footer {- padding: 1rem;+ padding: 1.5rem 2rem;display: flex;justify-content: space-between;- margin: 0 30px;+ align-items: center;+ background-color: #f9f9f7;+ border-top: 1px solid #e0e0e0;+ box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.05);+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;+ color: #333;+}++footer .p2 {+ font-size: 14px;+ font-weight: 400;+ color: #7a7a7a;+}++footer .logo {+ max-width: 100px;}@media (max-width: 768px) {footer {+ flex-direction: column;+ align-items: center;+ text-align: center;+ padding: 2rem 1rem;margin: 0;- padding: 0;+ }++ footer .p2 {+ margin-top: 1rem;}}</style>diff --git a/frontend/components/MarkdownEditor/MarkdownEditor.vue b/frontend/components/MarkdownEditor/MarkdownEditor.vueindex c922da29..9b39ef98 100644--- a/frontend/components/MarkdownEditor/MarkdownEditor.vue+++ b/frontend/components/MarkdownEditor/MarkdownEditor.vue@@ -1,12 +1,14 @@<template><div class="editor-container" @keydown="editor.handleKeydown"><Toolbar :document="document" :minimal="options?.toolbar == 'minimal'" @execute-action="(a:string) => editor.actions(a)" />- <input placeholder="Title" class="title" v-model="document.name" />- <input placeholder="Description" class="description" v-model="document.description" />- <div class="markdown" ref="container">- <InlineToolbar ref="toolbar" @execute-action="(a:string) => editor.actions(a)" />- <textarea ref="textarea" class="content markdown-input" @scroll="syncScroll" @input="update" v-html="document.content_markdown || ''" placeholder="Write something or use the toolbar to create your document..."></textarea>- <div v-if="editor.showPreview.value" class="markdown-preview document-theme" ref="markdownPreview" v-html="document.content_html || ''"></div>+ <div style="padding: 10px; height: 100%; width: 100%">+ <input placeholder="Title" class="title" v-model="document.name" />+ <input placeholder="Description" class="description" v-model="document.description" />+ <div class="markdown" ref="container">+ <InlineToolbar ref="toolbar" @execute-action="(a:string) => editor.actions(a)" />+ <textarea ref="textarea" class="content markdown-input" @scroll="syncScroll" @input="update" v-html="document.content_markdown || ''" placeholder="Write something or use the toolbar to create your document..."></textarea>+ <div v-if="editor.showPreview.value" class="markdown-preview document-theme" ref="markdownPreview" v-html="document.content_html || ''"></div>+ </div></div></div></template>@@ -75,7 +77,6 @@ function debounce(fn: Function, wait: number) {width: 100%;box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);border-radius: 15px;- padding: 1rem;}.markdown {diff --git a/frontend/components/MarkdownEditor/Toolbar.vue b/frontend/components/MarkdownEditor/Toolbar.vueindex 9f8d698d..fa965526 100644--- a/frontend/components/MarkdownEditor/Toolbar.vue+++ b/frontend/components/MarkdownEditor/Toolbar.vue@@ -1,19 +1,20 @@<template><div class="toolbar">- <button v-for="item in toolbar" :key="item.name" v-html="item.icon" class="btn" @click="emitAction(item.action)" :title="item.name"></button>+ <button v-for="item in toolbar" :key="item.name" v-html="item.icon" @click="emitAction(item.action)" :title="item.name"></button><select v-if="!minimal" v-model="copy.accessibility" style="margin-right: 5px"><option :value="1">Visible</option><option :value="2">Draf</option><option :value="3">Archive</option></select><select v-if="!minimal" v-model="copy.category" style="margin-right: 5px">- <option :value="null">All notes</option>+ <option :value="null" selected>All notes</option><option v-for="wp in categoriesStore.getParents.filter(c => c.role == 2)" :value="wp.id" v-text="wp.name"></option><optgroup v-for="cat in categoriesStore.getParents.filter(c => c.role == 1)" :label="cat.name" :key="cat.id"><option v-for="subCat in categoriesStore.getChilds(cat.id)" :value="subCat.id" :key="subCat.id" v-text="subCat.name"></option></optgroup></select><input type="text" v-model="copy.tags" placeholder="Tags" style="margin-right: 5px" />+ <button @click="() => emitAction('exit')" style="margin-left: auto"><Icon name="close" :big="true" /></button></div></template>@@ -25,7 +26,6 @@ const props = defineProps<{ document: Partial<Document>; minimal?: boolean }>();const copy = ref(props.document);const emit = defineEmits(['execute-action']);const emitAction = (action: string) => emit('execute-action', action, copy);-const toolbar = [{name: 'Bold',@@ -107,16 +107,16 @@ button {display: flex;align-items: stretch;flex-wrap: wrap;+ background-color: var(--bg-contrast);+ border-top-left-radius: 15px;+ border-top-right-radius: 15px;+ padding: 0.5rem;+ color: var(--font-color-light);}svg,.toolbar:deep(svg) {- fill: var(--font-color);-}--svg:hover,-.toolbar:deep(svg):hover {- fill: $primary-400;+ fill: var(--font-color-light);}input,@@ -124,5 +124,6 @@ select {display: inline-block;width: min-content;padding: 0;+ background-color: var(--bg-contrast-2);}</style>diff --git a/frontend/composables/icons.ts b/frontend/composables/icons.tsindex 4cb587a4..2be683a1 100644--- a/frontend/composables/icons.ts+++ b/frontend/composables/icons.ts@@ -11,7 +11,7 @@ const icons = {plus: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"/></svg>`,users: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm720 0v-120q0-44-24.5-84.5T666-434q51 6 96 20.5t84 35.5q36 20 55 44.5t19 53.5v120H760ZM360-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47Zm400-160q0 66-47 113t-113 47q-11 0-28-2.5t-28-5.5q27-32 41.5-71t14.5-81q0-42-14.5-81T544-792q14-5 28-6.5t28-1.5q66 0 113 47t47 113ZM120-240h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0 320Zm0-400Z"/></svg>`,draft: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><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" viewBox="0 -960 960 960"><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>`,+ folder: `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#5f6368"><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-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"/></svg>`,file: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><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" viewBox="0 -960 960 960"><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: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none"><rect x="2.5" y="2.5" width="11" height="11" rx="1.5" fill="var(--grey-bg)" stroke="var(--grey)"/><rect x="6" y="4" width="2" height="2" rx="0.5" fill="var(--grey)"/><rect x="6" y="8" width="2" height="2" rx="0.5" fill="var(--grey)"/><rect x="8" y="10" width="2" height="2" rx="0.5" fill="var(--grey)"/><rect x="8" y="6" width="2" height="2" rx="0.5" fill="var(--grey)"/></svg>`,diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.tsindex 88749549..38c7c758 100644--- a/frontend/nuxt.config.ts+++ b/frontend/nuxt.config.ts@@ -23,7 +23,7 @@ export default defineNuxtConfig({'.nuxt/analyze','.nuxt','**/-*.*', //- 'pages/**/_*',+ // 'pages/**/_*',],ssr: false,css: ['~/styles/main.scss', '~/styles/katex/katex.min.css'],diff --git a/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vue b/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vueindex f3cee785..bf4c369d 100644--- a/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vue+++ b/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vue@@ -1,5 +1,5 @@<template>- <div class="header">+ <div class="header" :class="{ 'print-style': preferences.get('printMode') }"><div class="text"><p class="category">{{ category?.name }}@@ -22,6 +22,7 @@ import DocumentCardHeaderActionRow from './DocumentCardHeaderActionRow.vue';import DocumentHeaderIllustration from './DocumentHeaderIllustration.vue';import type { Document } from '~/stores';const categories_store = useCategoriesStore();+const preferences = usePreferencesStore();const props = defineProps<{ doc: Document }>();const category = computed(() => categories_store.getById(props.doc?.category || ''));</script>@@ -77,4 +78,23 @@ p {display: block;}}+@media print {+ .print-style {+ align-items: center;+ padding: 0.4rem 0.2rem;++ .icon,+ .description,+ .document-tags,+ .category {+ display: none;+ }+ .title {+ font-size: 27px;+ font-weight: 700;+ border-bottom: 1px solid var(--font-color);+ text-align: center;+ }+ }+}</style>diff --git a/frontend/pages/dashboard/settings/_views/preferences.vue b/frontend/pages/dashboard/settings/_views/preferences.vueindex c76010ad..795dd56c 100644--- a/frontend/pages/dashboard/settings/_views/preferences.vue+++ b/frontend/pages/dashboard/settings/_views/preferences.vue@@ -10,19 +10,20 @@<script setup lang="ts">const colorMode = useColorMode();+const preferencesStore = usePreferencesStore();// Define options dynamicallyconst options = ref([{id: 'print-mode-toggle',label: 'Enable Print Mode',- value: localStorage.getItem('printMode') === 'true',- storageKey: 'printMode',+ value: Boolean(preferencesStore.get('printMode')),+ storageKey: 'printMode' as const,},{id: 'dark-mode-toggle',label: 'Enable Dark Mode',value: colorMode.value === 'dark',- storageKey: 'darkMode',+ storageKey: 'darkMode' as const,onToggle: () => (colorMode.value === 'light' ? (colorMode.preference = 'dark') : (colorMode.preference = 'light')),},]);@@ -32,7 +33,7 @@ const toggleOption = (index: number) => {const option = options.value[index];if (!option) return;option.value = !option.value;- localStorage.setItem(option.storageKey, option.value.toString());+ preferencesStore.set({ key: option.storageKey, value: option.value });if (option.onToggle) option.onToggle();};</script>diff --git a/frontend/pages/dashboard/settings/index.vue b/frontend/pages/dashboard/settings/index.vueindex 4a589657..34c4aedb 100644--- a/frontend/pages/dashboard/settings/index.vue+++ b/frontend/pages/dashboard/settings/index.vue@@ -44,19 +44,6 @@ const router = useRouter();watchEffect(() => (currentPage.value = route.query.p || 'profile'));const close = () => router.push('/dashboard');-const downloadLink = ref<string | null>(null);-const copyLink = () => navigator.clipboard.writeText(downloadLink.value!);-const isLoading = ref(false);--async function submitFile() {- isLoading.value = true;- const result = await makeRequest<{ url: string }>('backups', 'POST', {});- isLoading.value = false;- if (result.status != 'success') {- return useNotifications().add({ type: 'error', title: 'Error', message: result.message, timeout: 3000 });- }- downloadLink.value = `${CDN}${result.result?.url || ''}`;-}watchEffect(() => (currentPage.value = route.query.p || 'profile'));</script>diff --git a/frontend/pages/index.vue b/frontend/pages/index.vueindex be56fef8..e25f8b18 100644--- a/frontend/pages/index.vue+++ b/frontend/pages/index.vue@@ -1,14 +1,20 @@<template><main>- <AppHeader />- <div class="content-wrapper">+ <section class="header">+ <div class="logo">+ <img src="/Logo/Alexandrie-logo-dark.png" alt="Logo Alexandrie" class="logo-img" />+ </div>+ </section>++ <section class="content-wrapper"><div class="intro"><div class="intro-text">- <h1>- Your Ideas, Documents & Plans. <br />- Alexandrie+ <h1 class="title">+ <span id="typewriter"></span></h1>- <h3>Centralize Your Notes. Enhance Your Productivity.</h3>+ <h3 class="subtitle">+ Centralize Your Notes. Enhance Your Productivity.+ </h3></div><div class="btns-block"><NuxtLink to="/dashboard" class="get-started">Get started</NuxtLink>@@ -18,132 +24,250 @@<div class="images"><img :src="`/main-${colorMode.value}.webp`" alt="Documents Image" /></div>- </div>- <h2 style="text-align: center; border: none">Try editor online</h2>- <div class="editor"><MarkdownEditor :doc="doc" :options="{ showPreview: !isMobile(), toolbar: 'minimal' }" /></div>- <h2 style="text-align: center; border: none">Organize your documents</h2>- <div class="demo">- <img src="/home.webp" alt="home" />- </div>- <AppFooter />+ </section>++ <section class="editor-section">+ <h2 class="section-title">Try editor online</h2>+ <div class="editor">+ <MarkdownEditor :doc="doc" :options="{ showPreview: !isMobile(), toolbar: 'minimal' }" />+ </div>+ </section>++ <section class="demo-section">+ <h2 class="section-title">Organize your documents</h2>+ <div class="demo">+ <img src="/home.webp" alt="home" />+ </div>+ </section></main>+ <AppFooter /></template>++<script setup lang="ts">+import { onMounted, ref } from 'vue';++const typewriterText = ref("Your Ideas, Documents & Plans.\nAlexandrie");++onMounted(() => {+ const element = document.getElementById("typewriter");++ if (element) {+ const text = typewriterText.value.split(""); // Divise le texte en lettres+ let index = 0;++ const type = () => {+ if (index < text.length) {+ element.textContent += text[index] === "\n" ? "\n" : text[index];+ index++;+ setTimeout(type, 50); // Ajustez la vitesse d'écriture+ } else {+ // Supprime le curseur à la fin+ element.style.borderRight = "none";+ }+ };++ type();+ }+});+const colorMode = useColorMode();import MarkdownEditor from '~/components/MarkdownEditor/MarkdownEditor.vue';const doc = ref({content_markdown: `# Welcome to Alexandrie ! 🚀\n## Formatting options\n\nLorem **ipsum dolor** *sit amet*, consectetur _adipiscing elit_. ==But not sad.== \n\n### Different content blocks\n\n:::blue Blue\nA blue block\n:::\n:::red Red\nA red block\n:::\n:::green Green\nA green block\n:::\n:::grey Grey\nA grey block\n:::\n:::yellow Yellow\nA yellow block\n:::\n:::turquoise Turquoise\nA turquoise block\n:::\n:::details Details\nA details block\n:::\n\n\n:::no-print\nThis content will not be printed\n:::\n\n:::center\nThis content is centered\n:::\n\n:::definition Red Info\nBlock of content (ex: definition)\n:::\n\n:::property Blue Info\nBlock of content (ex: property)\n:::\n\n:::theorem Turquoise Info\nBlock of content (ex: theorem)\n:::\n\n:::info-u Info without background\nBlock of content (ex: info, tip, note)\n:::\n\n:::warning Warning Info\nBlock of content (ex: warning)\n:::\n\n### Bullet and Numbered Lists:\n\n- Bullet 1\n- Bullet 2\n - Sub-bullet 2-1\n\n1. Item 1\n1. Item 2\n\n### Markdown Tables\n\n| Column 1 | Column 2 | Column 3 |\n|:----------|:----------|:---------|\n|Item 1 | Item 2 | Item 3 |\n\n### Other formats\n\n$\\text{This is a math block: } f(x) = ax^2+bx+c$\n\n\`\`\`javascript\nconst hello = "Hello world";\n\`\`\`\n\n> Note: This content is a quote\n>> Nested quote\n\n## Shortcuts\n\n- **Ctrl + S**: Save\n- **Ctrl + P**: Toggle preview\n- **Ctrl + Q**: Switch to document\n- **Ctrl + B**: Bold formatting\n- **Ctrl + I**: Italic formatting\n- **Ctrl + U**: Underline formatting\n- **Ctrl + K**: Insert link\n- **Ctrl + M**: Insert image\n\n## Snippets\n\n- **!m**: Insert a math block (LaTeX)\n- **!def**: Insert a definition block\n- **!thm**: Insert a theorem block\n- **!center**: Center the content\n- **!red**: Insert a red block\n- **!green**: Insert a green block\n- **!blue**: Insert a blue block\n- **!yellow**: Insert a yellow block\n- **!details**: Insert a details block\n`,});+</script><style scoped lang="scss">+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');++* {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+}++body {+ font-family: 'Inter', sans-serif;+ background-color: #f5f5f7;+ color: #333;+ line-height: 1.6;+}+main {- flex-grow: 1;- padding-top: 1.5rem;- width: 95%;+ display: flex;+ flex-direction: column;+ align-items: center;+ padding: 2rem;+ max-width: 1200px;margin: 0 auto;}-h2 {- font-size: 1.8rem;+h1, h2, h3 {+ font-weight: 600;+ color: #1c1c1e;+}++h1 {+ font-size: 2.8rem;+ margin-bottom: 0.8rem;+}++#typewriter {+ font-size: 2.5rem;font-weight: 700;- margin: 0;+ white-space: pre-wrap; /* Gère les sauts de ligne */+ display: inline-block;+ border-right: 4px solid #333; /* Curseur plus large */+ height: 1.2em; /* Ajuste la hauteur */+ animation: blink 0.6s step-end infinite;}-.editor {- max-width: 1200px;- height: 700px;- margin: 0 auto;+@keyframes blink {+ from, to {+ border-color: transparent;+ }+ 50% {+ border-color: #333;+ }+}+++h3 {+ font-size: 1.4rem;+ color: #6e6e73;+ font-weight: 500;}-.demo {++.header {+ display: flex;+ justify-content: space-between;+ align-items: center;width: 100%;- height: 100%;- img {- max-height: unset;- display: block;- max-width: 1000px;- width: 100%;- margin: 25px auto;- }+ padding: 1rem 2rem;+ position: absolute;+ top: 0;+ backdrop-filter: blur(10px);+ background: rgba(255, 255, 255, 0.8);+}++.logo-img {+ width: 120px;+ height: auto;}.content-wrapper {display: flex;flex-direction: column;align-items: center;- justify-content: center;text-align: center;- flex: 1;+ margin-top: 120px;}.intro {max-width: 48rem;- gap: 1rem;+ padding: 1rem;}.intro h1 {- font-size: 3.1rem;- font-weight: 700;+ font-size: 2.6rem;}.intro h3 {- font-size: 1.3rem;- font-weight: 500;- text-decoration: none;+ font-size: 1.1rem;+ margin-top: 0.5rem;}.btns-block {display: flex;justify-content: center;- margin: 2rem;+ gap: 1rem;+ margin: 2.5rem 0;+}- a {- margin: 0 0.5rem;- padding: 0.5rem 1.4rem;- border-radius: 0.45rem;+.get-started, .github {+ padding: 0.9rem 2rem;+ border-radius: 10rem;+ text-transform: uppercase;+ text-decoration: none;+ font-weight: 600;+ font-size: 1rem;+ transition: all 0.3s ease;+ display: inline-block;+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);+}- font-weight: 500;- font-size: 1.2rem;+.get-started {+ background: linear-gradient(135deg, #6d9fff, #007aff);+ color: #fff;+ border: none;+}- &:hover {- transform: scale(1.03);- }- }+.github {+ background: linear-gradient(135deg, #e4e4e6, #f2f2f7);+ color: #1c1c1e;+ border: none;+}- .get-started {- background-color: var(--font-color);- color: var(--bg-color);- border: 1px solid var(--bg-color);- }+.get-started:hover, .github:hover {+ transform: translateY(-4px);+ box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);+}- .github {- background-color: var(--bg-color);- color: var(--font-color);- border: 1px solid var(--font-color);- }+.images {+ width: 100%;+ max-width: 800px;+ margin-top: 2rem;}-.none {- display: none;+.images img {+ width: 100%;+ border-radius: 1rem;+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);}-.images {- display: flex;- align-items: center;- justify-content: center;+.editor-section, .demo-section {+ text-align: center;+ margin-top: 4rem;+}++.editor {+ max-width: 1200px;+ height: 600px;+ margin: 0 auto;+ border-radius: 1rem;+ overflow: hidden;+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);+ border: 1px solid #e5e5ea;+}++.section-title {+ font-size: 2rem;+ margin-bottom: 1.5rem;+ color: #1c1c1e;+}++.demo img {max-width: 100%;- width: 800px;+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);}@media (max-width: 768px) {- .intro h1 {- font-size: 2.5rem;+ h1 {+ font-size: 2.2rem;}- .intro h3 {- font-size: 1rem;+ .get-started, .github {+ padding: 0.8rem 1.6rem;+ font-size: 0.9rem;+ }++ .auth-links {+ gap: 0.8rem;}}</style>+diff --git a/frontend/stores/preferences.store.ts b/frontend/stores/preferences.store.tsnew file mode 100644index 00000000..19628b80--- /dev/null+++ b/frontend/stores/preferences.store.ts@@ -0,0 +1,32 @@+/* Store to save user local preferences */+/* Only local settings with localStorage but no db or requests */+type PreferenceKey = 'printMode' | 'darkMode';+export interface Preference {+ key: PreferenceKey;+ value: any;+}++export const usePreferencesStore = defineStore('preferences', {+ state: () => ({+ preferences: ref<Preference[]>(JSON.parse(localStorage.getItem('preferences') || '[]')),+ }),+ getters: {+ getAll: state => state.preferences,+ get: state => (key: PreferenceKey) => {+ const preference = state.preferences.find(p => p.key === key);+ return preference ? preference.value : null;+ },+ },+ actions: {+ // Set a preference (or update if it already exists)+ set: function (preference: Preference) {+ const existing = this.preferences.find(p => p.key === preference.key);+ if (existing) {+ existing.value = preference.value;+ } else {+ this.preferences.push(preference);+ }+ localStorage.setItem('preferences', JSON.stringify(this.preferences));+ },+ },+});diff --git a/frontend/styles/_variables.scss b/frontend/styles/_variables.scssindex 11fa90ad..12ca18a6 100644--- a/frontend/styles/_variables.scss+++ b/frontend/styles/_variables.scss@@ -96,7 +96,7 @@ $transition-duration: 0.3s;--bg-color: #fff;--bg-contrast: #F5F5F5;--bg-contrast-2: #ECECEC;- --font-color: #333333;+ --font-color: #111;// COLORS \\--blue: #007aff;--blue-bg: rgba(0, 123, 255, 0.2);