Skip to content

Commit

Permalink
Minor fixes for switch heights and urls
Browse files Browse the repository at this point in the history
  • Loading branch information
rianadon committed Nov 17, 2024
1 parent de658a0 commit 9c95cdc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/geometry/switches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export function switchInfo(sw: Switch | undefined): SwInfo {
if (sw == 'mx-pcb') {
return { height: 6.2, pressedHeight: 2.6 }
}
if (sw == 'box' || sw?.startsWith('mx') || sw?.startsWith('old-mx')) {
if (sw?.startsWith('mx') || sw?.startsWith('old-mx')) {
return { height: 6.2, pressedHeight: 2.6 }
}
if (sw == 'choc') {
if (sw?.startsWith('choc')) {
return { height: 5, pressedHeight: 2 }
}
if (sw == 'alps') {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/showcase/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class="mx-8 my-6 grid sm:grid-cols-[repeat(2,18rem)] md:grid-cols-[repeat(2,21rem)] gap-2 justify-center"
>
{#each keyboards as kbd}
<a class="block bg-[#2e272d]/50 rounded-2 overflow-hidden citem" href="{base}/showcase/{kbd.key}">
<a class="block bg-[#2e272d]/50 rounded-2 overflow-hidden citem" href="{base}/showcase/{kbd.key}/">
{#if browser}
<div class="w-full aspect-[1.9/1] vignette">
<img
Expand Down
3 changes: 2 additions & 1 deletion src/routes/showcase/[slug]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { base } from '$app/paths'
import { page } from '$app/stores'
import Header from '$lib/Header.svelte'
import Icon from '$lib/presentation/Icon.svelte'
import {
Expand All @@ -19,7 +20,7 @@

<svelte:head>
<title>{kbd.name} • Showcase • Cosmos Keyboard</title>
<link rel="canonical" href="https://ryanis.cool/cosmos/showcase" />
<link rel="canonical" href="https://ryanis.cool/cosmos/showcase/{$page.params.slug}/" />
<link rel="icon" href="{base}/favicon.png" />
</svelte:head>

Expand Down

0 comments on commit 9c95cdc

Please sign in to comment.