forge
Explore
Log in

Don't you dare go Hollow

hezarfen_landing

Clone
★ 0

0 watching0 forksTypeScript581.6 KiB94b1804Burak Boduroğlu2 months ago15 commits

Logo.tsx55 lines, 1.8 KiBHistoryRawDownload
1import { A } from "@solidjs/router";
2import { Show } from "solid-js";
3import { routes, site } from "~/config";
4
5/**
6 * The brand mark: a wing drawn in pixels, climbing to the right — Hezarfen
7 * Ahmed Çelebi's flight, and the shape a student's data takes once it becomes
8 * a plan. The leading edge is the accent; the trailing feathers are the ink
9 * of whatever surface the mark sits on, at low alpha.
10 *
11 * Below ~24px the trailing cells close up into a smudge, so those sizes drop
12 * to the reduced cut the favicon uses: leading edge only.
13 */
14export function LogoMark(props: { size?: number; class?: string }) {
15 const size = () => props.size ?? 26;
16 const compact = () => size() < 24;
17
18 return (
19 <svg
20 width={size()}
21 height={size()}
22 viewBox="0 0 256 256"
23 fill="none"
24 aria-hidden="true"
25 shape-rendering="crispEdges"
26 class={props.class}
27 >
28 <g fill="var(--brand, #00add8)">
29 <rect x="30" y="166" width="44" height="44" rx="6" />
30 <rect x="86" y="122" width="44" height="44" rx="6" />
31 <rect x="142" y="78" width="44" height="44" rx="6" />
32 <rect x="198" y="34" width="44" height="44" rx="6" />
33 </g>
34
35 <Show when={!compact()}>
36 <g fill="currentColor" opacity="0.22">
37 <rect x="86" y="178" width="44" height="32" rx="6" />
38 <rect x="142" y="134" width="44" height="32" rx="6" />
39 <rect x="142" y="178" width="44" height="32" rx="6" />
40 <rect x="198" y="90" width="44" height="32" rx="6" />
41 <rect x="198" y="134" width="44" height="32" rx="6" />
42 </g>
43 </Show>
44 </svg>
45 );
46}
47
48export default function Logo(props: { size?: number }) {
49 return (
50 <A href={routes.home} aria-label={site.name} class="hz-logo">
51 <LogoMark size={props.size} />
52 <span>Hezarfen</span>
53 </A>
54 );
55}