-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
379 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Props, c, css } from "atomico"; | ||
import { tokens } from "../site-tokens"; | ||
|
||
function siteAvatar({ media }: Props<typeof siteAvatar>) { | ||
return ( | ||
<host shadowDom> | ||
{!!media && <img src={media} alt="" class="avatar-img" />} | ||
<slot /> | ||
</host> | ||
); | ||
} | ||
|
||
siteAvatar.props = { | ||
media: String, | ||
label: String, | ||
} satisfies Props; | ||
|
||
siteAvatar.styles = [ | ||
tokens, | ||
css` | ||
:host { | ||
display: flex; | ||
align-items: center; | ||
--link-background: transparent; | ||
--link-color: unset; | ||
gap: var(--size-2); | ||
text-transform: uppercase; | ||
font-size: var(--size-3); | ||
letter-spacing: var(--size-1); | ||
} | ||
.avatar-img { | ||
width: var(--size-6); | ||
height: var(--size-6); | ||
border-radius: 100vh; | ||
} | ||
`, | ||
]; | ||
|
||
export const SiteAvatar = c(siteAvatar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import { Props, c, css } from "atomico"; | ||
import { tokens } from "../site-tokens"; | ||
import { Twitter, Github, Discord, Youtube } from "../site-socials/logos"; | ||
|
||
function siteSocials({ | ||
twitter, | ||
github, | ||
discord, | ||
youtube, | ||
}: Props<typeof siteSocials>) { | ||
return ( | ||
<host shadowDom> | ||
{!!twitter && ( | ||
<a | ||
href={`https://twitter.com/${twitter}`} | ||
class="link" | ||
target="_blank" | ||
> | ||
<Twitter cloneNode /> | ||
</a> | ||
)} | ||
{!!github && ( | ||
<a | ||
class="link" | ||
href={`https://github.com/${github}`} | ||
target="_blank" | ||
> | ||
<Github cloneNode /> | ||
</a> | ||
)} | ||
{!!discord && ( | ||
<a | ||
class="link" | ||
href={`https://discord.com/invite/${discord}`} | ||
target="_blank" | ||
> | ||
<Discord cloneNode /> | ||
</a> | ||
)} | ||
{!!youtube && ( | ||
<a | ||
class="link" | ||
href={`https://www.youtube.com/${youtube}`} | ||
target="_blank" | ||
> | ||
<Youtube cloneNode /> | ||
</a> | ||
)} | ||
</host> | ||
); | ||
} | ||
|
||
siteSocials.props = { | ||
twitter: String, | ||
github: String, | ||
discord: String, | ||
youtube: String, | ||
}; | ||
|
||
siteSocials.styles = [ | ||
tokens, | ||
css` | ||
:host { | ||
display: inline-flex; | ||
border-radius: 100px; | ||
border: var(--link-social-border); | ||
padding: var(--link-social-space); | ||
--link-container: var(--color-link-social-container); | ||
--link-invert: var(--color-link-social-invert); | ||
} | ||
.link { | ||
width: var(--link-social-size); | ||
height: var(--link-social-size); | ||
display: flex; | ||
background: none; | ||
color: unset; | ||
border: none; | ||
border-radius: 100px; | ||
background: var(--link-container); | ||
color: var(--link-invert); | ||
align-items: center; | ||
justify-content: center; | ||
transition: var(--link-transition); | ||
cursor: pointer; | ||
} | ||
.link svg { | ||
width: 50%; | ||
height: 50%; | ||
} | ||
.link svg * { | ||
fill: currentColor; | ||
} | ||
.link:hover { | ||
--link-container: var(--color-link-social-invert); | ||
--link-invert: var(--color-link-social-container); | ||
} | ||
`, | ||
]; | ||
|
||
export const SiteSocials = c(siteSocials); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { template, JSX } from "atomico"; | ||
|
||
export const Twitter = template( | ||
<svg viewBox="0 0 1200 1227" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" | ||
fill="white" | ||
/> | ||
</svg> | ||
) as JSX; | ||
|
||
export const Github = template( | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 98"> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" | ||
fill="#fff" | ||
/> | ||
</svg> | ||
) as JSX; | ||
|
||
export const Discord = template( | ||
<svg viewBox="0 0 127.14 96.36"> | ||
<path | ||
fill="#fff" | ||
d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" | ||
/> | ||
</svg> | ||
) as JSX; | ||
|
||
export const Youtube = template( | ||
<svg viewBox="-35.20005 -41.33325 305.0671 247.9995"> | ||
<path | ||
d="M93.333 117.559V47.775l61.334 34.893zm136.43-91.742c-2.699-10.162-10.651-18.165-20.747-20.881C190.716 0 117.333 0 117.333 0S43.951 0 25.651 4.936C15.555 7.652 7.603 15.655 4.904 25.817 0 44.236 0 82.667 0 82.667s0 38.429 4.904 56.849c2.699 10.163 10.65 18.165 20.747 20.883 18.3 4.934 91.682 4.934 91.682 4.934s73.383 0 91.683-4.934c10.096-2.718 18.048-10.72 20.747-20.883 4.904-18.42 4.904-56.85 4.904-56.85s0-38.43-4.904-56.849" | ||
fill="#fff" | ||
/> | ||
</svg> | ||
) as JSX; |
Oops, something went wrong.