Skip to content

Commit 14a7847

Browse files
chore: remove last key
1 parent 5d94943 commit 14a7847

File tree

5 files changed

+16
-21
lines changed

5 files changed

+16
-21
lines changed

src/components/Timeline.astro

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
---
2-
type Props = {
3-
shortSpine?: boolean;
4-
};
52
6-
const { shortSpine = false } = Astro.props;
7-
8-
const displayTriangle = shortSpine ? "none" : "absolute";
93
---
104

11-
<div class="timeline" data-short-spine={shortSpine}>
5+
<div class="timeline">
126
<ol>
137
<slot />
148
</ol>
159
</div>
1610

17-
<style define:vars={{ displayTriangle }}>
11+
<style>
1812
.timeline {
1913
position: relative;
2014
}
@@ -47,7 +41,7 @@ const displayTriangle = shortSpine ? "none" : "absolute";
4741
z-index: 3; /* above potential dividers */
4842
}
4943

50-
.timeline[data-short-spine="true"]::before {
44+
:global(article section:last-of-type .timeline::before) {
5145
height: 100%;
5246
}
5347

@@ -64,7 +58,7 @@ const displayTriangle = shortSpine ? "none" : "absolute";
6458
background-color: var(--color-primary);
6559
left: calc(90% - 10px);
6660
bottom: -5px;
67-
position: var(--displayTriangle);
61+
position: absolute;
6862
z-index: 3; /* above potential dividers */
6963
}
7064

src/content/pages/de/past/formation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Divider from "../../../../components/Divider.astro";
2828

2929
<Divider firstSegmentColor="var(--color-white)" flipVertical fixAntialiasingTop />
3030

31-
<FormationSection class="dark-background" key="evolution" last>
31+
<FormationSection class="dark-background" key="evolution">
3232
<h2>Entwicklung</h2>
3333

3434
Seither haben wir uns stetig weiterentwickelt und neue Projekte realisiert, die unsere Vision und Mission unterstützen. Wir freuen uns auf die kommenden Herausforderungen und Chancen, die vor uns liegen.

src/content/pages/en/past/formation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Divider from "../../../../components/Divider.astro";
2828

2929
<Divider firstSegmentColor="var(--color-white)" flipVertical fixAntialiasingTop />
3030

31-
<FormationSection class="dark-background" key="evolution" last>
31+
<FormationSection class="dark-background" key="evolution">
3232
<h2>Evolution</h2>
3333

3434
Since then, we have continuously evolved and realized new projects that support our vision and mission. We look forward to the upcoming challenges and opportunities that lie ahead.

src/layouts/Shell.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
--color-overlay: #f7f9f3;
3232

3333
--size-gutter: 1rem;
34+
--size-gutter: 1.5rem;
3435
--size-gutter-big: 2rem;
3536
--size-gutter-huge: 4rem;
3637
--size-gutter-massive: 8rem;
@@ -39,6 +40,8 @@
3940
--size-burger: 2rem;
4041
--size-carousel-buttons: 2rem;
4142

43+
--heading-margin: 2.2em;
44+
4245
--font-size: 16px;
4346
--font-text: "PT Sans", sans-serif;
4447
--font-mono: "Fira Mono", monospace;
@@ -176,7 +179,7 @@ h5,
176179
h6 {
177180
font-family: var(--font-heading);
178181
font-weight: 900;
179-
margin-top: 2.2em;
182+
margin-top: var(--heading-margin);
180183
}
181184

182185
h1 {

src/layouts/sections/FormationSection.astro

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import TimelineEntry from "../../components/TimelineEntry.astro";
77
type Props = {
88
key: string;
99
class?: string;
10-
last?: boolean;
11-
start?: boolean;
1210
};
1311
14-
const { key, class: className, last } = Astro.props;
12+
const { key, class: className } = Astro.props;
1513
1614
const locale = currentLocale.get();
1715
@@ -32,7 +30,7 @@ const formationData = timelineCollection
3230
<slot />
3331
</div>
3432
<div class="timeline">
35-
<Timeline shortSpine={last}>
33+
<Timeline>
3634
{
3735
formationData.map((element) => (
3836
<TimelineEntry>
@@ -48,25 +46,25 @@ const formationData = timelineCollection
4846
<style>
4947
section {
5048
display: grid;
51-
column-gap: 1.5rem;
49+
column-gap: var(--size-gutter-medium);
5250
grid-template-columns: 55% 45%;
5351
}
5452

5553
@media screen and (max-width: 1025px) {
5654
section {
5755
grid-template-columns: 100%;
58-
row-gap: 1rem;
56+
row-gap: var(--size-gutter);
5957
}
6058
}
6159

6260
.title {
6361
font-size: 1.5rem;
64-
font-weight: 700;
62+
font-weight: bold;
6563
}
6664

6765
@media screen and (min-width: 1025px) {
6866
.timeline {
69-
margin-top: 2.2em;
67+
margin-top: var(--heading-margin);
7068
}
7169
}
7270
</style>

0 commit comments

Comments
 (0)