This commit is contained in:
+20
-76
@@ -1,52 +1,8 @@
|
||||
import { ExternalLink, MapPin, Plane } from "lucide-react";
|
||||
import { ExternalLink, MapPin } from "lucide-react";
|
||||
import { CredentialRows } from "@/components/CredentialRows";
|
||||
import { Section } from "@/components/Section";
|
||||
import { travel } from "@/content/site";
|
||||
|
||||
/** Decorative route map: dotted "world" backdrop, a dashed flight path and pins. */
|
||||
function RouteArt() {
|
||||
const pins = [
|
||||
{ x: 70, y: 150 },
|
||||
{ x: 170, y: 70 },
|
||||
{ x: 290, y: 120 },
|
||||
{ x: 400, y: 50 },
|
||||
];
|
||||
return (
|
||||
<svg
|
||||
viewBox="0 0 470 200"
|
||||
role="img"
|
||||
aria-label="Illustration of a travel route connecting four destinations"
|
||||
className="h-full w-full"
|
||||
>
|
||||
<defs>
|
||||
<pattern id="dots" width="14" height="14" patternUnits="userSpaceOnUse">
|
||||
<circle cx="2" cy="2" r="1.2" fill="#38bdf8" fillOpacity="0.28" />
|
||||
</pattern>
|
||||
<linearGradient id="route" x1="0" x2="1">
|
||||
<stop offset="0" stopColor="#38bdf8" />
|
||||
<stop offset="1" stopColor="#818cf8" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="470" height="200" fill="url(#dots)" />
|
||||
<path
|
||||
d="M70 150 C 100 60, 140 40, 170 70 S 250 160, 290 120 S 370 20, 400 50"
|
||||
fill="none"
|
||||
stroke="url(#route)"
|
||||
strokeWidth="2.5"
|
||||
strokeDasharray="6 7"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
{pins.map((p, i) => (
|
||||
<g key={i} transform={`translate(${p.x} ${p.y})`}>
|
||||
<circle r="11" fill="#38bdf8" fillOpacity="0.18" />
|
||||
<circle r="5" fill={i === pins.length - 1 ? "#818cf8" : "#38bdf8"} />
|
||||
<circle r="5" fill="none" stroke="#fff" strokeOpacity="0.8" strokeWidth="1.5" />
|
||||
</g>
|
||||
))}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function Travel() {
|
||||
return (
|
||||
<Section
|
||||
@@ -55,38 +11,26 @@ export function Travel() {
|
||||
title="Get to know me through my travel album"
|
||||
lead="Outside of work I like to explore. Pin by pin, the travel map is a visual diary of the places I have been."
|
||||
>
|
||||
<div className="overflow-hidden rounded-2xl border border-white/10 bg-slate-900/70 shadow-lg shadow-black/20">
|
||||
<div className="grid lg:grid-cols-2">
|
||||
<div className="relative min-h-52 border-b border-white/10 bg-linear-to-br from-sky-500/10 via-transparent to-indigo-500/10 p-4 lg:border-r lg:border-b-0">
|
||||
<RouteArt />
|
||||
<span className="absolute top-4 left-4 flex items-center gap-1.5 rounded-full border border-white/15 bg-slate-950/80 px-3 py-1 text-xs text-slate-200">
|
||||
<Plane className="size-3.5 text-sky-300" aria-hidden="true" />
|
||||
Travel map
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col justify-center gap-5 p-6 sm:p-8">
|
||||
<div>
|
||||
<h3 className="flex items-center gap-2 text-xl font-semibold text-white">
|
||||
<MapPin className="size-5 text-sky-300" aria-hidden="true" />
|
||||
Travel map
|
||||
</h3>
|
||||
<p className="mt-2 text-sm leading-6 text-slate-300">
|
||||
Sign in with the credentials below to browse the album.
|
||||
</p>
|
||||
</div>
|
||||
<a
|
||||
href={travel.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex items-center justify-between gap-2 rounded-lg border border-sky-400/30 bg-sky-400/10 px-4 py-3 font-mono text-sm text-sky-200 transition-colors hover:bg-sky-400/20 focus-visible:ring-2 focus-visible:ring-sky-300 focus-visible:outline-none"
|
||||
>
|
||||
<span className="truncate">{travel.host}</span>
|
||||
<ExternalLink className="size-4 flex-none" aria-hidden="true" />
|
||||
</a>
|
||||
<CredentialRows user={travel.user} password={travel.password} />
|
||||
</div>
|
||||
<div className="flex max-w-2xl flex-col gap-5 rounded-2xl border border-white/10 bg-slate-900/70 p-6 shadow-lg shadow-black/20 sm:p-8">
|
||||
<div>
|
||||
<h3 className="flex items-center gap-2 text-xl font-semibold text-white">
|
||||
<MapPin className="size-5 text-sky-300" aria-hidden="true" />
|
||||
Travel map
|
||||
</h3>
|
||||
<p className="mt-2 text-sm leading-6 text-slate-300">
|
||||
Sign in with the credentials below to browse the album.
|
||||
</p>
|
||||
</div>
|
||||
<a
|
||||
href={travel.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex items-center justify-between gap-2 rounded-lg border border-sky-400/30 bg-sky-400/10 px-4 py-3 font-mono text-sm text-sky-200 transition-colors hover:bg-sky-400/20 focus-visible:ring-2 focus-visible:ring-sky-300 focus-visible:outline-none"
|
||||
>
|
||||
<span className="truncate">{travel.host}</span>
|
||||
<ExternalLink className="size-4 flex-none" aria-hidden="true" />
|
||||
</a>
|
||||
<CredentialRows user={travel.user} password={travel.password} />
|
||||
</div>
|
||||
</Section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user