Skip to content

Commit 69e1f26

Browse files
committed
init: hero section base done
1 parent 00afcc2 commit 69e1f26

File tree

12 files changed

+130
-132
lines changed

12 files changed

+130
-132
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
workflow_dispatch:
77

88
permissions:
@@ -32,4 +32,4 @@ jobs:
3232
steps:
3333
- name: Deploy to GitHub Pages
3434
id: deployment
35-
uses: actions/deploy-pages@v4
35+
uses: actions/deploy-pages@v4

docs/astro.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { defineConfig } from 'astro/config';
1+
import { defineConfig } from 'astro/config'
22

3-
import tailwind from '@astrojs/tailwind';
3+
import tailwind from '@astrojs/tailwind'
44

55
// https://astro.build/config
66
export default defineConfig({
77
integrations: [tailwind()]
8-
});
8+
})

docs/public/code.png

103 KB
Loading

docs/public/dizzy-face.png

281 KB
Loading

docs/src/components/Navbar.astro

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
---
3+
4+
<nav class="sticky inset-x-0 z-30 w-full transition-all bg-transparent">
5+
<div class="max-w-7xl mx-auto lg:px-8 px-6">
6+
<div class="relative flex h-14 items-center justify-between">
7+
<a href="/" class="font-semibold text-base flex items-center">
8+
<img src="/dizzy-face.png" alt="utilstash" srcset="" class="w-6 h-6 mr-1">
9+
Utilstash
10+
</a>
11+
<button class="px-4 bg-primary h-10 rounded-full text-base">
12+
Star on GitHub
13+
</button>
14+
</div>
15+
</div>
16+
</nav>

docs/src/components/ui/Copy.astro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
3+
---
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
width="16"
7+
height="16"
8+
viewBox="0 0 24 24"
9+
fill="none"
10+
stroke="currentColor"
11+
stroke-width="1.5"
12+
stroke-linecap="round"
13+
stroke-linejoin="round"
14+
class="lucide lucide-copy"
15+
><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path
16+
d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg
17+
>

docs/src/components/ui/Right.astro

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
---
3+
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
width="24"
7+
height="24"
8+
viewBox="0 0 24 24"
9+
fill="none"
10+
stroke="currentColor"
11+
stroke-width="2"
12+
stroke-linecap="round"
13+
stroke-linejoin="round"
14+
class="lucide lucide-check h-5 w-5 shrink-0 text-primary"
15+
><path d="M20 6 9 17l-5-5"></path></svg
16+
>

docs/src/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/// <reference path="../.astro/types.d.ts" />
1+
/// <reference path="../.astro/types.d.ts" />

