Skip to content

Commit f4bad04

Browse files
committed
add animations
1 parent c32a8ee commit f4bad04

File tree

1 file changed

+105
-9
lines changed

1 file changed

+105
-9
lines changed

src/App.svelte

Lines changed: 105 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
2-
import { styleOptions } from './styleOptions';
2+
import { fly } from "svelte/transition";
3+
import { styleOptions } from "./styleOptions";
34
</script>
45

56
<svelte:head>
@@ -13,12 +14,12 @@
1314
property="og:description"
1415
content="Portfolio of Johnathon Zheng, UC Berkeley Applied Mathematics student."
1516
/>
16-
<meta property="og:image" content="https://johnatho.nz/preview.png" />
17+
<meta property="og:image" content="https://johnatho.nz/preview.png" />
1718
<meta property="og:url" content="https://johnatho.nz" />
1819
<meta property="og:type" content="website" />
1920
</svelte:head>
2021

21-
<main class="page">
22+
<main class="page" transition:fly={{ y: -50, duration: 600 }}>
2223
<h1>Johnathon Zheng</h1>
2324

2425
<div class="image-container">
@@ -42,12 +43,15 @@
4243
</ul>
4344

4445
<p>
45-
I'm currently studying Applied Mathematics at the University of California, Berkeley. I earned my
46-
Associate of Science degrees in Computer Science and Mathematics from Skyline College in Spring 2025.
46+
I'm currently studying Applied Mathematics at the University of California,
47+
Berkeley. I earned my Associate of Science degrees in Computer Science and
48+
Mathematics from Skyline College in Spring 2025.
4749
</p>
4850
<p>
49-
My interests include programming, system administration and computer vision. Projects I've worked on are
50-
available on <a href="https://github.com/jojohnathon">Github</a>.
51+
My interests include programming, system administration and computer vision.
52+
Projects I've worked on are available on <a
53+
href="https://github.com/jojohnathon">Github</a
54+
>.
5155
</p>
5256

5357
<section class="style-options" aria-labelledby="style-options-heading">
@@ -87,19 +91,27 @@
8791
font-weight: 700;
8892
letter-spacing: -0.04em;
8993
margin: 0;
94+
animation: slideUp 0.4s ease 0s backwards;
9095
}
9196
9297
.image-container {
9398
display: flex;
9499
height: 50%;
95100
gap: 0.625rem;
101+
animation: slideUp 0.4s ease 0.05s backwards;
96102
}
97103
98104
.image-container img {
99105
max-width: 50%;
100106
height: auto;
101107
border-radius: 1rem;
102108
object-fit: cover;
109+
transition: transform 0.3s ease;
110+
cursor: pointer;
111+
}
112+
113+
.image-container img:hover {
114+
transform: scale(1.05) rotate(1deg);
103115
}
104116
105117
.contact-list {
@@ -109,16 +121,99 @@
109121
display: flex;
110122
flex-direction: column;
111123
gap: 0.5rem;
124+
animation: slideUp 0.4s ease 0.1s backwards;
125+
}
126+
127+
.contact-list li {
128+
animation: slideUp 0.4s ease backwards;
129+
}
130+
131+
.contact-list li:nth-child(1) {
132+
animation-delay: 0.15s;
133+
}
134+
.contact-list li:nth-child(2) {
135+
animation-delay: 0.2s;
136+
}
137+
.contact-list li:nth-child(3) {
138+
animation-delay: 0.25s;
139+
}
140+
141+
p {
142+
animation: slideUp 0.4s ease backwards;
143+
}
144+
145+
p:nth-of-type(1) {
146+
animation-delay: 0.3s;
147+
}
148+
p:nth-of-type(2) {
149+
animation-delay: 0.35s;
150+
}
151+
152+
@keyframes slideUp {
153+
from {
154+
opacity: 0;
155+
transform: translateY(20px);
156+
}
157+
to {
158+
opacity: 1;
159+
transform: translateY(0);
160+
}
112161
}
113162
114163
.contact-list a {
115164
color: #2563eb;
116165
font-weight: 600;
117166
text-decoration: none;
167+
position: relative;
168+
padding: 0.25rem 0.5rem;
169+
border-radius: 0.25rem;
170+
transition: color 0.3s ease;
171+
}
172+
173+
.contact-list a::after {
174+
content: "";
175+
position: absolute;
176+
bottom: 0.1rem;
177+
left: 0.5rem;
178+
width: 0;
179+
height: 2px;
180+
background: #2563eb;
181+
transition: width 0.3s ease;
118182
}
119183
120184
.contact-list a:hover {
121-
text-decoration: underline;
185+
color: #1d47a1;
186+
}
187+
188+
.contact-list a:hover::after {
189+
width: calc(100% - 1rem);
190+
}
191+
192+
p a {
193+
color: #2563eb;
194+
font-weight: 600;
195+
text-decoration: none;
196+
position: relative;
197+
transition: color 0.3s ease;
198+
}
199+
200+
p a::after {
201+
content: "";
202+
position: absolute;
203+
bottom: 0.05rem;
204+
left: 0;
205+
width: 0;
206+
height: 2px;
207+
background: #2563eb;
208+
transition: width 0.3s ease;
209+
}
210+
211+
p a:hover {
212+
color: #1d47a1;
213+
}
214+
215+
p a:hover::after {
216+
width: 100%;
122217
}
123218
124219
p {
@@ -162,7 +257,8 @@
162257
padding: 0.75rem;
163258
background: rgba(15, 23, 42, 0.08);
164259
border-radius: 0.75rem;
165-
font-family: 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
260+
font-family: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono",
261+
monospace;
166262
font-size: 0.9rem;
167263
white-space: pre-wrap;
168264
}

0 commit comments

Comments
 (0)