update timeline formatting (#1308)
This commit is contained in:
+1
-13
@@ -83,11 +83,6 @@
|
|||||||
filter: drop-shadow(0 0 6px rgba(144, 238, 144, 0.95));
|
filter: drop-shadow(0 0 6px rgba(144, 238, 144, 0.95));
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-line .end-marker {
|
|
||||||
fill: #1b1b1b;
|
|
||||||
stroke: rgba(144, 238, 144, 0.35);
|
|
||||||
stroke-width: 1.5;
|
|
||||||
}
|
|
||||||
.timeline-card-footer {
|
.timeline-card-footer {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
padding-top: 0.75rem;
|
padding-top: 0.75rem;
|
||||||
@@ -112,7 +107,7 @@
|
|||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
.timeline-grid {
|
.timeline-grid {
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
gap: 6rem 2.5rem;
|
gap: 56vh 2.5rem;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
/* The line snakes 3 by 3: row 1 left to right, row 2 right to left,
|
/* The line snakes 3 by 3: row 1 left to right, row 2 right to left,
|
||||||
@@ -275,7 +270,6 @@
|
|||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<path class="progress" id="timelineProgress" d=""></path>
|
<path class="progress" id="timelineProgress" d=""></path>
|
||||||
<circle class="end-marker" id="timelineEndMarker" r="5" cx="0" cy="0"></circle>
|
|
||||||
<circle class="comet-glow" id="timelineCometGlow" r="12" cx="0" cy="0" style="opacity:0"></circle>
|
<circle class="comet-glow" id="timelineCometGlow" r="12" cx="0" cy="0" style="opacity:0"></circle>
|
||||||
<circle class="comet" id="timelineComet" r="5" cx="0" cy="0" style="opacity:0"></circle>
|
<circle class="comet" id="timelineComet" r="5" cx="0" cy="0" style="opacity:0"></circle>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -361,7 +355,6 @@
|
|||||||
if (!timeline || !svg) return;
|
if (!timeline || !svg) return;
|
||||||
|
|
||||||
var nodes = Array.prototype.slice.call(timeline.querySelectorAll('.timeline-node'));
|
var nodes = Array.prototype.slice.call(timeline.querySelectorAll('.timeline-node'));
|
||||||
var endMarker = document.getElementById('timelineEndMarker');
|
|
||||||
var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||||
var useGsap = !!(window.gsap && window.ScrollTrigger);
|
var useGsap = !!(window.gsap && window.ScrollTrigger);
|
||||||
var drawProgress = 0; // 0 to 1, how much of the line is drawn
|
var drawProgress = 0; // 0 to 1, how much of the line is drawn
|
||||||
@@ -432,11 +425,6 @@
|
|||||||
return nodePathProgress(node, index, pathLength);
|
return nodePathProgress(node, index, pathLength);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (endMarker && pts.length) {
|
|
||||||
var ep = pts[pts.length - 1];
|
|
||||||
endMarker.setAttribute('cx', ep.x.toFixed(1));
|
|
||||||
endMarker.setAttribute('cy', ep.y.toFixed(1));
|
|
||||||
}
|
|
||||||
updateComet(pathLength);
|
updateComet(pathLength);
|
||||||
return { pts: pts, len: pathLength };
|
return { pts: pts, len: pathLength };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user