Skip to content

Commit 0077b46

Browse files
author
James Harris
committed
Ice video bg animation
1 parent d7edc16 commit 0077b46

File tree

3 files changed

+43
-11
lines changed

3 files changed

+43
-11
lines changed

assets/css/app.css

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,39 @@ main section.skills .skills-chart text {
235235
}
236236

237237
main header {
238-
padding: 1em;
238+
position: relative;
239239
grid-area: header;
240-
text-align: center;
241-
background-color: var(--colors-dark-grey);
242240
border-bottom-right-radius: 2px;
243241
border-bottom-left-radius: 2px;
242+
background: var(--colors-dark-grey);
243+
}
244+
245+
main header .head-container {
246+
padding: 1em;
247+
text-align: center;
248+
z-index: 1;
249+
}
250+
251+
#video-bg {
252+
width: 100%;
253+
height: 100%;
254+
object-fit: cover;
255+
position: absolute;
256+
left: 0;
257+
top: 0;
258+
z-index: 0;
259+
opacity: 0.3;
260+
261+
animation: animate-video 23s ease-in-out infinite;
262+
}
263+
264+
@keyframes animate-video {
265+
0% {opacity: 0;}
266+
10% {opacity: 0.1;}
267+
20% {opacity: 0.5;}
268+
60% {opacity: 0.3;}
269+
80% {opacity: 0.1;}
270+
100% {opacity: 0.01;}
244271
}
245272

246273
main header h1 {

assets/video/video-bg.mp4

9.5 MB
Binary file not shown.

index.ejs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,19 @@
122122

123123
<main>
124124
<header>
125-
<img src="/assets/svg/logo.svg" alt="JH" width="100">
126-
127-
<h1>
128-
<span>James</span>
129-
<span>Harris</span>
130-
</h1>
131-
<hr class="thin">
132-
<h2>Web Architect UX</h2>
125+
<video id="video-bg" muted autoplay loop>
126+
<source src="/assets/video/video-bg.mp4" type="video/mp4">
127+
</video>
128+
<div class="head-container">
129+
<img src="/assets/svg/logo.svg" alt="JH" width="100">
130+
131+
<h1>
132+
<span>James</span>
133+
<span>Harris</span>
134+
</h1>
135+
<hr class="thin">
136+
<h2>Web Architect UX</h2>
137+
</div>
133138
</header>
134139

135140
<h3>MY STORY</h3>

0 commit comments

Comments
 (0)