@@ -10,6 +10,7 @@ type Props = {
1010const { elements, shortSpine = false } = Astro .props ;
1111
1212const spineHeight = shortSpine ? " 100%" : " calc(100% + var(--size-height-divider) + (2 * var(--size-gutter-massive)))" ;
13+ const displayTriangle = shortSpine ? " none" : " absolute" ;
1314---
1415
1516<div class =" timeline" >
@@ -25,7 +26,7 @@ const spineHeight = shortSpine ? "100%" : "calc(100% + var(--size-height-divider
2526 </ol >
2627</div >
2728
28- <style define:vars ={ { spineHeight }} >
29+ <style define:vars ={ { spineHeight , displayTriangle }} >
2930 .timeline {
3031 position: relative;
3132 }
@@ -65,7 +66,6 @@ const spineHeight = shortSpine ? "100%" : "calc(100% + var(--size-height-divider
6566 flex-direction: column;
6667 box-sizing: border-box;
6768 padding: 1rem;
68- /* background: #fcfaf3; */
6969 background: var(--color-overlay);
7070 width: 45%;
7171 box-shadow: 0px 15px 30px -15px rgba(0, 0, 0, 0.5);
@@ -86,7 +86,39 @@ const spineHeight = shortSpine ? "100%" : "calc(100% + var(--size-height-divider
8686 z-index: 5; /* above spine */
8787 }
8888
89- ol li:nth-child(even) {
90- align-self: flex-end;
89+ @media screen and (min-width: 1025px) {
90+ ol li:nth-child(even) {
91+ align-self: flex-end;
92+ }
93+ }
94+
95+ @media screen and (max-width: 1025px) {
96+ li::after {
97+ left: 90%;
98+ }
99+
100+ .timeline::before {
101+ left: 90%;
102+ }
103+
104+ .timeline::after {
105+ content: "";
106+ width: 20px;
107+ aspect-ratio: 1;
108+ clip-path: polygon(0 0, 50% 100%, 100% 0);
109+ background-color: var(--color-primary);
110+ left: calc(90% - 10px);
111+ bottom: calc(-1 * (5px + var(--size-height-divider) + (2 * var(--size-gutter-massive))));
112+ position: var(--displayTriangle);
113+ z-index: 3; /* above potential dividers */
114+ }
115+
116+ li {
117+ width: 85%;
118+ }
119+
120+ li:not(:last-child) {
121+ margin-bottom: 4rem;
122+ }
91123 }
92124</style >
0 commit comments