Skip to content

Commit 029c87e

Browse files
committed
page loader imp
1 parent f959748 commit 029c87e

File tree

9 files changed

+73
-30
lines changed

9 files changed

+73
-30
lines changed

src/detail.html

-11
Original file line numberDiff line numberDiff line change
@@ -1263,17 +1263,6 @@ <h3>Lorem ipsum dolor sit amet</h3>
12631263
<script src="//cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js"></script>
12641264
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"></script>
12651265
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/languages/javascript.min.js"></script>
1266-
<script>
1267-
WebFont.load({
1268-
google: {
1269-
families: ['JetBrains Mono']
1270-
},
1271-
timeout: 5000,
1272-
fontactive: function () {
1273-
hljs && hljs.highlightAll();
1274-
}
1275-
});
1276-
</script>
12771266
<script src="fibonacci.js"></script>
12781267
</body>
12791268
</html>

src/index.html

-11
Original file line numberDiff line numberDiff line change
@@ -570,17 +570,6 @@ <h4>
570570
<script src="//cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js"></script>
571571
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"></script>
572572
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/languages/javascript.min.js"></script>
573-
<script>
574-
WebFont.load({
575-
google: {
576-
families: ['JetBrains Mono']
577-
},
578-
timeout: 5000,
579-
fontactive: function () {
580-
hljs && hljs.highlightAll();
581-
}
582-
});
583-
</script>
584573
<script src="fibonacci.js"></script>
585574
</body>
586575
</html>

src/js/boot.js

+10
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,14 @@ export function init() {
8484
}
8585

8686
mediaChangeHandler(mediaQuery);
87+
88+
WebFont.load({
89+
google: {
90+
families: ['JetBrains Mono']
91+
},
92+
timeout: 5000,
93+
fontactive: function () {
94+
hljs && hljs.highlightAll();
95+
}
96+
});
8797
}

src/scss/site/_animations.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@keyframes arrow-move-left {
1+
@keyframes anim__arrow-move-left {
22
0% {
33
left: 0;
44
}
@@ -10,7 +10,7 @@
1010
}
1111
}
1212

13-
@keyframes arrow-move-right {
13+
@keyframes anim__arrow-move-right {
1414
0% {
1515
right: 0;
1616
}

src/scss/site/_article.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ a.cmp__article-continue-reading {
274274
}
275275

276276
&:hover:after {
277-
animation: arrow-move-right fibVars.$medium-speed linear infinite;
277+
animation: anim__arrow-move-right fibVars.$medium-speed linear infinite;
278278
}
279279
}
280280

src/scss/site/_page-loader.scss

+53-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
@use '../base/variables' as fibVars;
22
@use '../base/mixins' as fibMixins;
3+
@use '../base/funcs' as fibFuncs;
34
@use 'variables' as fibSiteVars;
45

56
.cmp__page-loader {
7+
$stripe: #{darken(fibVars.$brand-bg, 2%)};
8+
69
position: fixed;
710
z-index: 200;
811
top: 0;
@@ -11,7 +14,13 @@
1114
min-height: 100vh;
1215
opacity: 1;
1316
transition: all fibVars.$medium-speed ease-in;
14-
background: url('#{fibVars.$assets-path}/background-dark.png') fibVars.$brand-bg;
17+
18+
background: linear-gradient(135deg, fibVars.$brand-bg 25%, transparent 25%) -50px 0,
19+
linear-gradient(225deg, fibVars.$brand-bg 25%, transparent 25%) -50px 0,
20+
linear-gradient(315deg, fibVars.$brand-bg 25%, transparent 25%),
21+
linear-gradient(45deg, fibVars.$brand-bg 25%, transparent 25%);
22+
background-size: 100px 100px;
23+
background-color: $stripe;
1524

1625
.cmp__loader-container {
1726
@include fibMixins.flex_init($column: true, $center: true);
@@ -30,6 +39,49 @@
3039
}
3140
letter-spacing: fibVars.$medium-letter-spacing;
3241
color: fibVars.$dim-gray;
42+
animation: anim__text-glow fibVars.$snail-speed infinite;
3343
}
3444
}
45+
}
46+
47+
@keyframes anim__text-glow {
48+
0% {
49+
text-shadow: fibVars.$white 0 0 2px;
50+
}
51+
50% {
52+
text-shadow: fibVars.$white 0 0 10px;
53+
}
54+
100% {
55+
text-shadow: fibVars.$white 0 0 2px;
56+
}
57+
}
58+
59+
@keyframes anim__path-glow {
60+
0% {
61+
filter: drop-shadow(0 0 2px fibVars.$white);
62+
}
63+
50% {
64+
filter: drop-shadow(0 0 6px fibVars.$white);
65+
}
66+
100% {
67+
filter: drop-shadow(0 0 2px fibVars.$white);
68+
}
69+
}
70+
71+
@keyframes anim__random {
72+
0% {
73+
background-image: linear-gradient(90deg, #fb3 11px, transparent 0),
74+
linear-gradient(90deg, #ab4 23px, transparent 0),
75+
linear-gradient(90deg, #655 41px, transparent 0);
76+
}
77+
50% {
78+
background-image: linear-gradient(90deg, #ab4 11px, transparent 0),
79+
linear-gradient(90deg, #655 23px, transparent 0),
80+
linear-gradient(90deg, #fb3 41px, transparent 0);
81+
}
82+
100% {
83+
background-image: linear-gradient(90deg, #fb3 11px, transparent 0),
84+
linear-gradient(90deg, #ab4 23px, transparent 0),
85+
linear-gradient(90deg, #655 41px, transparent 0);
86+
}
3587
}

src/scss/site/_pagination.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626

2727
&:hover:before {
28-
animation: arrow-move-left fibVars.$medium-speed linear infinite;
28+
animation: anim__arrow-move-left fibVars.$medium-speed linear infinite;
2929
}
3030
}
3131
}
@@ -41,7 +41,7 @@
4141
}
4242

4343
&:hover:after {
44-
animation: arrow-move-right fibVars.$medium-speed linear infinite;
44+
animation: anim__arrow-move-right fibVars.$medium-speed linear infinite;
4545
}
4646
}
4747
}

src/scss/site/_site.scss

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ html, body {
1313
background: url('#{fibVars.$assets-path}/background-dark.png') fibVars.$brand-bg;
1414

1515
&.cmp__site-loading {
16+
position: static;
17+
overflow: hidden;
18+
1619
.cmp__page-loader {
1720
display: block;
1821
}

src/scss/site/pages/_contact.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
&:hover {
3535
cmp-icon {
36-
animation: arrow-move-up-right fibVars.$medium-speed linear infinite;
36+
animation: anim__arrow-move-up-right fibVars.$medium-speed linear infinite;
3737
}
3838
}
3939

@@ -46,7 +46,7 @@
4646
}
4747
}
4848

49-
@keyframes arrow-move-up-right {
49+
@keyframes anim__arrow-move-up-right {
5050
0% {
5151
top: 0;
5252
right: 0;

0 commit comments

Comments
 (0)