docs/src/layouts/Layout.astro

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import Navbar from '../components/Navbar.astro';
23
interface Props {
34
title: string;
45
}
@@ -13,10 +14,16 @@ const { title } = Astro.props;
1314
<meta name="description" content="Astro description" />
1415
<meta name="viewport" content="width=device-width" />
1516
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
17+
<!-- GOOGLE FONTS -->
18+
<link rel="preconnect" href="https://fonts.googleapis.com">
19+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
20+
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap" rel="stylesheet">
21+
<!-- GOOGLE FONTS -->
1622
<meta name="generator" content={Astro.generator} />
1723
<title>{title}</title>
1824
</head>
1925
<body>
26+
<Navbar />
2027
<slot />
2128
</body>
2229
</html>
@@ -33,8 +40,9 @@ const { title } = Astro.props;
3340
);
3441
}
3542
html {
36-
font-family: system-ui, sans-serif;
37-
background: #13151a;
43+
font-family: "Space Grotesk", sans-serif;
44+
font-optical-sizing: auto;
45+
font-style: normal;
3846
}
3947
code {
4048
font-family:

docs/src/pages/index.astro

Lines changed: 55 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,60 @@
11
---
2-
import Layout from '../layouts/Layout.astro';
3-
import Card from '../components/Card.astro';
2+
import Layout from '../layouts/Layout.astro'
3+
import Right from '../components/ui/Right.astro'
4+
import Copy from '../components/ui/Copy.astro'
45
---
56

67
<Layout title="Welcome to Astro.">
7-
<main>
8-
<svg
9-
class="astro-a"
10-
width="495"
11-
height="623"
12-
viewBox="0 0 495 623"
13-
fill="none"
14-
xmlns="http://www.w3.org/2000/svg"
15-
aria-hidden="true"
16-
>
17-
<path
18-
fill-rule="evenodd"
19-
clip-rule="evenodd"
20-
d="M167.19 364.254C83.4786 364.254 0 404.819 0 404.819C0 404.819 141.781 19.4876 142.087 18.7291C146.434 7.33701 153.027 0 162.289 0H332.441C341.703 0 348.574 7.33701 352.643 18.7291C352.92 19.5022 494.716 404.819 494.716 404.819C494.716 404.819 426.67 364.254 327.525 364.254L264.41 169.408C262.047 159.985 255.147 153.581 247.358 153.581C239.569 153.581 232.669 159.985 230.306 169.408L167.19 364.254ZM160.869 530.172C160.877 530.18 160.885 530.187 160.894 530.195L160.867 530.181C160.868 530.178 160.868 530.175 160.869 530.172ZM136.218 411.348C124.476 450.467 132.698 504.458 160.869 530.172C160.997 529.696 161.125 529.242 161.248 528.804C161.502 527.907 161.737 527.073 161.917 526.233C165.446 509.895 178.754 499.52 195.577 500.01C211.969 500.487 220.67 508.765 223.202 527.254C224.141 534.12 224.23 541.131 224.319 548.105C224.328 548.834 224.337 549.563 224.347 550.291C224.563 566.098 228.657 580.707 237.264 593.914C245.413 606.426 256.108 615.943 270.749 622.478C270.593 621.952 270.463 621.508 270.35 621.126C270.045 620.086 269.872 619.499 269.685 618.911C258.909 585.935 266.668 563.266 295.344 543.933C298.254 541.971 301.187 540.041 304.12 538.112C310.591 533.854 317.059 529.599 323.279 525.007C345.88 508.329 360.09 486.327 363.431 457.844C364.805 446.148 363.781 434.657 359.848 423.275C358.176 424.287 356.587 425.295 355.042 426.275C351.744 428.366 348.647 430.33 345.382 431.934C303.466 452.507 259.152 455.053 214.03 448.245C184.802 443.834 156.584 436.019 136.218 411.348Z"
21-
fill="url(#paint0_linear_1805_24383)"></path>
22-
<defs>
23-
<linearGradient
24-
id="paint0_linear_1805_24383"
25-
x1="247.358"
26-
y1="0"
27-
x2="247.358"
28-
y2="622.479"
29-
gradientUnits="userSpaceOnUse"
30-
>
31-
<stop stop-opacity="0.9"></stop>
32-
<stop offset="1" stop-opacity="0.2"></stop>
33-
</linearGradient>
34-
</defs>
35-
</svg>
36-
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
37-
<p class="instructions">
38-
To get started, open the directory <code>src/pages</code> in your project.<br />
39-
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
40-
</p>
41-
<ul role="list" class="link-card-grid">
42-
<Card
43-
href="https://docs.astro.build/"
44-
title="Documentation"
45-
body="Learn how Astro works and explore the official API docs."
46-
/>
47-
<Card
48-
href="https://astro.build/integrations/"
49-
title="Integrations"
50-
body="Supercharge your project with new frameworks and libraries."
51-
/>
52-
<Card
53-
href="https://astro.build/themes/"
54-
title="Themes"
55-
body="Explore a galaxy of community-built starter themes."
56-
/>
57-
<Card
58-
href="https://astro.build/chat/"
59-
title="Community"
60-
body="Come say hi to our amazing Discord community. ❤️"
61-
/>
62-
</ul>
63-
</main>
8+
<main class="">
9+
<div class="relative overflow-hidden">
10+
<div
11+
class="mx-auto max-w-7xl pb-24 pt-10 sm:grid lg:grid-cols-2 sm:pb-32 lg:gap-x-8 lg:px-8 lg:pt-24 lg:pb-52"
12+
>
13+
<div class="px-6 lg:px-0 lg:pt-4">
14+
<div
15+
class="mx-auto max-w-lg text-center sm:text-left flex flex-col items-center lg:items-start"
16+
>
17+
<h1
18+
class="relative tracking-tight sm:text-left mt-10 font-bold !leading-[4rem] text-gray-900 text-5xl md:text-7xl"
19+
>
20+
Utilstash
21+
</h1>
22+
<p
23+
class="mt-8 text-lg lg:pr-10 text-center lg:text-left text-balance md:text-wrap"
24+
>
25+
utilstash is a utility package that provides various common tools
26+
and functions for use in your JavaScript and TypeScript projects.
27+
</p>
28+
<ul
29+
class="mt-8 space-y-2 font-medium flex flex-col items-center sm:items-start"
30+
>
31+
<div class="space-y-2">
32+
<li class="flex gap-1.5 items-center text-left">
33+
<Right />
34+
A collection of utility functions for everyday tasks.
35+
</li>
36+
<li class="flex gap-1.5 items-center text-left">
37+
<Right />
38+
Written in TypeScript with type definitions included.
39+
</li>
40+
<li class="flex gap-1.5 items-center text-left">
41+
<Right />
42+
Uses the latest ECMAScript features.
43+
</li>
44+
</div>
45+
</ul>
46+
<button
47+
class="mt-4 px-4 border border-primary backdrop-blur-lg h-10 rounded-xl text-base flex justify-center items-center gap-3 transition-all duration-300 ease-in-out hover:shadow-[inset_0px_0px_10px_8px_hsl(35,100%,85%)]"
48+
>
49+
npm install utilstash
50+
<Copy />
51+
</button>
52+
</div>
53+
</div>
54+
<div class="relative px-8 sm:px-16 md:px-0 mt-28 md:mx-auto md:max-w-xl w-full lg:mx-0 lg:mt-20">
55+
<img class="border-dashed border-2 rounded-lg" src="/code.png" alt="" srcset="">
56+
</div>
57+
</div>
58+
</div>
59+
</main>
6460
</Layout>
65-
66-
<style>
67-
main {
68-
margin: auto;
69-
padding: 1rem;
70-
width: 800px;
71-
max-width: calc(100% - 2rem);
72-
color: white;
73-
font-size: 20px;
74-
line-height: 1.6;
75-
}
76-
.astro-a {
77-
position: absolute;
78-
top: -32px;
79-
left: 50%;
80-
transform: translatex(-50%);
81-
width: 220px;
82-
height: auto;
83-
z-index: -1;
84-
}
85-
h1 {
86-
font-size: 4rem;
87-
font-weight: 700;
88-
line-height: 1;
89-
text-align: center;
90-
margin-bottom: 1em;
91-
}
92-
.text-gradient {
93-
background-image: var(--accent-gradient);
94-
-webkit-background-clip: text;
95-
-webkit-text-fill-color: transparent;
96-
background-size: 400%;
97-
background-position: 0%;
98-
}
99-
.instructions {
100-
margin-bottom: 2rem;
101-
border: 1px solid rgba(var(--accent-light), 25%);
102-
background: linear-gradient(rgba(var(--accent-dark), 66%), rgba(var(--accent-dark), 33%));
103-
padding: 1.5rem;
104-
border-radius: 8px;
105-
}
106-
.instructions code {
107-
font-size: 0.8em;
108-
font-weight: bold;
109-
background: rgba(var(--accent-light), 12%);
110-
color: rgb(var(--accent-light));
111-
border-radius: 4px;
112-
padding: 0.3em 0.4em;
113-
}
114-
.instructions strong {
115-
color: rgb(var(--accent-light));
116-
}
117-
.link-card-grid {
118-
display: grid;
119-
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
120-
gap: 2rem;
121-
padding: 0;
122-
}
123-
</style>

0 commit comments

Comments
 (0)