diff --git a/apps/website/.gitignore b/apps/website/.gitignore index 5a3bb8506..a547bf36d 100644 --- a/apps/website/.gitignore +++ b/apps/website/.gitignore @@ -1,28 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + node_modules +dist +dist-ssr +*.local -# Output -.output -.vercel -.netlify -.wrangler -/.svelte-kit -/build - -# OS +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea .DS_Store -Thumbs.db - -# Env -.env -.env.* -!.env.example -!.env.test - -# Vite -vite.config.js.timestamp-* -vite.config.ts.timestamp-* - -# Paraglide -src/lib/paraglide - -project.inlang/cache \ No newline at end of file +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/apps/website/.npmrc b/apps/website/.npmrc deleted file mode 100644 index b6f27f135..000000000 --- a/apps/website/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict=true diff --git a/apps/website/README.md b/apps/website/README.md index 88ad0a1c6..1ebc2149e 100644 --- a/apps/website/README.md +++ b/apps/website/README.md @@ -1,11 +1,15 @@ -# apps/website +# `create-preact` -Landing page for Trilium Notes powered by [Svelte](https://github.com/sveltejs/cli) and [Tailwind CSS](https://tailwindcss.com/). +

+ +

-## Developing +

Get started using Preact and Vite!

-To run a dev server that will hot-reload changes: `pnpm dev` +## Getting Started -## Building +- `npm run dev` - Starts a dev server at http://localhost:5173/ -To create a production build: `pnpm build` +- `npm run build` - Builds for production, emitting to `dist/`. Prerenders all found routes in app to static HTML + +- `npm run preview` - Starts a server at http://localhost:4173/ to test production build locally diff --git a/apps/website/eslint.config.js b/apps/website/eslint.config.js deleted file mode 100644 index 165237185..000000000 --- a/apps/website/eslint.config.js +++ /dev/null @@ -1,39 +0,0 @@ -import js from '@eslint/js'; -import { includeIgnoreFile } from '@eslint/compat'; -import svelte from 'eslint-plugin-svelte'; -import globals from 'globals'; -import { fileURLToPath } from 'node:url'; -import ts from 'typescript-eslint'; -import svelteConfig from './svelte.config.js'; - -const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); - -export default ts.config( - includeIgnoreFile(gitignorePath), - js.configs.recommended, - ...ts.configs.recommended, - ...svelte.configs.recommended, - { - languageOptions: { - globals: { ...globals.browser, ...globals.node } - }, - rules: { // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. - // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors - "no-undef": 'off' } - }, - { - files: [ - '**/*.svelte', - '**/*.svelte.ts', - '**/*.svelte.js' - ], - languageOptions: { - parserOptions: { - projectService: true, - extraFileExtensions: ['.svelte'], - parser: ts.parser, - svelteConfig - } - } - } -); diff --git a/apps/website2/index.html b/apps/website/index.html similarity index 100% rename from apps/website2/index.html rename to apps/website/index.html diff --git a/apps/website/messages/en.json b/apps/website/messages/en.json deleted file mode 100644 index 37a989440..000000000 --- a/apps/website/messages/en.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://inlang.com/schema/inlang-message-format", - "hello_world": "Hello, {name} from en!" -} diff --git a/apps/website2/package-lock.json b/apps/website/package-lock.json similarity index 100% rename from apps/website2/package-lock.json rename to apps/website/package-lock.json diff --git a/apps/website/package.json b/apps/website/package.json index aa8f73e17..99d9b13be 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -1,37 +1,24 @@ { - "name": "website", "private": true, - "version": "0.0.1", "type": "module", "scripts": { - "dev": "vite dev", + "dev": "vite", "build": "vite build", - "preview": "vite preview", - "prepare": "svelte-kit sync || echo ''", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "eslint ." - }, - "devDependencies": { - "@eslint/compat": "^1.2.5", - "@eslint/js": "^9.18.0", - "@sveltejs/adapter-auto": "^6.0.0", - "@sveltejs/kit": "^2.16.0", - "@sveltejs/vite-plugin-svelte": "^6.0.0", - "@tailwindcss/typography": "^0.5.15", - "@tailwindcss/vite": "^4.0.0", - "eslint": "^9.18.0", - "eslint-plugin-svelte": "^3.0.0", - "globals": "^16.0.0", - "mdsvex": "^0.12.3", - "svelte": "^5.0.0", - "svelte-check": "^4.0.0", - "tailwindcss": "^4.0.0", - "typescript": "^5.0.0", - "typescript-eslint": "^8.20.0", - "vite": "^7.0.0" + "preview": "vite preview" }, "dependencies": { - "@inlang/paraglide-js": "^2.0.0" + "preact": "^10.26.9", + "preact-iso": "^2.10.0", + "preact-render-to-string": "^6.6.1" + }, + "devDependencies": { + "@preact/preset-vite": "^2.10.2", + "eslint": "^9.36.0", + "eslint-config-preact": "^2.0.0", + "typescript": "^5.9.2", + "vite": "^7.0.4" + }, + "eslintConfig": { + "extends": "preact" } } diff --git a/apps/website/project.inlang/project_id b/apps/website/project.inlang/project_id deleted file mode 100644 index 2002b3bce..000000000 --- a/apps/website/project.inlang/project_id +++ /dev/null @@ -1 +0,0 @@ -dv1iXGpHP2mMvuQQo4 \ No newline at end of file diff --git a/apps/website/project.inlang/settings.json b/apps/website/project.inlang/settings.json deleted file mode 100644 index acfd0d3d4..000000000 --- a/apps/website/project.inlang/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://inlang.com/schema/project-settings", - "modules": [ - "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js", - "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js" - ], - "plugin.inlang.messageFormat": { - "pathPattern": "./messages/{locale}.json" - }, - "baseLocale": "en", - "locales": [ - "en" - ] -} diff --git a/apps/website2/public/vite.svg b/apps/website/public/vite.svg similarity index 100% rename from apps/website2/public/vite.svg rename to apps/website/public/vite.svg diff --git a/apps/website/src/app.css b/apps/website/src/app.css deleted file mode 100644 index e6f251501..000000000 --- a/apps/website/src/app.css +++ /dev/null @@ -1,10 +0,0 @@ -@import 'tailwindcss'; -@plugin '@tailwindcss/typography'; - -main a { - text-decoration: revert; -} - -a.rounded-full, a.rounded-xl { - text-decoration: none; -} diff --git a/apps/website/src/app.d.ts b/apps/website/src/app.d.ts deleted file mode 100644 index da08e6da5..000000000 --- a/apps/website/src/app.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// See https://svelte.dev/docs/kit/types#app.d.ts -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface PageState {} - // interface Platform {} - } -} - -export {}; diff --git a/apps/website/src/app.html b/apps/website/src/app.html deleted file mode 100644 index fee9ee80f..000000000 --- a/apps/website/src/app.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - %sveltekit.head% - - - %sveltekit.body% - - diff --git a/apps/website2/src/assets/collection_board.png b/apps/website/src/assets/collection_board.png similarity index 100% rename from apps/website2/src/assets/collection_board.png rename to apps/website/src/assets/collection_board.png diff --git a/apps/website2/src/assets/collection_calendar.png b/apps/website/src/assets/collection_calendar.png similarity index 100% rename from apps/website2/src/assets/collection_calendar.png rename to apps/website/src/assets/collection_calendar.png diff --git a/apps/website2/src/assets/collection_geomap.png b/apps/website/src/assets/collection_geomap.png similarity index 100% rename from apps/website2/src/assets/collection_geomap.png rename to apps/website/src/assets/collection_geomap.png diff --git a/apps/website2/src/assets/collection_table.png b/apps/website/src/assets/collection_table.png similarity index 100% rename from apps/website2/src/assets/collection_table.png rename to apps/website/src/assets/collection_table.png diff --git a/apps/website/static/icon-color.svg b/apps/website/src/assets/icon-color.svg similarity index 100% rename from apps/website/static/icon-color.svg rename to apps/website/src/assets/icon-color.svg diff --git a/apps/website2/src/assets/preact.svg b/apps/website/src/assets/preact.svg similarity index 100% rename from apps/website2/src/assets/preact.svg rename to apps/website/src/assets/preact.svg diff --git a/apps/website2/src/assets/screenshot_desktop_win.png b/apps/website/src/assets/screenshot_desktop_win.png similarity index 100% rename from apps/website2/src/assets/screenshot_desktop_win.png rename to apps/website/src/assets/screenshot_desktop_win.png diff --git a/apps/website2/src/assets/type_canvas.png b/apps/website/src/assets/type_canvas.png similarity index 100% rename from apps/website2/src/assets/type_canvas.png rename to apps/website/src/assets/type_canvas.png diff --git a/apps/website2/src/assets/type_code.png b/apps/website/src/assets/type_code.png similarity index 100% rename from apps/website2/src/assets/type_code.png rename to apps/website/src/assets/type_code.png diff --git a/apps/website2/src/assets/type_file.png b/apps/website/src/assets/type_file.png similarity index 100% rename from apps/website2/src/assets/type_file.png rename to apps/website/src/assets/type_file.png diff --git a/apps/website2/src/assets/type_mermaid.png b/apps/website/src/assets/type_mermaid.png similarity index 100% rename from apps/website2/src/assets/type_mermaid.png rename to apps/website/src/assets/type_mermaid.png diff --git a/apps/website2/src/assets/type_mindmap.png b/apps/website/src/assets/type_mindmap.png similarity index 100% rename from apps/website2/src/assets/type_mindmap.png rename to apps/website/src/assets/type_mindmap.png diff --git a/apps/website2/src/assets/type_text.png b/apps/website/src/assets/type_text.png similarity index 100% rename from apps/website2/src/assets/type_text.png rename to apps/website/src/assets/type_text.png diff --git a/apps/website2/src/components/Card.tsx b/apps/website/src/components/Card.tsx similarity index 100% rename from apps/website2/src/components/Card.tsx rename to apps/website/src/components/Card.tsx diff --git a/apps/website2/src/components/DownloadButton.css b/apps/website/src/components/DownloadButton.css similarity index 100% rename from apps/website2/src/components/DownloadButton.css rename to apps/website/src/components/DownloadButton.css diff --git a/apps/website2/src/components/DownloadButton.tsx b/apps/website/src/components/DownloadButton.tsx similarity index 100% rename from apps/website2/src/components/DownloadButton.tsx rename to apps/website/src/components/DownloadButton.tsx diff --git a/apps/website2/src/components/Footer.css b/apps/website/src/components/Footer.css similarity index 100% rename from apps/website2/src/components/Footer.css rename to apps/website/src/components/Footer.css diff --git a/apps/website2/src/components/Footer.tsx b/apps/website/src/components/Footer.tsx similarity index 100% rename from apps/website2/src/components/Footer.tsx rename to apps/website/src/components/Footer.tsx diff --git a/apps/website2/src/components/Header.css b/apps/website/src/components/Header.css similarity index 100% rename from apps/website2/src/components/Header.css rename to apps/website/src/components/Header.css diff --git a/apps/website2/src/components/Header.tsx b/apps/website/src/components/Header.tsx similarity index 100% rename from apps/website2/src/components/Header.tsx rename to apps/website/src/components/Header.tsx diff --git a/apps/website2/src/components/Section.tsx b/apps/website/src/components/Section.tsx similarity index 100% rename from apps/website2/src/components/Section.tsx rename to apps/website/src/components/Section.tsx diff --git a/apps/website2/src/download-helper.ts b/apps/website/src/download-helper.ts similarity index 100% rename from apps/website2/src/download-helper.ts rename to apps/website/src/download-helper.ts diff --git a/apps/website/src/hooks.server.ts b/apps/website/src/hooks.server.ts deleted file mode 100644 index 51822109d..000000000 --- a/apps/website/src/hooks.server.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Handle } from '@sveltejs/kit'; -import { paraglideMiddleware } from '$lib/paraglide/server'; - -const handleParaglide: Handle = ({ event, resolve }) => paraglideMiddleware(event.request, ({ request, locale }) => { - event.request = request; - - return resolve(event, { - transformPageChunk: ({ html }) => html.replace('%paraglide.lang%', locale) - }); -}); - -export const handle: Handle = handleParaglide; diff --git a/apps/website/src/hooks.ts b/apps/website/src/hooks.ts deleted file mode 100644 index 04362dd38..000000000 --- a/apps/website/src/hooks.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { deLocalizeUrl } from '$lib/paraglide/runtime'; - -export const reroute = (request: { - url: URL; - fetch: typeof fetch; -}) => deLocalizeUrl(request.url).pathname; diff --git a/apps/website2/src/index.tsx b/apps/website/src/index.tsx similarity index 100% rename from apps/website2/src/index.tsx rename to apps/website/src/index.tsx diff --git a/apps/website/src/lib/download-helper.ts b/apps/website/src/lib/download-helper.ts deleted file mode 100644 index 47c071403..000000000 --- a/apps/website/src/lib/download-helper.ts +++ /dev/null @@ -1,195 +0,0 @@ -import rootPackageJson from '../../../../package.json'; - -export type App = "desktop" | "server"; - -export type Architecture = 'x64' | 'arm64'; - -export type Platform = "macos" | "windows" | "linux" | "pikapod"; - -const version = rootPackageJson.version; - -export interface DownloadInfo { - recommended?: boolean; - name: string; - url?: string; -} - -export interface DownloadMatrixEntry { - title: Record | string; - description: Record | string; - downloads: Record; -} - -type DownloadMatrix = Record; - -// Keep compatibility info inline with https://github.com/electron/electron/blob/main/README.md#platform-support. -export const downloadMatrix: DownloadMatrix = { - desktop: { - windows: { - title: { - x64: "Windows 64-bit", - arm64: "Windows on ARM" - }, - description: { - x64: "Compatible with Intel or AMD devices running Windows 10 and 11.", - arm64: "Compatible with ARM devices (e.g. with Qualcomm Snapdragon).", - }, - downloads: { - exe: { - recommended: true, - name: "Download Installer (.exe)" - }, - zip: { - name: "Portable (.zip)" - }, - scoop: { - name: "Scoop", - url: "https://scoop.sh/#/apps?q=triliumnext" - }, - winget: { - name: "Winget", - url: "https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/TriliumNext/Notes/" - } - } - }, - linux: { - title: { - x64: "Linux 64-bit", - arm64: "Linux on ARM" - }, - description: { - x64: "For most Linux distributions, compatible with x86_64 architecture.", - arm64: "For ARM-based Linux distributions, compatible with aarch64 architecture.", - }, - downloads: { - deb: { - recommended: true, - name: "Download .deb" - }, - rpm: { - name: ".rpm" - }, - flatpak: { - name: ".flatpak" - }, - zip: { - name: "Portable (.zip)" - }, - nixpkgs: { - name: "nixpkgs", - url: "https://search.nixos.org/packages?query=trilium-next" - }, - aur: { - name: "AUR", - url: "https://aur.archlinux.org/packages/triliumnext-bin" - } - } - }, - macos: { - title: { - x64: "macOS for Intel", - arm64: "macOS for Apple Silicon" - }, - description: { - x64: "For Intel-based Macs running macOS Big Sur or later.", - arm64: "For Apple Silicon Macs such as those with M1 and M2 chips.", - }, - downloads: { - dmg: { - recommended: true, - name: "Download Installer (.dmg)" - }, - zip: { - name: "Portable (.zip)" - } - } - } - }, - server: { - linux: { - title: "Self-hosted (Linux)", - description: "Deploy Trilium Notes on your own server or VPS, compatible with most Linux distributions.", - downloads: { - docker: { - recommended: true, - name: "View on Docker Hub", - url: "https://hub.docker.com/r/triliumnext/notes" - }, - tarX64: { - name: "x86 (.tar.xz)", - url: `https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-Server-v${version}-linux-x64.tar.xz` - }, - tarArm64: { - name: "ARM (.tar.xz)", - url: `https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-Server-v${version}-linux-arm64.tar.xz` - }, - nixos: { - name: "NixOS module", - url: "https://search.nixos.org/options?query=trilium-server" - } - } - }, - pikapod: { - title: "Paid hosting", - description: "Trilium Notes hosted on PikaPods, a paid service for easy access and management.", - downloads: { - pikapod: { - recommended: true, - name: "Set up on PikaPods", - url: "https://www.pikapods.com/pods?run=trilium-next" - }, - triliumcc: { - name: "Alternatively see trilium.cc", - url: "https://trilium.cc/" - } - } - } - } -}; - -export function buildDownloadUrl(app: App, platform: Platform, format: string, architecture: Architecture): string { - if (app === "desktop") { - return downloadMatrix.desktop[platform]?.downloads[format].url ?? - `https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-v${version}-${platform}-${architecture}.${format}`; - } else if (app === "server") { - return downloadMatrix.server[platform]?.downloads[format].url ?? "#"; - } else { - return "#"; - } -} - -export function getArchitecture(): Architecture { - const userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.includes('arm64') || userAgent.includes('aarch64')) { - return 'arm64'; - } - - return "x64"; -} - -function getPlatform(): Platform { - const userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.includes('macintosh') || userAgent.includes('mac os x')) { - return "macos"; - } else if (userAgent.includes('windows') || userAgent.includes('win32')) { - return "windows"; - } else { - return "linux"; - } -} - -export function getRecommendedDownload() { - const architecture = getArchitecture(); - const platform = getPlatform(); - - const downloadInfo = downloadMatrix.desktop[platform]?.downloads; - const recommendedDownload = Object.entries(downloadInfo || {}).find(d => d[1].recommended); - const format = recommendedDownload?.[0]; - const url = buildDownloadUrl("desktop", platform, format || 'zip', architecture); - - return { - architecture, - platform, - url - } -} diff --git a/apps/website/src/lib/index.ts b/apps/website/src/lib/index.ts deleted file mode 100644 index 856f2b6c3..000000000 --- a/apps/website/src/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -// place files you want to import through the `$lib` alias in this folder. diff --git a/apps/website2/src/pages/Donate/Donate.css b/apps/website/src/pages/Donate/Donate.css similarity index 100% rename from apps/website2/src/pages/Donate/Donate.css rename to apps/website/src/pages/Donate/Donate.css diff --git a/apps/website2/src/pages/Donate/Donate.tsx b/apps/website/src/pages/Donate/Donate.tsx similarity index 100% rename from apps/website2/src/pages/Donate/Donate.tsx rename to apps/website/src/pages/Donate/Donate.tsx diff --git a/apps/website2/src/pages/Download/download.css b/apps/website/src/pages/Download/download.css similarity index 100% rename from apps/website2/src/pages/Download/download.css rename to apps/website/src/pages/Download/download.css diff --git a/apps/website2/src/pages/Download/download.tsx b/apps/website/src/pages/Download/download.tsx similarity index 100% rename from apps/website2/src/pages/Download/download.tsx rename to apps/website/src/pages/Download/download.tsx diff --git a/apps/website2/src/pages/Home/index.css b/apps/website/src/pages/Home/index.css similarity index 100% rename from apps/website2/src/pages/Home/index.css rename to apps/website/src/pages/Home/index.css diff --git a/apps/website2/src/pages/Home/index.tsx b/apps/website/src/pages/Home/index.tsx similarity index 100% rename from apps/website2/src/pages/Home/index.tsx rename to apps/website/src/pages/Home/index.tsx diff --git a/apps/website2/src/pages/_404.css b/apps/website/src/pages/_404.css similarity index 100% rename from apps/website2/src/pages/_404.css rename to apps/website/src/pages/_404.css diff --git a/apps/website2/src/pages/_404.tsx b/apps/website/src/pages/_404.tsx similarity index 100% rename from apps/website2/src/pages/_404.tsx rename to apps/website/src/pages/_404.tsx diff --git a/apps/website/src/routes/+layout.svelte b/apps/website/src/routes/+layout.svelte deleted file mode 100644 index 98e32e276..000000000 --- a/apps/website/src/routes/+layout.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - -
- -
-{@render children()} -
- - diff --git a/apps/website/src/routes/+page.svelte b/apps/website/src/routes/+page.svelte deleted file mode 100644 index a438901b5..000000000 --- a/apps/website/src/routes/+page.svelte +++ /dev/null @@ -1,176 +0,0 @@ - - - - Trilium Notes - - - -
- -
-
-
-
-
- -
-
- - -
-

