Mobile layout adjustments
This commit is contained in:
parent
f2a6bf3f99
commit
205244584f
12 changed files with 185 additions and 147 deletions
|
|
@ -89,16 +89,13 @@
|
||||||
.header-content {
|
.header-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
gap: $unit-3x;
|
gap: $unit-3x;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
@include breakpoint('phone') {
|
||||||
gap: $unit-2x;
|
gap: $unit-2x;
|
||||||
max-width: none;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let noHorizontalPadding = false
|
interface Props {
|
||||||
|
noHorizontalPadding?: boolean
|
||||||
|
class?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
let { noHorizontalPadding = false, class: className = '' }: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="page" class:no-horizontal-padding={noHorizontalPadding}>
|
<section class="page {className}" class:no-horizontal-padding={noHorizontalPadding}>
|
||||||
<header>
|
<header>
|
||||||
<slot name="header" />
|
<slot name="header" />
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,11 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@include breakpoint('phone') {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 $unit-2x;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@
|
||||||
.universe-feed {
|
.universe-feed {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: $unit-3x;
|
gap: $unit-2x;
|
||||||
|
padding: 0 $unit-2x;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-container {
|
.empty-container {
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: $unit;
|
gap: $unit;
|
||||||
font-weight: 500;
|
font-weight: 400;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s ease;
|
transition: all 0.15s ease;
|
||||||
|
|
@ -211,7 +211,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-medium {
|
.btn-medium {
|
||||||
padding: $unit $unit-2x;
|
padding: ($unit * 1.5) $unit-2x;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 24px;
|
border-radius: 24px;
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,16 @@
|
||||||
$: ({ albums, games, error } = data)
|
$: ({ albums, games, error } = data)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Page>
|
<section class="about-container">
|
||||||
|
<Page>
|
||||||
<svelte:fragment slot="header">
|
<svelte:fragment slot="header">
|
||||||
<h2>A little about me</h2>
|
<h2>A little about me</h2>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
|
||||||
<section class="bio">
|
<section class="bio">
|
||||||
<p>
|
<p>
|
||||||
Hello! My name is <em>Justin Edmund</em>. I'm a software designer and developer living in San
|
Hello! My name is <em>Justin Edmund</em>. I'm a software designer and developer living in
|
||||||
Francisco.
|
San Francisco.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Right now, I'm spending my free time building a hobby journaling app called <a
|
Right now, I'm spending my free time building a hobby journaling app called <a
|
||||||
|
|
@ -37,15 +38,15 @@
|
||||||
> in 2011 with a Bachelors of Arts in Communication Design.
|
> in 2011 with a Bachelors of Arts in Communication Design.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
</Page>
|
</Page>
|
||||||
<Page>
|
<Page>
|
||||||
<svelte:fragment slot="header">
|
<svelte:fragment slot="header">
|
||||||
<h2>Notable mentions</h2>
|
<h2>Notable mentions</h2>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
|
||||||
<MentionList />
|
<MentionList />
|
||||||
</Page>
|
</Page>
|
||||||
<Page noHorizontalPadding={true}>
|
<Page noHorizontalPadding={true}>
|
||||||
<svelte:fragment slot="header">
|
<svelte:fragment slot="header">
|
||||||
<h2>Now playing</h2>
|
<h2>Now playing</h2>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
|
@ -63,9 +64,27 @@
|
||||||
<p>Loading games...</p>
|
<p>Loading games...</p>
|
||||||
{/if}
|
{/if}
|
||||||
</section> -->
|
</section> -->
|
||||||
</Page>
|
</Page>
|
||||||
|
</section>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.about-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: $unit-2x;
|
||||||
|
justify-content: center;
|
||||||
|
max-width: 700px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
@include breakpoint('phone') {
|
||||||
|
padding: 0 $unit-2x;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.page) {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
a,
|
a,
|
||||||
em {
|
em {
|
||||||
color: $red-60;
|
color: $red-60;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@
|
||||||
padding: 0 $unit-2x;
|
padding: 0 $unit-2x;
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
@include breakpoint('phone') {
|
||||||
padding: $unit-3x $unit;
|
padding: 0 $unit-2x;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
const error = $derived(data.error as string | undefined)
|
const error = $derived(data.error as string | undefined)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if error}
|
<div class="project-page-container">
|
||||||
|
{#if error}
|
||||||
<Page>
|
<Page>
|
||||||
<div slot="header" class="error-header">
|
<div slot="header" class="error-header">
|
||||||
<h1>Error</h1>
|
<h1>Error</h1>
|
||||||
|
|
@ -21,11 +22,11 @@
|
||||||
<a href="/labs" class="back-link">← Back to labs</a>
|
<a href="/labs" class="back-link">← Back to labs</a>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
{:else if !project}
|
{:else if !project}
|
||||||
<Page>
|
<Page>
|
||||||
<div class="loading">Loading project...</div>
|
<div class="loading">Loading project...</div>
|
||||||
</Page>
|
</Page>
|
||||||
{:else if project.status === 'list-only'}
|
{:else if project.status === 'list-only'}
|
||||||
<Page>
|
<Page>
|
||||||
<div slot="header" class="error-header">
|
<div slot="header" class="error-header">
|
||||||
<h1>Project Not Available</h1>
|
<h1>Project Not Available</h1>
|
||||||
|
|
@ -35,7 +36,7 @@
|
||||||
<a href="/labs" class="back-link">← Back to labs</a>
|
<a href="/labs" class="back-link">← Back to labs</a>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
{:else if project.status === 'password-protected'}
|
{:else if project.status === 'password-protected'}
|
||||||
<Page>
|
<Page>
|
||||||
<ProjectPasswordProtection
|
<ProjectPasswordProtection
|
||||||
projectSlug={project.slug}
|
projectSlug={project.slug}
|
||||||
|
|
@ -61,11 +62,14 @@
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</ProjectPasswordProtection>
|
</ProjectPasswordProtection>
|
||||||
</Page>
|
</Page>
|
||||||
{:else}
|
{:else}
|
||||||
<Page>
|
<Page class="project-page">
|
||||||
<div slot="header" class="project-header">
|
<div slot="header" class="project-header">
|
||||||
{#if project.logoUrl}
|
{#if project.logoUrl}
|
||||||
<div class="project-logo" style="background-color: {project.backgroundColor || '#f5f5f5'}">
|
<div
|
||||||
|
class="project-logo"
|
||||||
|
style="background-color: {project.backgroundColor || '#f5f5f5'}"
|
||||||
|
>
|
||||||
<img src={project.logoUrl} alt="{project.title} logo" />
|
<img src={project.logoUrl} alt="{project.title} logo" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
@ -76,9 +80,15 @@
|
||||||
</div>
|
</div>
|
||||||
<ProjectContent {project} />
|
<ProjectContent {project} />
|
||||||
</Page>
|
</Page>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.project-page-container {
|
||||||
|
padding: 0 $unit-2x;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
/* Error and Loading States */
|
/* Error and Loading States */
|
||||||
.error-header h1 {
|
.error-header h1 {
|
||||||
color: $red-60;
|
color: $red-60;
|
||||||
|
|
@ -116,6 +126,7 @@
|
||||||
.project-header {
|
.project-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding: $unit-2x 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-logo {
|
.project-logo {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
const error = $derived(data.error)
|
const error = $derived(data.error)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="photos-page">
|
<div class="photos-container">
|
||||||
{#if error}
|
{#if error}
|
||||||
<div class="error-container">
|
<div class="error-container">
|
||||||
<div class="error-message">
|
<div class="error-message">
|
||||||
|
|
@ -29,14 +29,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.photos-page {
|
.photos-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 900px;
|
max-width: 700px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 $unit-3x;
|
padding: 0 $unit-3x;
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
@include breakpoint('phone') {
|
||||||
padding: $unit-3x $unit-2x;
|
padding: 0 $unit-2x;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,17 +24,7 @@
|
||||||
.universe-container {
|
.universe-container {
|
||||||
max-width: 784px;
|
max-width: 784px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 $unit-5x;
|
padding: 0;
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
|
||||||
margin-top: $unit-3x;
|
|
||||||
margin-bottom: $unit-3x;
|
|
||||||
padding: 0 $unit-3x;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include breakpoint('small-phone') {
|
|
||||||
padding: 0 $unit-2x;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message {
|
.error-message {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{#if error || !post}
|
<div class="universe-page-container">
|
||||||
|
{#if error || !post}
|
||||||
<Page>
|
<Page>
|
||||||
<div class="error-container">
|
<div class="error-container">
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
|
|
@ -52,13 +53,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
{:else}
|
{:else}
|
||||||
<Page>
|
<Page>
|
||||||
<DynamicPostContent {post} />
|
<DynamicPostContent {post} />
|
||||||
</Page>
|
</Page>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.universe-page-container {
|
||||||
|
padding: 0 $unit-2x;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.error-container {
|
.error-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
||||||
|
|
@ -157,9 +157,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 700px;
|
max-width: 700px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
@include breakpoint('phone') {
|
@include breakpoint('phone') {
|
||||||
margin-top: $unit-3x;
|
padding: 0 $unit-2x;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.page) {
|
:global(.page) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue