www: add social links to navigation (#821)

resolves https://github.com/denoland/fresh/issues/818
Co-authored-by: hashrock <hashrock@users.noreply.github.com>
This commit is contained in:
Paul
2022-12-02 01:52:00 +09:00
committed by GitHub
co-authored by hashrock
parent a0e3b91196
commit 81d73ba0a6
2 changed files with 45 additions and 1 deletions
+25
View File
@@ -127,6 +127,31 @@ export function GitHub(props: { class?: string }) {
);
}
export function Discord(props: { class?: string }) {
return (
<svg
class={`h-6 w-6 ${props.class ?? ""}`}
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0_1993_195)">
<path
d="M11.8595 2.62936C10.9397 2.21264 9.96862 1.917 8.97117 1.75C8.83467 1.99146 8.71117 2.23988 8.60118 2.49424C7.5387 2.33581 6.45822 2.33581 5.39574 2.49424C5.28569 2.23991 5.16219 1.99149 5.02575 1.75C4.02766 1.91841 3.05598 2.21475 2.13524 2.63154C0.307332 5.30775 -0.188185 7.9175 0.0595735 10.4902C1.13004 11.2729 2.3282 11.8681 3.60197 12.25C3.88878 11.8683 4.14258 11.4633 4.36066 11.0394C3.94644 10.8863 3.54665 10.6974 3.16591 10.4749C3.26612 10.403 3.36412 10.3289 3.45882 10.257C4.56668 10.7726 5.77586 11.0399 7.00011 11.0399C8.22437 11.0399 9.43354 10.7726 10.5414 10.257C10.6372 10.3344 10.7352 10.4085 10.8343 10.4749C10.4528 10.6978 10.0523 10.887 9.63736 11.0405C9.85518 11.4642 10.109 11.8688 10.3961 12.25C11.6709 11.8696 12.87 11.2747 13.9406 10.4913C14.2314 7.50778 13.444 4.92201 11.8595 2.62936ZM4.67449 8.908C3.98407 8.908 3.41367 8.28798 3.41367 7.52522C3.41367 6.76245 3.96425 6.13699 4.67228 6.13699C5.38032 6.13699 5.94631 6.76245 5.9342 7.52522C5.92209 8.28798 5.37812 8.908 4.67449 8.908ZM9.32574 8.908C8.63422 8.908 8.06602 8.28798 8.06602 7.52522C8.06602 6.76245 8.6166 6.13699 9.32574 6.13699C10.0349 6.13699 10.5965 6.76245 10.5843 7.52522C10.5722 8.28798 10.0294 8.908 9.32574 8.908Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0_1993_195">
<rect width="14" height="14" fill="white" />
</clipPath>
</defs>
</svg>
);
}
export function ArrowRight() {
return (
<svg
+20 -1
View File
@@ -1,3 +1,5 @@
import * as Icons from "./Icons.tsx";
export default function NavigationBar(
props: { active: string; class?: string },
) {
@@ -18,7 +20,7 @@ export default function NavigationBar(
const isHome = props.active == "/";
return (
<nav class={"flex " + props.class ?? ""}>
<ul class="flex justify-center items-center gap-4 mx-4 my-6">
<ul class="flex justify-center items-center gap-4 mx-4 my-6 flex-wrap">
{items.map((item) => (
<li>
<a
@@ -33,6 +35,23 @@ export default function NavigationBar(
</a>
</li>
))}
<li class="flex items-center">
<a
href="https://github.com/denoland/fresh"
class="hover:text-green-600 inline-block"
>
<Icons.GitHub />
</a>
</li>
<li class="flex items-center">
<a
href="https://discord.com/channels/684898665143206084/991511118524715139"
class="hover:text-green-600 inline-block"
>
<Icons.Discord />
</a>
</li>
</ul>
</nav>
);