Skip to content

Commit

Permalink
docs: update GitHub button
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpion9979 committed Feb 6, 2024
1 parent ed8b878 commit 405f7f6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
9 changes: 2 additions & 7 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,12 @@ const config = {
items: [
{
docId: "introduction",
label: "Protocol",
label: "PROTOCOL",
position: "left",
type: "doc",
},
{ label: "SDK", position: "left", to: "/protocol/developers/sdk" },
{ label: "Smart Contracts", position: "left", to: "/protocol/technical-reference/core/balance-sheet" },
{
href: "https://github.com/hifi-finance/hifi",
label: "GitHub",
position: "right",
},
{ label: "SMART CONTRACTS", position: "left", to: "/protocol/technical-reference/core/balance-sheet" },
],
},
prism: {
Expand Down
32 changes: 31 additions & 1 deletion src/components/HomepageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ProtocolDocsButton = () => {
viewBox="0 0 25 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
style={{ transform: "translate(-0.25rem, 0.25rem)" }}
style={{ transform: "translate(-0.25rem, 0.25rem)", scale: "0.975" }}
>
<path
d="M7.03125 8.33203L10.0312 10.582L7.03125 12.832M11.5312 12.832H14.5312M5.53125 21.082H19.0312C19.628 21.082 20.2003 20.845 20.6222 20.423C21.0442 20.0011 21.2812 19.4288 21.2812 18.832V6.83203C21.2812 6.23529 21.0442 5.663 20.6222 5.24104C20.2003 4.81908 19.628 4.58203 19.0312 4.58203H5.53125C4.93451 4.58203 4.36222 4.81908 3.94026 5.24104C3.5183 5.663 3.28125 6.23529 3.28125 6.83203V18.832C3.28125 19.4288 3.5183 20.0011 3.94026 20.423C4.36222 20.845 4.93451 21.082 5.53125 21.082Z"
Expand Down Expand Up @@ -50,6 +50,34 @@ const WebsiteButton = () => {
);
};

const GithubButton = () => {
return (
<Link className="button button--secondary button--lg" to="https://github.com/hifi-finance/hifi">
<svg
width="25"
height="25"
viewBox="0 0 25 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
style={{ transform: "translate(-0.25rem, 0.25rem)", scale: "0.875" }}
>
<g clip-path="url(#clip0_2024_18567)">
<path
d="M12.2812 0.832031C5.65525 0.832031 0.28125 6.20503 0.28125 12.832C0.28125 18.134 3.71925 22.632 8.48825 24.219C9.08725 24.33 9.28125 23.958 9.28125 23.642V21.408C5.94325 22.134 5.24825 19.992 5.24825 19.992C4.70225 18.605 3.91525 18.236 3.91525 18.236C2.82625 17.491 3.99825 17.507 3.99825 17.507C5.20325 17.591 5.83725 18.744 5.83725 18.744C6.90725 20.578 8.64425 20.048 9.32925 19.741C9.43625 18.966 9.74725 18.436 10.0913 18.137C7.42625 17.832 4.62425 16.803 4.62425 12.206C4.62425 10.895 5.09325 9.82503 5.86025 8.98503C5.73625 8.68203 5.32525 7.46103 5.97725 5.80903C5.97725 5.80903 6.98525 5.48703 9.27825 7.03903C10.2352 6.77303 11.2612 6.64003 12.2812 6.63503C13.3013 6.64003 14.3282 6.77303 15.2872 7.03903C17.5782 5.48703 18.5842 5.80903 18.5842 5.80903C19.2372 7.46203 18.8263 8.68303 18.7022 8.98503C19.4722 9.82503 19.9373 10.896 19.9373 12.206C19.9373 16.815 17.1302 17.83 14.4583 18.127C14.8883 18.499 15.2812 19.229 15.2812 20.349V23.642C15.2812 23.961 15.4732 24.336 16.0822 24.218C20.8472 22.629 24.2812 18.132 24.2812 12.832C24.2812 6.20503 18.9082 0.832031 12.2812 0.832031Z"
fill="black"
/>
</g>
<defs>
<clipPath id="clip0_2024_18567">
<rect width="24" height="24" fill="white" transform="translate(0.28125 0.832031)" />
</clipPath>
</defs>
</svg>
GitHub
</Link>
);
};

export default function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
Expand All @@ -65,6 +93,8 @@ export default function HomepageHeader() {
<ProtocolDocsButton />
<span style={{ width: "1.25rem" }} />
<WebsiteButton />
<span style={{ width: "1.25rem" }} />
<GithubButton />
</div>
</div>
</header>
Expand Down

0 comments on commit 405f7f6

Please sign in to comment.