Skip to content

Commit ba070c3

Browse files
authored
Tweak guestbook feed size (#683)
1 parent dc4fa8d commit ba070c3

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

src/components/Carousel.astro

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
---
2+
interface Props {
3+
spacing?: "tight" | "normal";
4+
}
25
6+
const { spacing = "normal" } = Astro.props;
37
---
48

5-
<ul class="carousel">
9+
<ul class:list={["carousel", { tight: spacing === "tight" }]}>
610
<slot />
711
</ul>
812

913
<style>
1014
.carousel {
1115
list-style: none;
1216
display: flex;
13-
gap: var(--space-xs);
17+
gap: var(--space-l);
1418
padding-inline: var(--space-xl);
1519
padding-block: var(--space-2xs) var(--space-l);
1620
margin: 0;
1721
overflow-x: auto;
1822
scroll-snap-type: x mandatory;
1923
scroll-padding: var(--space-xl);
2024
scrollbar-width: thin;
25+
26+
&.tight {
27+
gap: var(--space-xs);
28+
}
2129
}
2230
</style>

src/components/CarouselButton.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const { url } = Astro.props;
1919
align-items: center;
2020
gap: var(--space-xs);
2121
height: auto;
22-
margin-inline-start: var(--space-l);
22+
margin-inline: var(--space-l);
2323
padding: var(--space-s) var(--space-m) var(--space-s) var(--space-l);
2424
border-radius: var(--radius-full);
2525
font-weight: var(--font-weight-bold);

src/components/Home/PhotoFeed.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const limitedEntries = entries.slice(0, LIMIT);
1212
const photos = limitedEntries.map((entry) => entry.data);
1313
---
1414

15-
<Carousel>
15+
<Carousel spacing="tight">
1616
{
1717
photos.map((photo) => (
1818
<CarouselItem>

src/components/Notecard/Notecard.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const backgroundImage = `url(${NOTECARD_THEMES[theme].src})`;
5151
.notecard {
5252
aspect-ratio: 4 / 3;
5353
font-family: var(--font-mono);
54-
padding: 5.5ch 6ch;
54+
padding: 5.5ch;
5555
color: #111;
5656
display: flex;
5757
flex-direction: column;
@@ -61,6 +61,10 @@ const backgroundImage = `url(${NOTECARD_THEMES[theme].src})`;
6161
background-repeat: no-repeat;
6262
background-position: center;
6363
transform: translateX(var(--translateX)) rotate(var(--rotation));
64+
65+
&.small {
66+
font-size: 0.8em;
67+
}
6468
}
6569

6670
.content {
@@ -81,11 +85,7 @@ const backgroundImage = `url(${NOTECARD_THEMES[theme].src})`;
8185
}
8286

8387
.date {
84-
font-size: var(--step--1);
85-
}
86-
87-
.notecard.small {
88-
font-size: var(--step--1);
88+
font-size: 0.85em;
8989
}
9090
</style>
9191

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const feed = work
6161
<Center>
6262
<h2>Latest <a href="https://glass.photo/evadecker">photos</a></h2>
6363
</Center>
64-
<PhotoFeed />
64+
<PhotoFeed server:defer />
6565
</section>
6666
<section>
6767
<Center>

0 commit comments

Comments
 (0)