Skip to content

Commit

Permalink
www: add social links
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard committed Apr 5, 2024
1 parent 27b663e commit 29c715d
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
18 changes: 18 additions & 0 deletions www/src/components/DiscordIcon.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="25.99 31.97 588.02 448.01"><path d="M524.5 69.8a1.5 1.5 0 00-.8-.7A485.1 485.1 0 00404.1 32a1.8 1.8 0 00-1.9.9 337.5 337.5 0 00-14.9 30.6 447.8 447.8 0 00-134.4 0 309.5 309.5 0 00-15.1-30.6 1.9 1.9 0 00-1.9-.9 483.7 483.7 0 00-119.8 37.1 1.7 1.7 0 00-.8.7C39.1 183.7 18.2 294.7 28.4 404.4a2 2 0 00.8 1.4A487.7 487.7 0 00176 479.9a1.9 1.9 0 002.1-.7 348.2 348.2 0 0030-48.8 1.9 1.9 0 00-1-2.6 321.2 321.2 0 01-45.9-21.9 1.9 1.9 0 01-.2-3.1c3.1-2.3 6.2-4.7 9.1-7.1a1.8 1.8 0 011.9-.3c96.2 43.9 200.4 43.9 295.5 0a1.8 1.8 0 011.9.2c2.9 2.4 6 4.9 9.1 7.2a1.9 1.9 0 01-.2 3.1 301.4 301.4 0 01-45.9 21.8 1.9 1.9 0 00-1 2.6 391.1 391.1 0 0030 48.8 1.9 1.9 0 002.1.7 486 486 0 00147.2-74.1 1.9 1.9 0 00.8-1.4c12.2-126.7-20.6-236.8-87-334.5zm-302 267.8c-29 0-52.8-26.6-52.8-59.2s23.4-59.3 52.8-59.3c29.7 0 53.3 26.8 52.8 59.2 0 32.7-23.4 59.3-52.8 59.3zm195.4 0c-29 0-52.8-26.6-52.8-59.2s23.3-59.3 52.8-59.3c29.7 0 53.3 26.8 52.8 59.2 0 32.7-23.2 59.3-52.8 59.3z"/></svg>

<style>
svg {
height: 25px;
width: 25px;
cursor: pointer;
}

svg path {
transition: .2s;
fill: var(--textLight);
}

svg:hover path {
fill: var(--text);
}
</style>
18 changes: 18 additions & 0 deletions www/src/components/GitHubIcon.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 8 496 483.61"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>

<style>
svg {
height: 25px;
width: 25px;
cursor: pointer;
}

svg path {
transition: .2s;
fill: var(--textLight);
}

svg:hover path {
fill: var(--text);
}
</style>
18 changes: 18 additions & 0 deletions www/src/components/ShareIcon.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="2 .1 12 14.9"><path d="M3.75 6.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25v-6.5a.25.25 0 00-.25-.25h-1a.75.75 0 010-1.5h1c.966 0 1.75.784 1.75 1.75v6.5A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25v-6.5C2 5.784 2.784 5 3.75 5h1a.75.75 0 010 1.5zM7.823.177a.25.25 0 01.354 0l2.896 2.896a.25.25 0 01-.177.427H8.75v5.75a.75.75 0 01-1.5 0V3.5H5.104a.25.25 0 01-.177-.427z"/></svg>

<style>
svg {
height: 25px;
width: 25px;
cursor: pointer;
}

svg path {
transition: .2s;
fill: var(--textLight);
}

svg:hover path {
fill: var(--text);
}
</style>
29 changes: 29 additions & 0 deletions www/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import Layout from '../layouts/Layout.astro'
import Logo from '../components/Logo.astro'
import Footer from '../components/Footer.astro'
import DiscordIcon from '../components/DiscordIcon.astro'
import GitHubIcon from '../components/GitHubIcon.astro'
import ShareIcon from '../components/ShareIcon.astro'
---

<Layout title="The Deno Registry">
Expand All @@ -16,12 +19,30 @@ import Footer from '../components/Footer.astro'
<p>In contrast to deno.land/x, deno.re is not a stand-alone module registry, but instead leverages existing infrastructure and stores modules permanently.</p>

<p>You can import specific commits based on their SHA1 checksum, minify files on the fly or omit the entry point and let deno.re automatically find it for you.</p>

<span>
<a href="/github" target="_blank"><GitHubIcon /></a>
<a href="/discord"><DiscordIcon /></a>
<a href="#" id="share"><ShareIcon /></a>
</span>
</div>

<Footer />
</div>
</Layout>

<script>
const icon = document.querySelector("#share")!

icon.addEventListener("click", () => {
navigator.share({
url: "https://deno.re",
title: "The Deno Registry",
text: "The immutable, feature-rich module registry for GitHub repositories."
})
})
</script>

<style>
.page {
width: 90%;
Expand All @@ -43,6 +64,14 @@ import Footer from '../components/Footer.astro'
color: var(--textLight);
}

.readme span {
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
gap: 10px;
}

.readme pre {
text-align: center;
font-size: 16px;
Expand Down

0 comments on commit 29c715d

Please sign in to comment.