mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 22:58:52 +02:00
feat(website): different download behaviour for Linux
This commit is contained in:
parent
46d2d7e160
commit
bf04e5a15b
@ -14,17 +14,39 @@ export default function DownloadButton({ big }: DownloadButtonProps) {
|
||||
useEffect(() => setRecommendedDownload(getRecommendedDownload()), []);
|
||||
|
||||
return (recommendedDownload &&
|
||||
<Button
|
||||
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||
href={recommendedDownload.url}
|
||||
iconSvg={downloadIcon}
|
||||
text={<>
|
||||
Download now{" "}
|
||||
{big
|
||||
? <span class="platform">v{packageJson.version} for {recommendedDownload.name}</span>
|
||||
: <span class="platform">for {recommendedDownload.name}</span>
|
||||
}
|
||||
</>}
|
||||
/>
|
||||
<>
|
||||
{recommendedDownload.platform !== "linux"
|
||||
? (
|
||||
<Button
|
||||
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||
href={recommendedDownload.url}
|
||||
iconSvg={downloadIcon}
|
||||
text={<>
|
||||
Download now{" "}
|
||||
{big
|
||||
? <span class="platform">v{packageJson.version} for {recommendedDownload.name}</span>
|
||||
: <span class="platform">for {recommendedDownload.name}</span>
|
||||
}
|
||||
</>}
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||
href="/get-started/"
|
||||
iconSvg={downloadIcon}
|
||||
text={<>
|
||||
Download now{" "}
|
||||
{big
|
||||
? <span class="platform">v{packageJson.version} for Linux</span>
|
||||
: <span class="platform">for Linux</span>
|
||||
}
|
||||
</>}
|
||||
/>
|
||||
)}
|
||||
|
||||
{big && (
|
||||
<a class="more-download-options desktop-only" href="./get-started/">More platforms & server setup</a>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -77,7 +77,6 @@ function HeroSection() {
|
||||
|
||||
<div className="download-wrapper">
|
||||
<DownloadButton big />
|
||||
<a class="more-download-options desktop-only" href="./get-started/">More platforms & server setup</a>
|
||||
<Button href="./get-started/" className="mobile-only" text="Get started" />
|
||||
<div className="additional-options">
|
||||
<Button iconSvg={gitHubIcon} outline text="GitHub" href="https://github.com/TriliumNext/Trilium/" openExternally />
|
||||
|
Loading…
x
Reference in New Issue
Block a user