hezarfen_landing
Clone
https://git.tahinli.com/archive/hezarfen_landing.git
0 watching0 forksTypeScript581.6 KiB94b1804Burak Boduroğlu2 months ago15 commits
| 1 | import { Show } from "solid-js"; |
| 2 | import Reveal from "./Reveal"; |
| 3 | |
| 4 | /** |
| 5 | * Every band opens with one of these: a small label, a statement, and the |
| 6 | * sentence that qualifies it. Keeping them identical is what makes the page |
| 7 | * read as one document rather than a pile of sections. |
| 8 | */ |
| 9 | export default function SectionHeader(props: { |
| 10 | label?: string; |
| 11 | title: string; |
| 12 | description?: string; |
| 13 | /** Centred for bands whose content is centred too. */ |
| 14 | center?: boolean; |
| 15 | }) { |
| 16 | return ( |
| 17 | <Reveal> |
| 18 | <div class="hz-sechead" classList={{ "hz-sechead-center": props.center }}> |
| 19 | <Show when={props.label}> |
| 20 | <span class="hz-label">{props.label}</span> |
| 21 | </Show> |
| 22 | <h2 class="hz-h2">{props.title}</h2> |
| 23 | <Show when={props.description}> |
| 24 | <p class="hz-lead">{props.description}</p> |
| 25 | </Show> |
| 26 | </div> |
| 27 | </Reveal> |
| 28 | ); |
| 29 | } |