Organize Your Thoughts.
Build Your Knowledge.

-

- Trilium Notes helps you build and organize complex personal knowledge bases effortlessly. - Its unique tree structure, rich editing tools, and powerful search features make managing your information intuitive and flexible. - - -

- -
- - -
- Screenshot of the app on desktop Windows -
-
-
-
- -
-

Beyond Text: Smarter Note Types

- -
- - - - - - - -
- -

Technical Features

- -
- - - - - - - -
-
- -
-

Feature Highlights

- -
- -
-

Organization & Navigation

-
    -
  • Arbitrarily deep note tree with cloning support.
  • -
  • Fast navigation, full-text search, and note hoisting.
  • -
  • Note attributes for organization, querying, and scripting.
  • -
  • Seamless note versioning.
  • -
-
- - -
-

Editing & Content

-
    -
  • Rich WYSIWYG editor with tables, images, math, and markdown autoformat.
  • -
  • Source code editing with syntax highlighting.
  • -
  • Evernote and Markdown import/export.
  • -
  • Web Clipper for easy saving of web content.
  • -
-
- - -
-

Security & Sync

-
    -
  • Direct OpenID and TOTP integration for secure login.
  • -
  • Strong note encryption with per-note granularity.
  • -
  • Sharing notes publicly on the internet.
  • -
