Skip to content

Commit fa139f6

Browse files
committed
update photos wall for favourite
1 parent 5fdd568 commit fa139f6

File tree

3 files changed

+56
-7
lines changed

3 files changed

+56
-7
lines changed

deno.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"rehype-stringify": "https://esm.sh/[email protected]",
3131
"rehype-slug": "https://esm.sh/[email protected]",
3232
"rehype-autolink-headings": "https://esm.sh/[email protected]",
33-
"@shikijs/rehype": "https://esm.sh/@shikijs/rehype@1.11.1",
33+
"@shikijs/rehype": "https://esm.sh/@shikijs/rehype@1.12.0",
3434
"remark-gfm": "https://esm.sh/[email protected]",
3535
"yaml": "https://deno.land/[email protected]/yaml/mod.ts",
3636
"Command": "https://deno.land/x/[email protected]/command/mod.ts",

public/favourite/index.css

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ body {
1616
--second-color: #34495e;
1717
--title-color: #e67e22;
1818
--box-size: 3.6rem;
19+
--carousel-width: min(80vw, 32rem);
1920
}
2021

2122
body {
2223
color: var(--global-color);
24+
background-color: var(--bg-color);
2325
}
2426

2527
.h2-title,
@@ -34,18 +36,13 @@ a {
3436
text-decoration: none;
3537
}
3638

37-
body {
38-
background-color: var(--bg-color);
39-
}
40-
41-
4239
.wrapper {
4340
display: flex;
4441
flex-direction: column;
4542
align-items: center;
4643
justify-content: center;
4744
height: 100%;
48-
padding-block-start: 4rem;
45+
padding-block: 4rem;
4946
color: var(--global-color);
5047

5148
& .text {
@@ -148,4 +145,48 @@ dialog::backdrop {
148145
text-decoration-thickness: 0.2rem;
149146
text-decoration-color: var(--global-color);
150147
text-underline-offset: 0.5rem;
148+
}
149+
150+
.photos-container {
151+
display: flex;
152+
justify-content: center;
153+
width: var(--carousel-width);
154+
overflow: hidden;
155+
position: relative;
156+
}
157+
158+
.photos-box {
159+
display: flex;
160+
}
161+
162+
.photos-box img {
163+
width: 100%;
164+
height: 100%;
165+
background-color: white;
166+
object-fit: contain;
167+
flex-shrink: 0;
168+
}
169+
170+
@keyframes carousel {
171+
172+
0%,
173+
100% {
174+
transform: translateX(0);
175+
}
176+
177+
25% {
178+
transform: translateX(calc(var(--carousel-width) * -1));
179+
}
180+
181+
50% {
182+
transform: translateX(calc(var(--carousel-width) * -2));
183+
}
184+
185+
75% {
186+
transform: translateX(calc(var(--carousel-width) * -3));
187+
}
188+
}
189+
190+
.photos-box {
191+
animation: carousel 15s infinite;
151192
}

public/favourite/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ <h2 class="h2-title animate__animated animate__backInDown">❤️记录我和小
6868
</div>
6969
<div class="container" id="photos-wall">
7070
<p class="text animate__animated animate__swing animate__infinite" id="hidden-button">我有好多话想对你说,你愿意听吗</p>
71+
<div class="photos-container">
72+
<div class="photos-box">
73+
<img src="https://remain.fwqaq.us/xiaochen_admission.jpg" alt="陈录取通知书">
74+
<img src="https://remain.fwqaq.us/sfo.jpg" alt="张 sfo">
75+
<img src="https://remain.fwqaq.us/chen_cat.jpg" alt="猫咪">
76+
<img src="https://remain.fwqaq.us/chen_heian.jpg" alt="黑暗料理">
77+
</div>
78+
</div>
7179

7280
<dialog close id="x-dialog">
7381
<p class="text">我有好多话想对你说,你愿意听吗</p>

0 commit comments

Comments
 (0)