Skip to content

Commit 4ac11e5

Browse files
committed
feat: new home page
1 parent c572261 commit 4ac11e5

File tree

3 files changed

+100
-22
lines changed

3 files changed

+100
-22
lines changed

src/images/fireimage.gif

1.32 MB
Loading

src/pages/index.astro

Lines changed: 94 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,36 @@ import PostList from "@/components/PostList.astro";
44
import ToolList from "@/components/ToolList.astro";
55
import Ending from "@/components/Ending.astro";
66
import WebsiteStructuredData from "@/components/WebsiteStructuredData.astro";
7+
import { Image } from "astro:assets";
8+
9+
import heroImage from "@/images/fireimage.gif";
710
---
811

912
<Layout title="FireIsWebsite">
1013
<WebsiteStructuredData slot="structured-data" />
1114
<section class="hero">
12-
<h1>Hey, you!</h1>
13-
<p>Welcome to my personal hell website</p>
15+
<div class="hero-content">
16+
<Image src={heroImage} width={400} alt="" loading="eager" class="hero-image" />
17+
<div class="hero-text">
18+
<h1>FireIsGood</h1>
19+
<p>How did you get here?</p>
20+
<div class="buttons">
21+
<a role="button" class="secondary" href="#works">My Works &darr;</a>
22+
<a role="button" class="secondary outline" href="/about">About &rarr;</a>
23+
</div>
24+
</div>
25+
</div>
1426
</section>
1527
<section>
16-
<article class="inset">
17-
<h2>What is this?</h2>
18-
<p>
19-
The start of my website. I've made this to be a sort of headquarters for my web dev stuff. I'm a CSS enjoyer, so
20-
I hope this can host some fun stuff over time.
21-
</p>
22-
<p>
23-
This was created with <a href="https://astro.build/" target="_blank">Astro</a> and <a
24-
href="https://picocss.com/"
25-
target="_blank">Pico CSS</a
26-
>.
27-
</p>
28-
</article>
28+
<h2 id="works">Works</h2>
29+
<p>
30+
When I have the time, I like to write articles and silly tools. When I have even more time, I like to contribute
31+
to Open Source software. I enjoy doing origami and pondering arguably deranged topics as an aside. No matter how
32+
you got here, I hope you enjoy what you find.
33+
</p>
34+
<p>You can find all the things I do on my <a href="https://github.com/FireIsGood" target="_blank">GitHub</a></p>
2935
</section>
36+
<hr />
3037
<section>
3138
<h2>Recent blog posts</h2>
3239
<PostList postCount={3} />
@@ -41,25 +48,90 @@ import WebsiteStructuredData from "@/components/WebsiteStructuredData.astro";
4148
</Layout>
4249

4350
<style>
44-
section:not(.hero) + section {
45-
margin-top: 4rem;
51+
section + section {
52+
margin-top: 2rem;
4653
}
4754

4855
.hero {
4956
display: flex;
5057
flex-direction: column;
5158
justify-content: center;
52-
align-items: center;
53-
min-height: 60vh;
59+
min-height: calc(100vh - 4.5rem);
60+
max-width: 720px;
61+
margin-inline: auto;
62+
}
63+
64+
.hero-content {
65+
display: flex;
66+
justify-content: space-between;
67+
gap: 0.5rem;
68+
69+
h1 {
70+
font-size: 4rem;
71+
line-height: 1;
72+
}
73+
74+
p {
75+
margin-bottom: 1.4rem;
76+
}
77+
}
78+
79+
.hero-text {
80+
display: flex;
81+
flex-direction: column;
82+
justify-content: center;
83+
}
84+
85+
.hero-image {
86+
order: 1;
87+
margin: 0;
88+
max-width: 35%;
89+
animation: float 4s infinite;
90+
box-shadow: var(--shadow-outset);
91+
}
92+
93+
.buttons {
94+
display: flex;
95+
gap: 0.5rem;
96+
}
97+
98+
a[role="button"] {
99+
font-size: 0.9rem;
100+
padding: 0.5em 1em;
101+
border-radius: 2rem;
102+
}
103+
104+
hr {
105+
margin-block: 2.5rem;
54106
}
55107

56-
h1 {
57-
font-size: 2.5rem;
108+
#works {
109+
scroll-margin-top: 4rem;
58110
}
59111

60112
@media (max-width: 450px) {
61113
.hero {
62-
min-height: calc(60vh - 6rem);
114+
min-height: calc(100vh - 12rem);
115+
padding-bottom: 4rem;
116+
}
117+
.hero-content {
118+
flex-direction: column;
119+
}
120+
.hero-image {
121+
order: unset;
122+
margin-inline: auto;
123+
max-width: 60%;
124+
margin-bottom: 1.5rem;
125+
}
126+
}
127+
128+
@keyframes float {
129+
0%,
130+
100% {
131+
translate: 0 0;
132+
}
133+
50% {
134+
translate: 0 -8px;
63135
}
64136
}
65137
</style>

src/styles/global.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ html {
7171
height: 100%;
7272
scrollbar-color: rgb(from var(--pico-color) r g b / 20%) transparent;
7373
scrollbar-width: thin;
74+
scroll-behavior: smooth;
7475
}
7576
body {
7677
min-height: 100%;
@@ -145,6 +146,11 @@ img {
145146
border-radius: var(--pico-border-radius);
146147
}
147148

149+
/* In case you actually need it to be inline */
150+
img.inline {
151+
display: inline-block;
152+
}
153+
148154
a[href^="#"] {
149155
scroll-margin-top: 50vh;
150156
}

0 commit comments

Comments
 (0)