aboutsummaryrefslogtreecommitdiff
path: root/ui-lib/components
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-04-22 08:10:30 +0530
committerBobby <[email protected]>2026-04-22 08:10:30 +0530
commit0bb36660ec4bceeb4bd9b18cf47a30ba8eded427 (patch)
treef94aa2de99dcb7ee87639a3f60539fd376577bb9 /ui-lib/components
parente72162b34bddbf04998eea934335e9496b8649f8 (diff)
downloadhollowdark-0bb36660ec4bceeb4bd9b18cf47a30ba8eded427.tar.xz
hollowdark-0bb36660ec4bceeb4bd9b18cf47a30ba8eded427.zip
Rename ui-lib to lib, split Begin into smaller components, add Credits, bump version to 1.0 from package.json
Diffstat (limited to 'ui-lib/components')
-rw-r--r--ui-lib/components/BeginScreen.svelte138
-rw-r--r--ui-lib/components/InitialLoadScreen.svelte57
-rw-r--r--ui-lib/components/ProgressBar.svelte34
3 files changed, 0 insertions, 229 deletions
diff --git a/ui-lib/components/BeginScreen.svelte b/ui-lib/components/BeginScreen.svelte
deleted file mode 100644
index c095f61..0000000
--- a/ui-lib/components/BeginScreen.svelte
+++ /dev/null
@@ -1,138 +0,0 @@
-<script lang="ts">
- import type { BeginState } from '@hollowdark/loading/session'
-
- interface Props {
- state: BeginState
- appVersion?: string
- onBegin: () => void
- onContinue?: () => void
- onSettings: () => void
- }
-
- let {
- state,
- appVersion = 'v 0.1',
- onBegin,
- onContinue,
- onSettings
- }: Props = $props()
-
- function handleContinue(): void {
- onContinue?.()
- }
-</script>
-
-<section class="begin">
- <div class="top">
- <p class="title">Hollowdark</p>
- <p class="subtitle">A life simulation</p>
- </div>
-
- <div class="actions">
- {#if state.kind === 'first-ever'}
- <button class="primary" onclick={onBegin}>Begin</button>
- {:else if state.kind === 'returning-active'}
- <button class="primary" onclick={handleContinue}>
- Continue {state.characterName}'s life
- </button>
- <button class="secondary" onclick={onBegin}>Begin a new life</button>
- {:else}
- <button class="primary" onclick={handleContinue}>Continue</button>
- <button class="secondary" onclick={onBegin}>Begin a new life</button>
- {/if}
-
- <button class="tertiary" onclick={onSettings}>Settings</button>
- </div>
-
- <p class="version">{appVersion}</p>
-</section>
-
-<style>
- .begin {
- min-height: 100dvh;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: var(--space-12);
- position: relative;
- text-align: center;
- }
-
- .top {
- margin-bottom: 120px;
- }
-
- .title {
- font-family: var(--font-body);
- font-size: 38px;
- font-style: italic;
- font-weight: 400;
- letter-spacing: 2px;
- color: var(--color-text);
- margin-bottom: var(--space-6);
- }
-
- .subtitle {
- font-family: var(--font-ui);
- font-size: 11px;
- color: var(--color-text-tertiary);
- letter-spacing: 2px;
- text-transform: uppercase;
- }
-
- .actions {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: var(--space-8);
- }
-
- .primary {
- font-family: var(--font-body);
- font-size: var(--text-lg);
- color: var(--color-accent);
- letter-spacing: 0.5px;
- transition: color var(--transition-fast);
- }
-
- .primary:hover {
- color: var(--color-text);
- }
-
- .secondary {
- font-family: var(--font-body);
- font-size: 15px;
- color: var(--color-text-secondary);
- letter-spacing: 0.3px;
- transition: color var(--transition-fast);
- }
-
- .secondary:hover {
- color: var(--color-text);
- }
-
- .tertiary {
- font-family: var(--font-body);
- font-size: 13px;
- color: var(--color-text-tertiary);
- letter-spacing: 0.3px;
- transition: color var(--transition-fast);
- }
-
- .tertiary:hover {
- color: var(--color-text-secondary);
- }
-
- .version {
- position: absolute;
- bottom: var(--space-6);
- left: 0;
- right: 0;
- text-align: center;
- font-family: var(--font-ui);
- font-size: 10px;
- color: #3d382f;
- letter-spacing: 1px;
- }
-</style>
diff --git a/ui-lib/components/InitialLoadScreen.svelte b/ui-lib/components/InitialLoadScreen.svelte
deleted file mode 100644
index 105d283..0000000
--- a/ui-lib/components/InitialLoadScreen.svelte
+++ /dev/null
@@ -1,57 +0,0 @@
-<script lang="ts">
- import ProgressBar from '@hollowdark/ui-lib/components/ProgressBar.svelte'
- import { loadingProgress } from '@hollowdark/loading/progress'
-
- const progress = $derived($loadingProgress)
-</script>
-
-<section class="initial-load">
- <p class="title">Hollowdark</p>
-
- <div class="bar">
- <ProgressBar value={progress.percentage} />
- </div>
-
- <p class="message">{progress.currentMessage}</p>
- <p class="note">This will happen once. It will not happen again.</p>
-</section>
-
-<style>
- .initial-load {
- min-height: 100dvh;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: var(--space-12);
- text-align: center;
- }
-
- .title {
- font-family: var(--font-body);
- font-size: 32px;
- font-style: italic;
- font-weight: 400;
- letter-spacing: 1px;
- margin-bottom: 120px;
- }
-
- .bar {
- margin-bottom: var(--space-6);
- }
-
- .message {
- font-family: var(--font-ui);
- font-size: 12px;
- color: var(--color-text-secondary);
- letter-spacing: 0.5px;
- margin-bottom: var(--space-2);
- }
-
- .note {
- font-family: var(--font-ui);
- font-size: 11px;
- color: var(--color-text-tertiary);
- letter-spacing: 0.3px;
- }
-</style>
diff --git a/ui-lib/components/ProgressBar.svelte b/ui-lib/components/ProgressBar.svelte
deleted file mode 100644
index 21c9e68..0000000
--- a/ui-lib/components/ProgressBar.svelte
+++ /dev/null
@@ -1,34 +0,0 @@
-<script lang="ts">
- interface Props {
- value: number
- width?: number
- }
-
- let { value, width = 320 }: Props = $props()
-
- const percentage = $derived(Math.max(0, Math.min(1, value)) * 100)
-</script>
-
-<div class="progress-track" style:width="{width}px">
- <div class="progress-fill" style:width="{percentage}%"></div>
-</div>
-
-<style>
- .progress-track {
- height: 2px;
- background: rgba(232, 226, 213, 0.06);
- border-radius: 1px;
- position: relative;
- overflow: hidden;
- }
-
- .progress-fill {
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- background: var(--color-accent);
- border-radius: 1px;
- transition: width 300ms ease-out;
- }
-</style>