45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
/** A Christmas tree in the site's gold line style, with a star on top. */
|
|||
|
|
export function ChristmasTree({ size = 64 }: { size?: number }) {
|
||
|
|
return (
|
||
|
|
<svg
|
||
|
|
className="xmas-tree"
|
||
|
|
width={size}
|
||
|
|
height={size * 1.25}
|
||
|
|
viewBox="0 0 64 80"
|
||
|
|
aria-hidden="true"
|
||
|
|
fill="none"
|
||
|
|
stroke="#d9b46a"
|
||
|
|
strokeWidth="2"
|
||
|
|
strokeLinejoin="round"
|
||
|
|
strokeLinecap="round"
|
||
|
|
>
|
||
|
|
{/* The star */}
|
||
|
|
<path
|
||
|
|
d="M32 2 L34.4 8 L40.6 8.6 L35.9 12.7 L37.3 18.8 L32 15.6 L26.7 18.8 L28.1 12.7 L23.4 8.6 L29.6 8 Z"
|
||
|
|
fill="#d9b46a"
|
||
|
|
/>
|
||
|
|
{/* Three tiers */}
|
||
|
|
<path
|
||
|
|
d="M32 20 L44 34 L38 34 L50 49 L42 49 L56 65 L8 65 L22 49 L14 49 L26 34 L20 34 Z"
|
||
|
|
fill="rgba(217,180,106,0.08)"
|
||
|
|
/>
|
||
|
|
{/* Garland */}
|
||
|
|
<path
|
||
|
|
d="M23 41 Q33 45 42 39 M17 56 Q31 61 47 54"
|
||
|
|
strokeWidth="1.2"
|
||
|
|
opacity="0.7"
|
||
|
|
/>
|
||
|
|
{/* Baubles */}
|
||
|
|
<g stroke="none">
|
||
|
|
<circle cx="29" cy="30" r="1.8" fill="#ece6d8" />
|
||
|
|
<circle cx="36" cy="44" r="2" fill="#d9b46a" />
|
||
|
|
<circle cx="25" cy="50" r="1.8" fill="#ece6d8" />
|
||
|
|
<circle cx="41" cy="59" r="2" fill="#ece6d8" />
|
||
|
|
<circle cx="20" cy="61" r="1.8" fill="#d9b46a" />
|
||
|
|
</g>
|
||
|
|
{/* Trunk */}
|
||
|
|
<path d="M28 65 L28 74 L36 74 L36 65" />
|
||
|
|
</svg>
|
||
|
|
);
|
||
|
|
}
|