diff --git a/README.md b/README.md index c4f23e1..3872bf7 100644 --- a/README.md +++ b/README.md @@ -252,13 +252,7 @@ Want to learn more? ## 🌍 Multiple Languages -NoteDiscovery supports multiple languages! Currently available: -- πŸ‡ΊπŸ‡Έ English (en-US) - Default -- πŸ‡ͺπŸ‡Έ EspaΓ±ol (es-ES) -- πŸ‡©πŸ‡ͺ Deutsch (de-DE) -- πŸ‡«πŸ‡· FranΓ§ais (fr-FR) - -**To change language:** Go to Settings (gear icon) β†’ Language dropdown. +NoteDiscovery supports multiple interface languages via JSON locale files in `locales/`. Open **Settings** (gear icon) β†’ **Language** to choose one; the list reflects whatever locales are installed (bundled files, mounts, or your own additions). **To add your own language:** See the [Contributing Guidelines](CONTRIBUTING.md#-contributing-translations) for instructions on creating translation files. diff --git a/backend/themes.py b/backend/themes.py index b468d99..32cd31b 100644 --- a/backend/themes.py +++ b/backend/themes.py @@ -49,7 +49,9 @@ def get_available_themes(themes_dir: str) -> List[Dict[str, str]]: "cobalt2": "🌊", "vs-blue": "πŸ”·", "gruvbox-dark": "🟫", - "matcha-light": "🍡" + "matcha-light": "🍡", + "hacker": "πŸ–₯️", + "ubuntu": "🟠" } # Load all themes from themes folder diff --git a/docs/index.html b/docs/index.html index cb47d41..def810f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -891,7 +891,7 @@
🎨

Beautiful Themes

-

8 built-in themes with dark/light modes and full customization.

+

Several built-in themes with dark/light modes and full customization.

