logo.tsx 1019 B

123456789101112131415161718192021222324252627
  1. import { TextAttributes } from "@opentui/core"
  2. import { For } from "solid-js"
  3. import { useTheme } from "@tui/context/theme"
  4. const LOGO_LEFT = [` `, `█▀▀█ █▀▀█ █▀▀█ █▀▀▄`, `█░░█ █░░█ █▀▀▀ █░░█`, `▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀`]
  5. const LOGO_RIGHT = [` ▄ `, `█▀▀▀ █▀▀█ █▀▀█ █▀▀█`, `█░░░ █░░█ █░░█ █▀▀▀`, `▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀`]
  6. export function Logo() {
  7. const { theme } = useTheme()
  8. return (
  9. <box>
  10. <For each={LOGO_LEFT}>
  11. {(line, index) => (
  12. <box flexDirection="row" gap={1}>
  13. <text fg={theme.textMuted} selectable={false}>
  14. {line}
  15. </text>
  16. <text fg={theme.text} attributes={TextAttributes.BOLD} selectable={false}>
  17. {LOGO_RIGHT[index()]}
  18. </text>
  19. </box>
  20. )}
  21. </For>
  22. </box>
  23. )
  24. }