web: add notch easter egg & optimize for landscape

it took way too much time to optimize the damn logo sticker under notch for all devices & zoom states

also improved device lib api
This commit is contained in:
wukko
2024-07-03 19:05:14 +06:00
parent 901f0a7480
commit 374611553b
7 changed files with 164 additions and 16 deletions

View File

@ -9,14 +9,13 @@ import type { Load } from '@sveltejs/kit';
import languages from '$i18n/languages.json';
import { loadTranslations, defaultLocale } from '$lib/i18n/translations';
import device from '$lib/device.js';
export const load: Load = async ({ url }) => {
const { pathname } = url;
let preferredLocale = defaultLocale;
if (browser) {
const device = (await import('$lib/device')).device;
const settings = get((await import('$lib/settings')).default);
const deviceLanguage = device.preferredLocale;
const settingsLanguage = settings.appearance.language;