mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	feat(website): quick start for downloads
This commit is contained in:
		| @@ -19,6 +19,7 @@ export interface DownloadMatrixEntry { | |||||||
|     description: Record<Architecture, string> | string; |     description: Record<Architecture, string> | string; | ||||||
|     downloads: Record<string, DownloadInfo>; |     downloads: Record<string, DownloadInfo>; | ||||||
|     helpUrl?: string; |     helpUrl?: string; | ||||||
|  |     quickStartCode?: string; | ||||||
| } | } | ||||||
|  |  | ||||||
| type DownloadMatrix = Record<App, { [ P in Platform ]?: DownloadMatrixEntry }>; | type DownloadMatrix = Record<App, { [ P in Platform ]?: DownloadMatrixEntry }>; | ||||||
| @@ -35,6 +36,7 @@ export const downloadMatrix: DownloadMatrix = { | |||||||
|                 x64: "Compatible with Intel or AMD devices running Windows 10 and 11.", |                 x64: "Compatible with Intel or AMD devices running Windows 10 and 11.", | ||||||
|                 arm64: "Compatible with ARM devices (e.g. with Qualcomm Snapdragon).", |                 arm64: "Compatible with ARM devices (e.g. with Qualcomm Snapdragon).", | ||||||
|             }, |             }, | ||||||
|  |             quickStartCode: "winget install TriliumNext.Notes", | ||||||
|             downloads: { |             downloads: { | ||||||
|                 exe: { |                 exe: { | ||||||
|                     recommended: true, |                     recommended: true, | ||||||
| @@ -131,6 +133,7 @@ export const downloadMatrix: DownloadMatrix = { | |||||||
|             title: "Self-hosted using Docker", |             title: "Self-hosted using Docker", | ||||||
|             description: "Easily deploy on Windows, Linux or macOS using a Docker container.", |             description: "Easily deploy on Windows, Linux or macOS using a Docker container.", | ||||||
|             helpUrl: "https://docs.triliumnotes.org/User%20Guide/User%20Guide/Installation%20%26%20Setup/Server%20Installation/1.%20Installing%20the%20server/Using%20Docker.html", |             helpUrl: "https://docs.triliumnotes.org/User%20Guide/User%20Guide/Installation%20%26%20Setup/Server%20Installation/1.%20Installing%20the%20server/Using%20Docker.html", | ||||||
|  |             quickStartCode: "docker pull triliumnext/trilium\ndocker run -p 8080:8080 -d ./data:/home/node/trilium-data triliumnext/trilium", | ||||||
|             downloads: { |             downloads: { | ||||||
|                 dockerhub: { |                 dockerhub: { | ||||||
|                     recommended: true, |                     recommended: true, | ||||||
|   | |||||||
| @@ -45,6 +45,17 @@ | |||||||
|     --brand-foreground-color: var(--background-color); |     --brand-foreground-color: var(--background-color); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .download-card .quick-start { | ||||||
|  |     border: 1px solid var(--muted-color); | ||||||
|  |     padding: 0.5em; | ||||||
|  |     border-radius: 6px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .download-card .quick-start code { | ||||||
|  |     text-wrap: wrap; | ||||||
|  |     color: var(--muted-color); | ||||||
|  | } | ||||||
|  |  | ||||||
| .architecture-switch { | .architecture-switch { | ||||||
|     display: flex; |     display: flex; | ||||||
|     gap: 1em; |     gap: 1em; | ||||||
|   | |||||||
| @@ -67,6 +67,12 @@ export function DownloadCard({ app, arch, entry: [ platform, entry ] }: { app: A | |||||||
|         </>} className="download-card"> |         </>} className="download-card"> | ||||||
|             {unwrapText(entry.description)} |             {unwrapText(entry.description)} | ||||||
|  |  | ||||||
|  |             {entry.quickStartCode && ( | ||||||
|  |                 <pre className="quick-start"> | ||||||
|  |                     <code>{entry.quickStartCode}</code> | ||||||
|  |                 </pre> | ||||||
|  |             )} | ||||||
|  |  | ||||||
|             <div class="download-options"> |             <div class="download-options"> | ||||||
|                 <Button |                 <Button | ||||||
|                     className="recommended" |                     className="recommended" | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| :root { | :root { | ||||||
|     --background-color: #fff; |     --background-color: #fff; | ||||||
|     --foreground-color: black; |     --foreground-color: black; | ||||||
|     --muted-color: #353535; |     --muted-color: #606060; | ||||||
|     --card-background-color: white; |     --card-background-color: white; | ||||||
|     --card-box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); |     --card-box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); | ||||||
|     --header-background-color: rgba(255, 255, 255, 0.75); |     --header-background-color: rgba(255, 255, 255, 0.75); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user