Skip to content

Commit ed8f1da

Browse files
committed
Use CSS animation for main page logo
Allows a smoother animation during load. Remove scrollreveal.js, since this was the only usage.
1 parent c99e771 commit ed8f1da

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

docs/css/default.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,39 @@ div#header li.nav-item > a.nav-link {
143143
color: #fff;
144144
}
145145

146+
@-webkit-keyframes fadeInLogo {
147+
from {
148+
transform: translateY(0) scale(0.8);
149+
opacity: 0;
150+
}
151+
152+
to {
153+
transform: translateY(0) scale(1);
154+
opacity: 1;
155+
}
156+
}
157+
158+
@keyframes fadeInLogo {
159+
from {
160+
transform: translateY(0) scale(0.8);
161+
opacity: 0;
162+
}
163+
164+
to {
165+
transform: translateY(0) scale(1);
166+
opacity: 1;
167+
}
168+
}
169+
146170
div.scala-logo-container {
147171
height: calc(100vh - 80px);
148172
margin: auto;
149173
position: absolute;
150174
top: 80px; right: 0; bottom: 0; left: 0;
175+
-webkit-animation: 2s fadeInLogo;
176+
animation: 2s fadeInLogo;
177+
-webkit-animation-timing-function: cubic-bezier(0.6, 0.2, 0.1, 1) 0.1s;
178+
animation-timing-function: cubic-bezier(0.6, 0.2, 0.1, 1) 0.1s;
151179
}
152180

153181
div.scala-logo-container > p {
@@ -476,6 +504,11 @@ and (-webkit-device-pixel-ratio: 2)
476504
font-size: 2em;
477505
}
478506

507+
div.scala-logo-container {
508+
-webkit-animation: none;
509+
animation: none;
510+
}
511+
479512
#collapsed-header > div > ul > li > a {
480513
color: #fff;
481514
}

docs/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
extraJS:
88
- js/elasticlunr.min.js
99
- js/search.js
10-
- js/scrollreveal.min.js
11-
- js/index.js
1210
---
1311
<div id="content">
1412
{% include logo-page.html %}

docs/js/index.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/js/scrollreveal.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)