Skip to content

Commit 6ba6aa8

Browse files
authored
Merge pull request #38 from moiSentineL/neon-glow
neon!
2 parents 716c369 + e207b46 commit 6ba6aa8

File tree

4 files changed

+51
-5
lines changed

4 files changed

+51
-5
lines changed

src/_includes/bloghead.njk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
</style>
1414
<header>
1515
<div class="fcrow">
16-
<h1 style="margin: 0 0 0 0; text-align: center; line-height: 1.2">Nibir's Brain Dump</h1>
17-
<h2 style="margin: 0.5em 0 0 0;color: #909090; text-align: center; line-height: 1.2">yes I write too.</h2>
16+
<h1 style="margin: 0 0 0 0; text-align: center; line-height: 1.2;">Nibir's Brain Dump</h1>
17+
<h2 style="margin: 0.5em 0 0 0; text-align: center; line-height: 1.2">yes I write too.</h2>
18+
{# color: #909090 #}
1819
</div>
1920
</header>
2021
<nav>

src/_layouts/base.njk

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,25 @@
5353

5454
{% include "gtag.njk" %}
5555
{% include "nutshell.njk" %}
56-
</script>
56+
57+
<script>
58+
// Array of colors
59+
const colors = [
60+
"#e0e0e0", // $transwhite
61+
"#70d6ff", // $pale-azure
62+
"#ff70a6", // $cyclamen
63+
"#ff9770", // $atomic-tangerine
64+
"#ffd670", // $naples-yellow
65+
"#e9ff70", // $mindaro
66+
"#70ff99", // $lime-green
67+
"#9770ff" // $violet
68+
];
69+
// Select a random color
70+
const randomColor = colors[Math.floor(Math.random() * colors.length)];
71+
72+
// Apply the random color to a CSS variable
73+
document.documentElement.style.setProperty('--flicker-color', randomColor);
74+
</script>
5775
</body>
5876
{% include "footer.njk" %}
5977
</html>

src/_layouts/pages/blogs.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ layout: base.njk
1515
</style>
1616
<header>
1717
<div class="fcrow">
18-
<h1 style="margin: 0 0 0 0; text-align: center; line-height: 1.2">Nibir's Brain Dump</h1>
19-
<h2 style="margin: 0.5em 0 0 0;color: #909090; text-align: center; line-height: 1.2">yes I write too.</h2>
18+
<h1 id="heads" style="margin: 0 0 0 0; text-align: center; line-height: 1.2">Nibir's Brain Dump</h1>
19+
<h2 class="heads" style="margin: 0.5em 0 0 0;color: #909090; text-align: center; line-height: 1.2">yes I write too.</h2>
2020
</div>
2121
</header>
2222
<nav>

src/styles/css.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,30 @@ html {
5959
}
6060
}
6161

62+
.neonText {
63+
animation: flicker 5s infinite alternate;
64+
}
65+
66+
@keyframes flicker {
67+
0%, 18%, 22%, 25%, 53%, 57%, 100% {
68+
69+
text-shadow:
70+
0 0 1px #fff,
71+
0 0 18px var(--flicker-color),
72+
73+
}
74+
75+
20%, 24%, 55% {
76+
text-shadow: none;
77+
}
78+
}
79+
6280
body {
6381
overflow-x: hidden;
6482
}
6583

84+
85+
6686
strong {
6787
@include theme(dark) {
6888
color: $naples-yellow;
@@ -146,6 +166,7 @@ mjx-container {
146166
background: #c8fffd;
147167
color: black;
148168
}
169+
149170
pre,
150171
code {
151172
background: rgb(48, 48, 48);
@@ -176,10 +197,16 @@ h6 {
176197
font-variation-settings: "wdth" 90;
177198
margin: 1em 0 0.5em;
178199
}
200+
201+
h1, h2, h3 {
202+
@extend .neonText;
203+
}
204+
179205
.title {
180206
margin: 1em 0 0.2em;
181207
}
182208

209+
183210
p,
184211
ul,
185212
ol {

0 commit comments

Comments
 (0)