@@ -1015,7 +1015,7 @@ 🌍
Multi-Language - English, Spanish, German, French + Multiple interface languages; add your own via locale files
diff --git a/documentation/FEATURES.md b/documentation/FEATURES.md index aa194aa..7cba70a 100644 --- a/documentation/FEATURES.md +++ b/documentation/FEATURES.md @@ -33,7 +33,7 @@ - **Visual tree view** - Expandable/collapsible navigation - **Hide system folders** - Toggle to hide `_attachments`, `_templates` and other underscore-prefixed folders from sidebar - **Tab inserts tab** - Toggle to make Tab key insert a tab character in the editor instead of changing focus -- **List & quote continuation (Enter)** - At the end of a line, Enter continues blockquotes (`>`), bullets (`-` / `*` / `+`), and task lists (`- [ ]` / `- [x]`); pressing Enter again on an empty continued line exits the list or quote. Disabled inside fenced code blocks and when using Shift+Enter (plain newline) +- **List & quote continuation (Enter)** - At the end of a line, Enter continues blockquotes (`>`), bullets (`-` / `*` / `+`), ordered lists (`1.` / `1)`), and task lists (`- [ ]` / `- [x]`); pressing Enter again on an empty continued line exits the list or quote. Disabled inside fenced code blocks and when using Shift+Enter (plain newline) ### Export & Print - **HTML Export** - Download notes as standalone HTML files with all styling, images, diagrams, and math embedded @@ -100,7 +100,7 @@ To link to a heading, convert the heading text to a slug: **lowercase, spaces ## 🎨 Customization ### Themes -- **8 built-in themes** - Light, Dark, Dracula, Nord, Monokai, Vue High Contrast, Cobalt2, VS Blue +- **Several built-in themes** - Multiple light and dark options out of the box (see **Settings β†’ Theme** or the `themes/` directory) - **Theme persistence** - Remembers your choice - **Custom themes** - Create your own CSS themes - **Instant switching** - No reload required @@ -360,7 +360,7 @@ NoteDiscovery can be installed as a standalone app on your device: ## 🌍 Internationalization -- **Multiple languages** - English, Spanish, German, French built-in +- **Multiple interface languages** - Bundled locale files under `locales/`; pick one in **Settings β†’ Language** - **Easy to add** - Drop JSON files in `locales/` folder - **Instant switch** - Change language in Settings without reload - **Community translations** - Contributions welcome! diff --git a/documentation/THEMES.md b/documentation/THEMES.md index 2fbaf5f..13f1e26 100644 --- a/documentation/THEMES.md +++ b/documentation/THEMES.md @@ -2,20 +2,9 @@ ## Built-in Themes -NoteDiscovery comes with **10 beautiful themes** out of the box: +NoteDiscovery ships with **several built-in themes** (light and dark styles). Open **Settings β†’ Theme** to browse what is available; your choice is saved automatically. -- 🌞 **Light** - Clean, professional, easy on the eyes -- πŸŒ™ **Dark** - Modern dark mode for night owls -- πŸ§› **Dracula** - Popular purple-tinted dark theme -- ❄️ **Nord** - Cool, Arctic-inspired color palette -- 🎨 **Monokai** - Vibrant, high-contrast theme inspired by the classic code editor theme -- πŸ’š **Vue High Contrast** - Dark theme with distinctive greenish tint and Vue.js aesthetics -- 🌊 **Cobalt2** - Deep ocean blue with vibrant yellow highlights, inspired by Wes Bos -- πŸ”· **VS Blue** - Classic Visual Studio 2015 light blue professional theme -- 🟫 **Gruvbox Dark** - A retro groove color scheme for Vim lovers -- 🍡 **Matcha Light** - A vibrant, green-tinted light theme inspired by Doki Theme - -Switch themes anytime from the sidebar dropdown. Your preference is saved automatically! +The set can grow over timeβ€”see the `themes/` folder in the repository for the current files. You can also add your own (see below) or override themes when self-hosting. ## Create Custom Themes @@ -139,7 +128,7 @@ All these CSS variables **must** be defined for your theme to work properly: - Shadows: `shadow-sm`, `shadow-md`, `shadow-lg` ### πŸ“‹ Quick Start -1. Copy an existing theme file (e.g., `dracula.css`) +1. Copy an existing theme file from `themes/` (any `.css` file) 2. Rename it to your theme name 3. Update the `data-theme` attribute to match 4. Modify the colors diff --git a/frontend/app.js b/frontend/app.js index 26ff8cc..b2b9624 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -859,7 +859,7 @@ function noteApp() { }, /** - * Enter: continue blockquote / bullet / task list; second Enter on empty item exits (see editor-markdown-continue.js). + * Enter: continue blockquote / bullet / ordered list / task list; second Enter on empty item exits (see editor-markdown-continue.js). */ handleEditorEnterKey(event) { if (typeof EditorMarkdownContinue === 'undefined') return; diff --git a/frontend/editor-markdown-continue.js b/frontend/editor-markdown-continue.js index eac57c5..48ed75b 100644 --- a/frontend/editor-markdown-continue.js +++ b/frontend/editor-markdown-continue.js @@ -1,5 +1,5 @@ /** - * Markdown editor helpers: Enter continues blockquotes, bullets, and task lists. + * Markdown editor helpers: Enter continues blockquotes, bullets, ordered lists, and task lists. * Plain functions only; no DOM. Used by app.js handleEditorEnterKey. */ (function (global) { @@ -70,6 +70,17 @@ return { continuePrefix: quoteFull + inner + marker, isEmpty }; } + const orderedMatch = rest.match(/^(\s*)(\d+)([.)])\s+(.*)$/); + if (orderedMatch) { + const inner = orderedMatch[1]; + const num = parseInt(orderedMatch[2], 10); + const sep = orderedMatch[3]; + const cont = orderedMatch[4]; + const marker = (num + 1) + sep + ' '; + const isEmpty = cont.trim() === ''; + return { continuePrefix: quoteFull + inner + marker, isEmpty }; + } + if (quoteFull) { const isEmpty = rest.trim() === ''; return { continuePrefix: quoteFull, isEmpty }; diff --git a/themes/hacker.css b/themes/hacker.css new file mode 100644 index 0000000..67af953 --- /dev/null +++ b/themes/hacker.css @@ -0,0 +1,35 @@ +/* Hacker β€” phosphor terminal / CRT aesthetic */ +/* @theme-type: dark */ + +:root[data-theme="hacker"] { + /* Background colors β€” near-black with a green wash */ + --bg-primary: #0a0f0c; + --bg-secondary: #050806; + --bg-tertiary: #122018; + --bg-hover: #1a2e22; + --bg-active: #234030; + + /* Text β€” soft phosphor on dark */ + --text-primary: #c8f5c8; + --text-secondary: #8ecf8e; + --text-tertiary: #5a9c6a; + + /* Borders β€” dim terminal green */ + --border-primary: #1f4d33; + --border-secondary: #163828; + + /* Accent β€” bright matrix green for controls & links */ + --accent-primary: #39ff14; + --accent-hover: #5cff3d; + --accent-light: rgba(57, 255, 20, 0.18); + + /* Status colors β€” tuned for green UI */ + --success: #5ee984; + --error: #ff6b8a; + --warning: #ffd447; + + /* Shadows β€” heavy, like a dim room */ + --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.55); + --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.65); + --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.75); +} diff --git a/themes/ubuntu.css b/themes/ubuntu.css new file mode 100644 index 0000000..b7c627f --- /dev/null +++ b/themes/ubuntu.css @@ -0,0 +1,35 @@ +/* Ubuntu Color Theme β€” matches radu-matei.vscode-ubuntu-color-theme (VS Code) */ +/* @theme-type: dark */ + +:root[data-theme="ubuntu"] { + /* Backgrounds β€” editor #300a24, sidebar #2a091f, inputs #3d0d2d, activity #23071a */ + --bg-primary: #300a24; + --bg-secondary: #2a091f; + --bg-tertiary: #3d0d2d; + --bg-hover: #450e33; + --bg-active: #4a0f37; + + /* Text β€” editor.foreground & UI foreground */ + --text-primary: #f1f1e7; + --text-secondary: #c6c6bd; + --text-tertiary: #a5a59e; + + /* Borders β€” tab.border, dropdown.border */ + --border-primary: #4a0f37; + --border-secondary: #470f34; + + /* Accent β€” focusBorder / textLink / button (orange) */ + --accent-primary: #fa8d3e; + --accent-hover: #ffce6b; + --accent-light: rgba(250, 141, 62, 0.22); + + /* Status β€” errorForeground, list.warning, list.highlight (teal) */ + --success: #4cbf99; + --error: #f07171; + --warning: #ef7c2a; + + /* Shadows β€” widget.shadow */ + --shadow-sm: 0 1px 2px 0 rgba(6, 1, 4, 0.55); + --shadow-md: 0 4px 6px -1px rgba(6, 1, 4, 0.6); + --shadow-lg: 0 10px 15px -3px rgba(6, 1, 4, 0.65); +}