Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
feat: add download button (#209)
Browse files Browse the repository at this point in the history
* feat: add download button

* chore: update announce
  • Loading branch information
urmauur authored Oct 7, 2024
1 parent d165a7b commit cdecf2a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/components/Announcement/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Announcement = () => {
<div className="flex items-center gap-2">
<span>🚧</span>
<p className="mb-0 text-neutral-100 font-medium">
Cortex.cpp v1.0 is coming soon.
Cortex.cpp v1.0 is now live on github.
<a href="/docs" className="no-underline hover:no-underline">
{" "}
Read more
Expand Down
15 changes: 5 additions & 10 deletions src/components/DropdownDownload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,19 @@ type GpuInfo = {

const systemsTemplate: SystemType[] = [
{
name: "Download for Mac (Apple Silicon)",
name: "Download for Mac",
logo: FaApple,
fileFormat: "{appname}-installer-{tag}-arm64-mac.tar.gz",
},
{
name: "Download for Mac (Intel)",
logo: FaApple,
fileFormat: "{appname}-installer-{tag}-amd64-mac.tar.gz",
fileFormat: "{appname}-{tag}-mac-universal-local-installer.pkg",
},
{
name: "Download for Windows",
logo: FaWindows,
fileFormat: "{appname}-installer-{tag}-amd64-windows.tar.gz",
fileFormat: "{appname}-{tag}-windows-amd64-local-installer.exe",
},
{
name: "Download for Linux",
logo: FaLinux,
fileFormat: "{appname}-installer-{tag}-amd64-linux.deb",
fileFormat: "{appname}-{tag}-linux-amd64-local-installer.deb",
},
];

Expand Down Expand Up @@ -214,7 +209,7 @@ const DropdownDownload = ({ lastRelease }: Props) => {
</div>
{open && (
<div
className="absolute left-0 top-[72px] w-full border-2 border-black bg-white dark:bg-black z-30 rounded-xl lg:w-[340px]"
className="absolute left-0 top-[72px] w-full border-2 border-black bg-white dark:bg-black z-30 rounded-xl lg:w-[280px]"
ref={setRefDropdownContent}
>
{systems.map((system) => (
Expand Down
13 changes: 5 additions & 8 deletions src/containers/Homepage/SimpleHeroSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import { Button } from "@site/src/components/Button";
import Link from "@docusaurus/Link";

import Announcement from "@site/src/components/Announcement";

import { FaGithub } from "react-icons/fa";
import DropdownDownload from "@site/src/components/DropdownDownload";
import { usePluginData } from "@docusaurus/useGlobalData";

const SimpleHeroSection = () => {
const latestRelease = usePluginData("latest-release");
return (
<div className="container">
<div className="text-center mb-10">
Expand All @@ -23,14 +27,7 @@ const SimpleHeroSection = () => {
</p>

<div className="mt-8 flex gap-8 justify-center items-center">
<Link href="https://github.com/janhq/cortex" target="_blank">
<Button>
<div className="flex items-center">
<FaGithub className="mr-2" size={24} />
<span className="mb-0">Github</span>
</div>
</Button>
</Link>
<DropdownDownload lastRelease={latestRelease} />
<Link href="/docs/quickstart" target="_blank">
<Button theme="secondary">Documentation</Button>
</Link>
Expand Down

0 comments on commit cdecf2a

Please sign in to comment.