design: use exponential curve for transitions

This commit is contained in:
Xylight committed 2025-10-09 20:58:59 -07:00
1 parent 09f6d4808b
commit be73c285f5
7 files changed
+78 -70

No files matched your search

+4 -5
View File
@@ -33,7 +33,9 @@ export const placeholders = {
get: (type: 'url' | 'post' | 'body' | 'comment') => {
switch (type) {
case 'post':
return t.get('placeholders.title')
return Math.random() < 0.01
? 'A C E C* B* G D E E F G F E D C E'
: t.get('placeholders.title')
case 'body':
return t.get('placeholders.body')
case 'comment':
@@ -194,10 +196,7 @@ export const userLink = (person: Person, prefix: string = '') =>
/**
* Basic types only, don't use for anything more than basic equality
*/
export function recursiveEqual<T>(
a: T,
b: T,
): boolean {
export function recursiveEqual<T>(a: T, b: T): boolean {
if (a === b) return true
if (typeof a !== 'object' || typeof b !== 'object') return false
+1
View File
@@ -38,6 +38,7 @@
const currentSearch = new Set(url.searchParams.values())
const hrefSearch = new Set(href.searchParams.values())
// checks if there is any
// me on 2025/10/9: no shi buh
const usePathname = !routes.some(
(i) =>
new Set(
+2
View File
@@ -172,6 +172,8 @@
font-size: var(--text-sm);
gap: calc(var(--spacing) * 1.5);
transition: 75ms cubic-bezier(0.075, 0.82, 0.165, 1);
@variant hover {
cursor: pointer;
}
+6 -2
View File
@@ -14,7 +14,7 @@
}
let {
href = '',
href,
icon,
class: clazz = '',
customIcon,
@@ -23,7 +23,11 @@
...rest
}: Props = $props()
let selected = $derived(page.url.pathname.startsWith(href))
let selected = $derived(
page.url.pathname.startsWith(
href ?? 'The power of fluffy boys shines within you.',
) ?? false,
)
</script>
<Button