mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(website): display version to be downloaded
This commit is contained in:
parent
b8419604e5
commit
92e14159b9
@ -1,17 +1,27 @@
|
|||||||
.download-button {
|
a.download-button {
|
||||||
&.big {
|
display: none;
|
||||||
padding: 1em 2em;
|
align-items: center;
|
||||||
margin: 1em 0;
|
justify-content: center;
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
@media (min-width: 720px) {
|
||||||
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform {
|
.platform {
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.big {
|
||||||
|
padding: 0.5em 3.5em;
|
||||||
|
margin: 1em 0;
|
||||||
|
gap: m;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
.platform {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 720px) {
|
|
||||||
.download-button {
|
|
||||||
display: inline-block !important;
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,6 +2,7 @@ import { getRecommendedDownload } from "../download-helper";
|
|||||||
import "./DownloadButton.css";
|
import "./DownloadButton.css";
|
||||||
import Button from "./Button";
|
import Button from "./Button";
|
||||||
import downloadIcon from "../assets/boxicons/bx-arrow-in-down-square-half.svg?raw";
|
import downloadIcon from "../assets/boxicons/bx-arrow-in-down-square-half.svg?raw";
|
||||||
|
import packageJson from "../../../../package.json" with { type: "json" };
|
||||||
|
|
||||||
interface DownloadButtonProps {
|
interface DownloadButtonProps {
|
||||||
big?: boolean;
|
big?: boolean;
|
||||||
@ -17,7 +18,10 @@ export default function DownloadButton({ big }: DownloadButtonProps) {
|
|||||||
iconSvg={downloadIcon}
|
iconSvg={downloadIcon}
|
||||||
text={<>
|
text={<>
|
||||||
Download now{" "}
|
Download now{" "}
|
||||||
<span class="platform">for {name}</span>
|
{big
|
||||||
|
? <span class="platform">v{packageJson.version} for {name}</span>
|
||||||
|
: <span class="platform">for {name}</span>
|
||||||
|
}
|
||||||
</>}
|
</>}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
@ -7,6 +7,7 @@ import Button, { Link } from "../../components/Button";
|
|||||||
import Icon from "../../components/Icon";
|
import Icon from "../../components/Icon";
|
||||||
import helpIcon from "../../assets/boxicons/bx-help-circle.svg?raw";
|
import helpIcon from "../../assets/boxicons/bx-help-circle.svg?raw";
|
||||||
import "./get-started.css";
|
import "./get-started.css";
|
||||||
|
import packageJson from "../../../../../package.json" with { type: "json" };
|
||||||
|
|
||||||
export default function DownloadPage() {
|
export default function DownloadPage() {
|
||||||
const [ currentArch, setCurrentArch ] = useState(getArchitecture());
|
const [ currentArch, setCurrentArch ] = useState(getArchitecture());
|
||||||
@ -14,7 +15,7 @@ export default function DownloadPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Section title="Download the desktop application" className="fill accented">
|
<Section title={`Download the desktop application (v${packageJson.version})`} className="fill accented">
|
||||||
<div className="architecture-switch">
|
<div className="architecture-switch">
|
||||||
<span>Architecture:</span>
|
<span>Architecture:</span>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user