Skip to content

Commit 8d0cb3a

Browse files
committed
create LookbookHeader component
1 parent 1bcb4c0 commit 8d0cb3a

File tree

2 files changed

+73
-28
lines changed

2 files changed

+73
-28
lines changed

apps/lookbook/src/components/DemoCards.astro

+3-28
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
---
22
import {loadMetadataForDemos} from '~demos/utils/loadMetadataForDemos.js';
33
import Card from './Card.astro';
4+
import LookbookHeader from './LookbookHeader.astro';
45
import TagCloudFilter from './TagCloudFilter.astro';
56
6-
import lookbook from '../images/20221122-lookbook-white-fat.svg?url';
7-
import logo from '../images/twopoint5d-glitch.png?url';
8-
97
const {demos} = loadMetadataForDemos();
108
---
119

1210
<main>
13-
<header class="lookbook-header">
14-
<img class="primary" src={logo} alt="twopoint5d" />
15-
<img class="secondary" src={lookbook} alt="lookbook" />
16-
</header>
11+
<LookbookHeader />
1712

1813
<TagCloudFilter />
1914

@@ -32,27 +27,7 @@ const {demos} = loadMetadataForDemos();
3227
padding: 80px 1.5rem 1.5rem;
3328
max-width: 120ch;
3429
}
35-
.lookbook-header {
36-
position: fixed;
37-
top: 0;
38-
left: 0;
39-
width: 100%;
40-
padding: 10px;
41-
margin: 0;
42-
display: flex;
43-
justify-content: center;
44-
background-color: rgba(13 15 20 / 80%);
45-
border-bottom: 1px solid #535559;
46-
box-shadow: 0 0 10px #000;
47-
}
48-
.lookbook-header img.primary {
49-
max-height: 66px;
50-
}
51-
.lookbook-header img.secondary {
52-
filter: drop-shadow(0 0 2px #ccc) drop-shadow(0 0 15px #999);
53-
max-height: 66px;
54-
margin-left: 1rem;
55-
}
30+
5631
.demo-card-grid {
5732
display: grid;
5833
grid-template-columns: repeat(auto-fit, minmax(32ch, 0.5fr));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
import lookbook from '../images/20221122-lookbook-white-fat.svg?url';
3+
---
4+
5+
<header class="lookbook-header">
6+
<img class="secondary" src={lookbook} alt="lookbook" />
7+
8+
<div class="rainbow-line">
9+
<div class="rainbow-line-25"></div>
10+
<div class="rainbow-line-50"></div>
11+
<div class="rainbow-line-100"></div>
12+
<div class="rainbow-line-50"></div>
13+
<div class="rainbow-line-25"></div>
14+
</div>
15+
</header>
16+
17+
<style>
18+
.lookbook-header {
19+
position: fixed;
20+
top: 0;
21+
left: 0;
22+
width: 100%;
23+
padding: 10px;
24+
margin: 0;
25+
display: flex;
26+
justify-content: center;
27+
background-color: rgba(20 20 20 / 65%);
28+
backdrop-filter: blur(5px);
29+
box-shadow: 0 0 20px #4c4c42;
30+
}
31+
32+
.rainbow-line {
33+
position: absolute;
34+
bottom: 0;
35+
left: 0;
36+
display: flex;
37+
flex-direction: column;
38+
width: 100%;
39+
background: linear-gradient(180deg, rgba(20 20 20 / 65%) 0%, rgb(0 0 0) 100%);
40+
}
41+
42+
.rainbow-line > div {
43+
width: 100%;
44+
height: 1px;
45+
}
46+
47+
.rainbow-line-25 {
48+
background: linear-gradient(in hsl longer hue 45deg, #401 0 0);
49+
}
50+
51+
.rainbow-line-50 {
52+
background: linear-gradient(in hsl longer hue 45deg, #802 0 0);
53+
}
54+
55+
.rainbow-line-100 {
56+
background: linear-gradient(in hsl longer hue 45deg, #f00 0 0);
57+
height: 2px;
58+
}
59+
60+
/* .lookbook-header img.primary {
61+
max-height: 66px;
62+
display: none;
63+
} */
64+
65+
.lookbook-header img.secondary {
66+
filter: drop-shadow(0 0 2px #ccc) drop-shadow(0 0 15px #999);
67+
max-height: 48px; /* 66 */
68+
margin-left: 1rem;
69+
}
70+
</style>

0 commit comments

Comments
 (0)