diff --git a/src/app.html b/src/app.html index 8013721..2f0b73f 100644 --- a/src/app.html +++ b/src/app.html @@ -3,7 +3,7 @@ - + diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 3090706..8155a89 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -9,6 +9,20 @@ body { font-family: 'cstd', 'Helvetica Neue', Arial, sans-serif; font-weight: 400; line-height: 1.4; + overflow-x: hidden; + width: 100%; +} + +// Prevent horizontal scroll +html { + overflow-x: hidden; + width: 100%; + font-size: 18px; + + // Set rem to 16px on mobile devices + @include breakpoint('phone') { + font-size: 16px; + } } // Heading font weights diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 87aca88..ddbf2ef 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -24,11 +24,22 @@ $unit-16x: $unit * 16; $unit-18x: $unit * 18; $unit-20x: $unit * 20; +/* Corner Radius + * -------------------------------------------------------------------------- */ +$corner-radius-xs: 4px; // $unit-half +$corner-radius-sm: 6px; // $unit-three-fourth +$corner-radius-md: 8px; // $unit +$corner-radius-lg: 10px; // $unit + 2px +$corner-radius-xl: 12px; // $unit * 1.5 +$corner-radius-2xl: 16px; // $unit-2x +$corner-radius-3xl: 24px; // $unit-3x +$corner-radius-full: 999px; // Full rounded + /* Page properties * -------------------------------------------------------------------------- */ -$page-corner-radius: $unit; -$image-corner-radius: $unit-2x; -$card-corner-radius: $unit-3x; +$page-corner-radius: $corner-radius-md; +$image-corner-radius: $corner-radius-2xl; +$card-corner-radius: $corner-radius-3xl; $page-top-margin: $unit-6x; @@ -109,6 +120,7 @@ $salmon-pink: #ffd5cf; // Desaturated salmon pink for hover states $bg-color: #e8e8e8; $page-color: #ffffff; $card-color: #f7f7f7; +$card-color-hover: #f0f0f0; $text-color-light: #b2b2b2; $text-color-body: #666666; @@ -149,6 +161,14 @@ $twitter-text-color: #0f5f9b; $corner-radius: $unit-2x; $mobile-corner-radius: $unit-2x; +/* Inputs + * -------------------------------------------------------------------------- */ + +$input-background-color: #f7f7f7; +$input-background-color-hover: #f0f0f0; +$input-text-color: #666666; +$input-text-color-hover: #4d4d4d; + /* Avatar header * -------------------------------------------------------------------------- */ $avatar-radius: 2rem; diff --git a/src/lib/components/BackButton.svelte b/src/lib/components/BackButton.svelte new file mode 100644 index 0000000..f72915e --- /dev/null +++ b/src/lib/components/BackButton.svelte @@ -0,0 +1,75 @@ + + + + + diff --git a/src/lib/components/DynamicPostContent.svelte b/src/lib/components/DynamicPostContent.svelte index 91a779e..faf0147 100644 --- a/src/lib/components/DynamicPostContent.svelte +++ b/src/lib/components/DynamicPostContent.svelte @@ -1,10 +1,9 @@ {#if isClickable} - (window.location.href = projectUrl)} + on:keydown={(e) => e.key === 'Enter' && (window.location.href = projectUrl)} + role="button" + tabindex="0" style:transform >
@@ -62,9 +65,9 @@ target="_blank" rel="noopener noreferrer" iconPosition="right" - onclick={(e) => e.stopPropagation()} + on:click={(e) => e.stopPropagation()} > - Visit site + Visit Password Protected
{/if} -
+ {:else}
@@ -187,14 +190,12 @@ transform-style: preserve-3d; will-change: transform; - // Prevent overflow issues with 3D transforms - -webkit-mask-image: -webkit-radial-gradient(white, black); - mask-image: radial-gradient(white, black); + // Remove mask-image to allow shadows to render properly &:hover { box-shadow: - 0 10px 30px rgba(0, 0, 0, 0.12), - 0 2px 10px rgba(0, 0, 0, 0.08); + 0 10px 30px rgba(0, 0, 0, 0.1), + 0 1px 8px rgba(0, 0, 0, 0.06); .project-title { color: $red-60; @@ -203,6 +204,15 @@ &.clickable { cursor: pointer; + + &:focus { + outline: 2px solid $red-60; + outline-offset: 2px; + } + + &:focus:not(:focus-visible) { + outline: none; + } } @include breakpoint('phone') { @@ -224,6 +234,8 @@ :global(.btn) { flex-shrink: 0; margin-top: 2px; // Align with title baseline + font-size: 1rem !important; // Match detail page Visit button + min-height: auto !important; // Remove min-height to match detail page } } @@ -235,13 +247,13 @@ .project-title { margin: 0; - font-size: 1.125rem; + font-size: 1rem; font-weight: 400; color: $grey-00; line-height: 1.3; @include breakpoint('phone') { - font-size: 1.125rem; + font-size: 1rem; } } @@ -254,7 +266,7 @@ .project-description { margin: 0 0 $unit-3x 0; - font-size: 1.125rem; + font-size: 1rem; line-height: 1.5; color: $grey-20; diff --git a/src/lib/components/Mention.svelte b/src/lib/components/Mention.svelte index b10176f..62c5dd2 100644 --- a/src/lib/components/Mention.svelte +++ b/src/lib/components/Mention.svelte @@ -1,9 +1,19 @@ -
  • diff --git a/src/lib/components/NavDropdown.svelte b/src/lib/components/NavDropdown.svelte new file mode 100644 index 0000000..e2fa2df --- /dev/null +++ b/src/lib/components/NavDropdown.svelte @@ -0,0 +1,237 @@ + + + + + diff --git a/src/lib/components/Page.svelte b/src/lib/components/Page.svelte index 508e566..e12f243 100644 --- a/src/lib/components/Page.svelte +++ b/src/lib/components/Page.svelte @@ -1,13 +1,26 @@ -
    -
    - -
    +
    + {#if header} +
    + {@render header()} +
    + {/if} - + {#if children} + {@render children()} + {/if}
    diff --git a/src/lib/components/PostItem.svelte b/src/lib/components/PostItem.svelte index 62e5ade..9ac7d18 100644 --- a/src/lib/components/PostItem.svelte +++ b/src/lib/components/PostItem.svelte @@ -57,7 +57,7 @@ &.note { .post-excerpt { - font-size: 1.125rem; + font-size: 1rem; } } @@ -107,7 +107,7 @@ .post-excerpt { margin: 0; color: $grey-00; - font-size: 1.125rem; + font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; diff --git a/src/lib/components/ProjectContent.svelte b/src/lib/components/ProjectContent.svelte index 5ae021d..b0b7a5f 100644 --- a/src/lib/components/ProjectContent.svelte +++ b/src/lib/components/ProjectContent.svelte @@ -1,7 +1,6 @@
    @@ -161,32 +132,17 @@ > {/if} - {#if type === 'textarea' && isTextarea(restProps)} -