Skip to content

Commit a21ce50

Browse files
committed
feat: profile image on home
1 parent 2312d99 commit a21ce50

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

src/pages/about.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import graphicDesign from "@/images/graphic-design.png";
1414
<h1>About</h1>
1515
<section class="self-intro grid">
1616
<div class="image-container">
17-
<Image src={profileImage} width={160} alt="" loading="lazy" />
17+
<Image src={profileImage} width={160} alt="" loading="lazy" transition:name="profile-image" />
1818
</div>
1919
<ul>
2020
<li><strong>Name:</strong> Fire (is good)</li>
@@ -118,12 +118,11 @@ import graphicDesign from "@/images/graphic-design.png";
118118
}
119119

120120
.image-container {
121-
border-radius: var(--pico-border-radius);
122-
box-shadow: var(--shadow-outset);
123121
width: fit-content;
124122
justify-self: center;
125123

126124
& > img {
125+
box-shadow: var(--shadow-outset);
127126
height: 100%;
128127
}
129128
}

src/pages/index.astro

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ import Ending from "@/components/Ending.astro";
66
import WebsiteStructuredData from "@/components/WebsiteStructuredData.astro";
77
import { Image } from "astro:assets";
88
9-
import heroImage from "@/images/fireimage.gif";
9+
import heroImage from "@/images/profile-bg-med.png";
1010
---
1111

1212
<Layout title="FireIsWebsite">
1313
<WebsiteStructuredData slot="structured-data" />
1414
<section class="hero">
1515
<div class="hero-content">
16-
<Image src={heroImage} width={400} alt="" loading="eager" class="hero-image" />
16+
<div class="hero-image-stack">
17+
<Image src={heroImage} width={400} alt="" loading="eager" class="hero-image" transition:name="profile-image" />
18+
<div class="hero-image-backer"></div>
19+
</div>
1720
<div class="hero-text">
1821
<h1>FireIsGood</h1>
1922
<p>How did you get here?</p>
@@ -90,11 +93,24 @@ import heroImage from "@/images/fireimage.gif";
9093
justify-content: center;
9194
}
9295

93-
.hero-image {
96+
.hero-image-stack {
9497
order: 1;
95-
margin: 0;
9698
max-width: 35%;
99+
display: grid;
100+
}
101+
102+
.hero-image {
97103
box-shadow: var(--shadow-outset);
104+
grid-area: 1/2;
105+
}
106+
.hero-image-backer {
107+
background: var(--pico-secondary);
108+
border-radius: var(--pico-border-radius);
109+
grid-area: 1/2;
110+
position: relative;
111+
z-index: -1;
112+
box-shadow: var(--shadow-outset);
113+
animation: hero 60s linear infinite;
98114
}
99115

100116
.buttons {
@@ -131,4 +147,13 @@ import heroImage from "@/images/fireimage.gif";
131147
margin-bottom: 1.5rem;
132148
}
133149
}
150+
151+
@keyframes hero {
152+
0% {
153+
rotate: 0.025turn;
154+
}
155+
100% {
156+
rotate: 1.025turn;
157+
}
158+
}
134159
</style>

0 commit comments

Comments
 (0)