Skip to content

Commit

Permalink
add github and discord icons to page header
Browse files Browse the repository at this point in the history
  • Loading branch information
Petar Cvitanović committed Oct 23, 2023
1 parent 19d3814 commit 56b4881
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 13 deletions.
8 changes: 7 additions & 1 deletion web/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const config = {
backgroundColor: '#10357A',
textColor: '#FFF',
isCloseable: false,

content:
'⭐ Help us shine brighter by showing your support - give us a star on <a href="https://github.com/cyclops-ui/cyclops">GitHub</a>! ⭐',
},
Expand All @@ -81,8 +82,13 @@ const config = {
},
{
href: 'https://github.com/cyclops-ui/cyclops',
label: 'Github',
position: 'right',
className: 'header-github-link',
},
{
href: "https://discord.com/invite/8ErnK3qDb3",
className: "header-discord-link",
position: "right",
},
],
},
Expand Down
30 changes: 18 additions & 12 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@ant-design/icons": "^5.2.6",
"@docusaurus/core": "2.4.0",
"@docusaurus/plugin-google-gtag": "^2.4.1",
"@docusaurus/preset-classic": "2.4.0",
Expand Down
29 changes: 29 additions & 0 deletions web/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,32 @@ html[data-theme='light'] footer {
.button.button--demo:hover {
background-color: #e37a00;
}

/* GitHub */
.header-github-link:hover {
opacity: 0.6;
}

.header-github-link:before {
content: '';
width: 30px;
height: 30px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
}

/* Discord */
.header-discord-link:hover {
opacity: 0.6;
}

.header-discord-link:before {
content: '';
width: 30px;
height: 30px;
display: flex;
background: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 5 30.67 23.25' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M26.0015 6.9529C24.0021 6.03845 21.8787 5.37198 19.6623 5C19.3833 5.48048 19.0733 6.13144 18.8563 6.64292C16.4989 6.30193 14.1585 6.30193 11.8336 6.64292C11.6166 6.13144 11.2911 5.48048 11.0276 5C8.79575 5.37198 6.67235 6.03845 4.6869 6.9529C0.672601 12.8736 -0.41235 18.6548 0.130124 24.3585C2.79599 26.2959 5.36889 27.4739 7.89682 28.2489C8.51679 27.4119 9.07477 26.5129 9.55525 25.5675C8.64079 25.2265 7.77283 24.808 6.93587 24.312C7.15286 24.1571 7.36986 23.9866 7.57135 23.8161C12.6241 26.1255 18.0969 26.1255 23.0876 23.8161C23.3046 23.9866 23.5061 24.1571 23.7231 24.312C22.8861 24.808 22.0182 25.2265 21.1037 25.5675C21.5842 26.5129 22.1422 27.4119 22.7621 28.2489C25.2885 27.4739 27.8769 26.2959 30.5288 24.3585C31.1952 17.7559 29.4733 12.0212 26.0015 6.9529ZM10.2527 20.8402C8.73376 20.8402 7.49382 19.4608 7.49382 17.7714C7.49382 16.082 8.70276 14.7025 10.2527 14.7025C11.7871 14.7025 13.0425 16.082 13.0115 17.7714C13.0115 19.4608 11.7871 20.8402 10.2527 20.8402ZM20.4373 20.8402C18.9183 20.8402 17.6768 19.4608 17.6768 17.7714C17.6768 16.082 18.8873 14.7025 20.4373 14.7025C21.9717 14.7025 23.2271 16.082 23.1961 17.7714C23.1961 19.4608 21.9872 20.8402 20.4373 20.8402Z'/%3E%3C/svg%3E")
no-repeat;
}

0 comments on commit 56b4881

Please sign in to comment.