Skip to content

Commit ca4caab

Browse files
committed
Add random colors to listing
1 parent eedaa66 commit ca4caab

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

listing/index.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ <h1><span>C</span><span class="star">*</span><span>destar Slide Decks</span></h1
2424
</div>
2525
<div class="attribution">Background by <a href="www.freepik.com">Freepik</a></div>
2626
</div>
27+
<div class="overlay"></div>
28+
<script>
29+
document
30+
.querySelector(".overlay")
31+
.classList.add(`c${Math.floor((Math.random() * 7) + 1)}`);
32+
</script>
2733
</body>
28-
</html>
34+
</html>

listing/listing.css

+21-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818
color: white;
1919
}
2020

21+
.overlay {
22+
position: absolute;
23+
inset: 0;
24+
pointer-events: none;
25+
mix-blend-mode: multiply;
26+
}
27+
28+
.c1 { background-color: #b03a48; }
29+
.c2 { background-color: #d4804d; }
30+
.c3 { background-color: #d6b74b; }
31+
.c4 { background-color: #3e7a4c; }
32+
.c5 { background-color: #3266A3; }
33+
.c6 { background-color: #915394; }
34+
.c7 { background-color: #d980a0; }
35+
2136
html, body {
2237
margin: 0;
2338
padding: 0;
@@ -35,7 +50,7 @@ h1 {
3550
}
3651

3752
.star {
38-
color: #ddd;
53+
color: #ffffff;
3954
margin-top: 0.06em;
4055
font-size: 1.45em;
4156
font-family: Montserrat;
@@ -44,6 +59,10 @@ h1 {
4459
transform: scaleX(0.94);
4560
}
4661

62+
h1 span:not(.star) {
63+
z-index: 1;
64+
}
65+
4766
button, input, ul, li {
4867
all: unset;
4968
}
@@ -59,7 +78,6 @@ button, input, ul, li {
5978
background-image: url("bg.jpg");
6079
background-size: cover;
6180
background-position: center;
62-
filter: sepia(0.4) hue-rotate(-6deg) saturate(0.94);
6381
}
6482

6583
.attribution {
@@ -87,7 +105,6 @@ button, input, ul, li {
87105

88106
font-size: 2em;
89107
max-height: 100%;
90-
z-index: 1;
91108
}
92109

93110
.list {
@@ -97,6 +114,7 @@ button, input, ul, li {
97114
display: flex;
98115
flex-direction: column;
99116
align-items: center;
117+
z-index: 1;
100118
}
101119

102120
.link {

0 commit comments

Comments
 (0)