-
- - -
-

Advanced & Customization

-
    -
  • Relation maps and link maps to visualize notes.
  • -
  • Touch-optimized mobile frontend and dark/user themes.
  • -
  • Customizable UI with sidebar buttons and user widgets.
  • -
  • Scales efficiently beyond 100,000 notes.
  • -
-
-
-
- - -
-
-

Ready to get started with Trilium Notes?

-

Build your personal knowledge base with powerful features and full privacy.

- - -
-
\ No newline at end of file diff --git a/apps/website/src/routes/demo/+page.svelte b/apps/website/src/routes/demo/+page.svelte deleted file mode 100644 index a815390c5..000000000 --- a/apps/website/src/routes/demo/+page.svelte +++ /dev/null @@ -1 +0,0 @@ -paraglide diff --git a/apps/website/src/routes/demo/paraglide/+page.svelte b/apps/website/src/routes/demo/paraglide/+page.svelte deleted file mode 100644 index 797149f8a..000000000 --- a/apps/website/src/routes/demo/paraglide/+page.svelte +++ /dev/null @@ -1,15 +0,0 @@ - - - - -

{m.hello_world({ name: 'SvelteKit User' })}

-
- -

-If you use VSCode, install the Sherlock i18n extension for a better i18n experience. -

diff --git a/apps/website/src/routes/download-now.svelte b/apps/website/src/routes/download-now.svelte deleted file mode 100644 index 20abe9c55..000000000 --- a/apps/website/src/routes/download-now.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - -{#if url} - - Download now - - ({platform} {architecture}) - - -{/if} \ No newline at end of file diff --git a/apps/website/src/routes/download/+page.svelte b/apps/website/src/routes/download/+page.svelte deleted file mode 100644 index b09c684f9..000000000 --- a/apps/website/src/routes/download/+page.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - - - Trilium Notes: Download - - - -
-
-

Download the desktop application

- - -
- Architecture: -
- {#each architectures as arch} - - {/each} -
-
- -
- {#each Object.entries(downloadMatrix.desktop) as [platformId, platform]} - {@const textColor = (platformId === "windows" ? "text-blue-600" : platformId === "linux" ? "text-violet-600" : "text-gray-800 dark:text-gray-100")} - {@const bgColor = (platformId === "windows" ? "bg-blue-600" : platformId === "linux" ? "bg-violet-600" : "bg-gray-800")} - {@const hoverColor = (platformId === "windows" ? "hover:bg-blue-700" : platformId === "linux" ? "hover:bg-violet-700" : "hover:bg-gray-900")} - - {/each} -
-
- -
-

Set up a server for access on multiple devices

- -
- {#each Object.entries(downloadMatrix.server) as [platformId, platform]} - {@const textColor = (platformId === "linux" ? "text-violet-600" : "text-gray-800 dark:text-gray-100")} - {@const bgColor = (platformId === "linux" ? "bg-violet-600" : "bg-gray-800")} - {@const hoverColor = (platformId === "linux" ? "hover:bg-violet-700" : "hover:bg-gray-900")} - - {/each} -
-
- - - -
diff --git a/apps/website/src/routes/download/download-card.svelte b/apps/website/src/routes/download/download-card.svelte deleted file mode 100644 index 9fd89c20f..000000000 --- a/apps/website/src/routes/download/download-card.svelte +++ /dev/null @@ -1,31 +0,0 @@ - - -
-

{typeof platform.title === "object" ? platform.title[architecture] : platform.title}

-

{typeof platform.title === "object" ? platform.description[architecture] : platform.description}

-
- {#if recommended} - - {recommended[1].name} - - {/if} -
- {#each Object.entries(platform.downloads).filter((e) => !e[1].recommended) as [format, download]} - - {download.name} - - {/each} -
-
-
\ No newline at end of file diff --git a/apps/website/src/routes/feature-block.svelte b/apps/website/src/routes/feature-block.svelte deleted file mode 100644 index 982eea437..000000000 --- a/apps/website/src/routes/feature-block.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -
- {imgAlt} -
-

{title}

-

{text}

-
-
\ No newline at end of file diff --git a/apps/website/src/routes/header.svelte b/apps/website/src/routes/header.svelte deleted file mode 100644 index af1a7f057..000000000 --- a/apps/website/src/routes/header.svelte +++ /dev/null @@ -1,23 +0,0 @@ - -
- -
\ No newline at end of file diff --git a/apps/website2/src/style.css b/apps/website/src/style.css similarity index 100% rename from apps/website2/src/style.css rename to apps/website/src/style.css diff --git a/apps/website/static/favicon.png b/apps/website/static/favicon.png deleted file mode 120000 index 17ded225a..000000000 --- a/apps/website/static/favicon.png +++ /dev/null @@ -1 +0,0 @@ -../../../apps/client/src/assets/icon.png \ No newline at end of file diff --git a/apps/website/static/note-types/canvas.png b/apps/website/static/note-types/canvas.png deleted file mode 100644 index ad5c74b36..000000000 Binary files a/apps/website/static/note-types/canvas.png and /dev/null differ diff --git a/apps/website/static/note-types/geo-map.png b/apps/website/static/note-types/geo-map.png deleted file mode 100644 index cd891b646..000000000 Binary files a/apps/website/static/note-types/geo-map.png and /dev/null differ diff --git a/apps/website/static/note-types/mermaid.png b/apps/website/static/note-types/mermaid.png deleted file mode 100644 index 1e8bd7386..000000000 Binary files a/apps/website/static/note-types/mermaid.png and /dev/null differ diff --git a/apps/website/static/note-types/mind-map.png b/apps/website/static/note-types/mind-map.png deleted file mode 100644 index a970d485f..000000000 Binary files a/apps/website/static/note-types/mind-map.png and /dev/null differ diff --git a/apps/website/static/screenshots/desktop-win.png b/apps/website/static/screenshots/desktop-win.png deleted file mode 100644 index ab6ee05ec..000000000 Binary files a/apps/website/static/screenshots/desktop-win.png and /dev/null differ diff --git a/apps/website/static/screenshots/macos/dark.png b/apps/website/static/screenshots/macos/dark.png deleted file mode 100644 index 2eae66f18..000000000 Binary files a/apps/website/static/screenshots/macos/dark.png and /dev/null differ diff --git a/apps/website/static/screenshots/macos/light.png b/apps/website/static/screenshots/macos/light.png deleted file mode 100644 index a2b64b7fb..000000000 Binary files a/apps/website/static/screenshots/macos/light.png and /dev/null differ diff --git a/apps/website/static/technical-features/grafana-metrics.png b/apps/website/static/technical-features/grafana-metrics.png deleted file mode 120000 index 1dd11db67..000000000 --- a/apps/website/static/technical-features/grafana-metrics.png +++ /dev/null @@ -1 +0,0 @@ -../../../../docs/User Guide/User Guide/Advanced Usage/1_Metrics_image.png \ No newline at end of file diff --git a/apps/website/svelte.config.js b/apps/website/svelte.config.js deleted file mode 100644 index 0cd57a52d..000000000 --- a/apps/website/svelte.config.js +++ /dev/null @@ -1,11 +0,0 @@ -import { mdsvex } from 'mdsvex'; -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; - -const config = { - preprocess: [vitePreprocess(), mdsvex()], - kit: { adapter: adapter() }, - extensions: ['.svelte', '.svx'] -}; - -export default config; diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json index 5adb685c0..12bb30b41 100644 --- a/apps/website/tsconfig.json +++ b/apps/website/tsconfig.json @@ -1,20 +1,20 @@ { - "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "bundler", + "noEmit": true, "allowJs": true, "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, + + /* Preact Config */ + "jsx": "react-jsx", + "jsxImportSource": "preact", "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "moduleResolution": "bundler", - "composite": true - } - // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias - // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "paths": { + "react": ["./node_modules/preact/compat/"], + "react-dom": ["./node_modules/preact/compat/"] + } + }, + "include": ["node_modules/vite/client.d.ts", "**/*"] } diff --git a/apps/website/vite.config.ts b/apps/website/vite.config.ts index 135fc634d..078ef4529 100644 --- a/apps/website/vite.config.ts +++ b/apps/website/vite.config.ts @@ -1,24 +1,17 @@ -import tailwindcss from '@tailwindcss/vite'; -import { paraglideVitePlugin } from '@inlang/paraglide-js'; -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig, type Plugin } from 'vite'; +import { defineConfig } from 'vite'; +import preact from '@preact/preset-vite'; -export default () => { - // See https://github.com/nrwl/nx/issues/28978. - const cwd = process.cwd(); - process.chdir(__dirname); // Temporarily change the working directory - - const config = defineConfig({ - plugins: [ - tailwindcss(), - sveltekit(), - paraglideVitePlugin({ - project: './project.inlang', - outdir: './src/lib/paraglide' - }) - ] as Plugin[] - }); - - process.chdir(cwd); // Restore the original working directory - return config; -}; +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + preact({ + prerender: { + enabled: true, + renderTarget: '#app', + additionalPrerenderRoutes: ['/404'], + previewMiddlewareEnabled: true, + previewMiddlewareFallback: '/404', + }, + }), + ], +}); diff --git a/apps/website2/.gitignore b/apps/website2/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/apps/website2/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/apps/website2/README.md b/apps/website2/README.md deleted file mode 100644 index 1ebc2149e..000000000 --- a/apps/website2/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# `create-preact` - -

- -

- -

Get started using Preact and Vite!

- -## Getting Started - -- `npm run dev` - Starts a dev server at http://localhost:5173/ - -- `npm run build` - Builds for production, emitting to `dist/`. Prerenders all found routes in app to static HTML - -- `npm run preview` - Starts a server at http://localhost:4173/ to test production build locally diff --git a/apps/website2/package.json b/apps/website2/package.json deleted file mode 100644 index 99d9b13be..000000000 --- a/apps/website2/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "private": true, - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "preact": "^10.26.9", - "preact-iso": "^2.10.0", - "preact-render-to-string": "^6.6.1" - }, - "devDependencies": { - "@preact/preset-vite": "^2.10.2", - "eslint": "^9.36.0", - "eslint-config-preact": "^2.0.0", - "typescript": "^5.9.2", - "vite": "^7.0.4" - }, - "eslintConfig": { - "extends": "preact" - } -} diff --git a/apps/website2/src/assets/icon-color.svg b/apps/website2/src/assets/icon-color.svg deleted file mode 100644 index 943f1bfe8..000000000 --- a/apps/website2/src/assets/icon-color.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - Trilium Notes - - - - - - - - - - - - - - - diff --git a/apps/website2/tsconfig.json b/apps/website2/tsconfig.json deleted file mode 100644 index 12bb30b41..000000000 --- a/apps/website2/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "moduleResolution": "bundler", - "noEmit": true, - "allowJs": true, - "checkJs": true, - - /* Preact Config */ - "jsx": "react-jsx", - "jsxImportSource": "preact", - "skipLibCheck": true, - "paths": { - "react": ["./node_modules/preact/compat/"], - "react-dom": ["./node_modules/preact/compat/"] - } - }, - "include": ["node_modules/vite/client.d.ts", "**/*"] -} diff --git a/apps/website2/vite.config.ts b/apps/website2/vite.config.ts deleted file mode 100644 index 078ef4529..000000000 --- a/apps/website2/vite.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'vite'; -import preact from '@preact/preset-vite'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - preact({ - prerender: { - enabled: true, - renderTarget: '#app', - additionalPrerenderRoutes: ['/404'], - previewMiddlewareEnabled: true, - previewMiddlewareFallback: '/404', - }, - }), - ], -});