Spacing and mobile design fixes
This commit is contained in:
parent
510255f1bd
commit
90735d2c83
6 changed files with 79 additions and 57 deletions
|
|
@ -96,10 +96,10 @@
|
||||||
max-width: 784px;
|
max-width: 784px;
|
||||||
gap: $unit-3x;
|
gap: $unit-3x;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 $unit-3x;
|
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
@include breakpoint('phone') {
|
||||||
padding: 0 $unit-2x;
|
gap: $unit-2x;
|
||||||
|
padding: $unit-half 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Post type styles
|
// Post type styles
|
||||||
|
|
@ -319,10 +319,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-footer {
|
|
||||||
padding-bottom: $unit-2x;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-button {
|
.back-button {
|
||||||
color: $red-60;
|
color: $red-60;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,26 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
noHorizontalPadding?: boolean
|
noHorizontalPadding?: boolean
|
||||||
class?: string
|
class?: string
|
||||||
|
header?: Snippet
|
||||||
|
children?: Snippet
|
||||||
}
|
}
|
||||||
|
|
||||||
let { noHorizontalPadding = false, class: className = '' }: Props = $props()
|
let { noHorizontalPadding = false, class: className = '', header, children }: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="page {className}" class:no-horizontal-padding={noHorizontalPadding}>
|
<section class="page {className}" class:no-horizontal-padding={noHorizontalPadding}>
|
||||||
|
{#if header}
|
||||||
<header>
|
<header>
|
||||||
<slot name="header" />
|
{@render header()}
|
||||||
</header>
|
</header>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<slot />
|
{#if children}
|
||||||
|
{@render children()}
|
||||||
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
@include breakpoint('phone') {
|
||||||
align-self: flex-start;
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
:global(svg) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,18 @@
|
||||||
|
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
|
|
||||||
export let data: PageData
|
let { data } = $props<{ data: PageData }>()
|
||||||
|
|
||||||
$: ({ albums, games, error } = data)
|
let albums = $derived(data.albums)
|
||||||
|
let games = $derived(data.games)
|
||||||
|
let error = $derived(data.error)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="about-container">
|
<section class="about-container">
|
||||||
<Page>
|
<Page>
|
||||||
<svelte:fragment slot="header">
|
{#snippet header()}
|
||||||
<h2>A little about me</h2>
|
<h2>A little about me</h2>
|
||||||
</svelte:fragment>
|
{/snippet}
|
||||||
|
|
||||||
<section class="bio">
|
<section class="bio">
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -40,16 +42,16 @@
|
||||||
</section>
|
</section>
|
||||||
</Page>
|
</Page>
|
||||||
<Page>
|
<Page>
|
||||||
<svelte:fragment slot="header">
|
{#snippet header()}
|
||||||
<h2>Notable mentions</h2>
|
<h2>Notable mentions</h2>
|
||||||
</svelte:fragment>
|
{/snippet}
|
||||||
|
|
||||||
<MentionList />
|
<MentionList />
|
||||||
</Page>
|
</Page>
|
||||||
<Page noHorizontalPadding={true}>
|
<Page noHorizontalPadding={true}>
|
||||||
<svelte:fragment slot="header">
|
{#snippet header()}
|
||||||
<h2>Now playing</h2>
|
<h2>Now playing</h2>
|
||||||
</svelte:fragment>
|
{/snippet}
|
||||||
|
|
||||||
<RecentAlbums {albums} />
|
<RecentAlbums {albums} />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,11 @@
|
||||||
<div class="project-page-container">
|
<div class="project-page-container">
|
||||||
{#if error}
|
{#if error}
|
||||||
<Page>
|
<Page>
|
||||||
<div slot="header" class="error-header">
|
{#snippet header()}
|
||||||
|
<div class="error-header">
|
||||||
<h1>Error</h1>
|
<h1>Error</h1>
|
||||||
</div>
|
</div>
|
||||||
|
{/snippet}
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<p>{error}</p>
|
<p>{error}</p>
|
||||||
<a href="/labs" class="back-link">← Back to labs</a>
|
<a href="/labs" class="back-link">← Back to labs</a>
|
||||||
|
|
@ -28,9 +30,11 @@
|
||||||
</Page>
|
</Page>
|
||||||
{:else if project.status === 'list-only'}
|
{:else if project.status === 'list-only'}
|
||||||
<Page>
|
<Page>
|
||||||
<div slot="header" class="error-header">
|
{#snippet header()}
|
||||||
|
<div class="error-header">
|
||||||
<h1>Project Not Available</h1>
|
<h1>Project Not Available</h1>
|
||||||
</div>
|
</div>
|
||||||
|
{/snippet}
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<p>This project is not yet available for viewing. Please check back later.</p>
|
<p>This project is not yet available for viewing. Please check back later.</p>
|
||||||
<a href="/labs" class="back-link">← Back to labs</a>
|
<a href="/labs" class="back-link">← Back to labs</a>
|
||||||
|
|
@ -38,33 +42,36 @@
|
||||||
</Page>
|
</Page>
|
||||||
{:else if project.status === 'password-protected'}
|
{:else if project.status === 'password-protected'}
|
||||||
<Page>
|
<Page>
|
||||||
|
{#snippet header()}
|
||||||
|
<div class="project-header">
|
||||||
|
{#if project.logoUrl}
|
||||||
|
<div
|
||||||
|
class="project-logo"
|
||||||
|
style="background-color: {project.backgroundColor || '#f5f5f5'}"
|
||||||
|
>
|
||||||
|
<img src={project.logoUrl} alt="{project.title} logo" />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<h1 class="project-title">{project.title}</h1>
|
||||||
|
{#if project.subtitle}
|
||||||
|
<p class="project-subtitle">{project.subtitle}</p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/snippet}
|
||||||
<ProjectPasswordProtection
|
<ProjectPasswordProtection
|
||||||
projectSlug={project.slug}
|
projectSlug={project.slug}
|
||||||
correctPassword={project.password || ''}
|
correctPassword={project.password || ''}
|
||||||
projectType="labs"
|
projectType="labs"
|
||||||
>
|
>
|
||||||
{#snippet children()}
|
{#snippet children()}
|
||||||
<div slot="header" class="project-header">
|
|
||||||
{#if project.logoUrl}
|
|
||||||
<div
|
|
||||||
class="project-logo"
|
|
||||||
style="background-color: {project.backgroundColor || '#f5f5f5'}"
|
|
||||||
>
|
|
||||||
<img src={project.logoUrl} alt="{project.title} logo" />
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
<h1 class="project-title">{project.title}</h1>
|
|
||||||
{#if project.subtitle}
|
|
||||||
<p class="project-subtitle">{project.subtitle}</p>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<ProjectContent {project} />
|
<ProjectContent {project} />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</ProjectPasswordProtection>
|
</ProjectPasswordProtection>
|
||||||
</Page>
|
</Page>
|
||||||
{:else}
|
{:else}
|
||||||
<Page class="project-page">
|
<Page class="project-page">
|
||||||
<div slot="header" class="project-header">
|
{#snippet header()}
|
||||||
|
<div class="project-header">
|
||||||
{#if project.logoUrl}
|
{#if project.logoUrl}
|
||||||
<div
|
<div
|
||||||
class="project-logo"
|
class="project-logo"
|
||||||
|
|
@ -78,6 +85,7 @@
|
||||||
<p class="project-subtitle">{project.subtitle}</p>
|
<p class="project-subtitle">{project.subtitle}</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
{/snippet}
|
||||||
<ProjectContent {project} />
|
<ProjectContent {project} />
|
||||||
</Page>
|
</Page>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
|
|
@ -95,9 +95,11 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<Page>
|
<Page>
|
||||||
<div slot="header" class="project-header">
|
{#snippet header()}
|
||||||
|
<div class="project-header">
|
||||||
<ProjectHeaderContent {project} />
|
<ProjectHeaderContent {project} />
|
||||||
</div>
|
</div>
|
||||||
|
{/snippet}
|
||||||
{#if project.status === 'password-protected'}
|
{#if project.status === 'password-protected'}
|
||||||
<ProjectPasswordProtection
|
<ProjectPasswordProtection
|
||||||
projectSlug={project.slug}
|
projectSlug={project.slug}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue