mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
* feat: mobile UX overhaul, theme flash prevention and build cleanup UI/UX (mostly mobile): - Prevent white flash on load: pre-paint inline style + script in index.html applies the persisted theme before first paint. - Match browser chrome to the app background: theme-color meta kept in sync for Android/older iOS, and body background pinned to the Layout color for Safari 26+, which ignores theme-color and samples the page. - Make the document the app's scroller instead of n-layout's nested container: single scrollbar, native iOS tap-status-bar-to-scroll-top, natural toolbar collapsing; desktop sider becomes sticky and router scrollBehavior restores/resets scroll on navigation. - Full-width mobile menu that fades in under an always-visible sticky top bar, seamless app background without the hero gradient, closes on navigation (including About while already on /about), scroll-locked behind, symmetric spacing around the title block and icon row. - Language selector and theme toggle become icon dropdowns; theme supports System/Light/Dark via useColorMode (same storage as before). - Route-change loading spinner scoped to the page area so the nav bar stays visible; spinner remains cosmetic-only (350ms delay). - Halve content padding on small screens; reduce home top padding. - Full-width expand/collapse tools button so its width doesn't jump. - No sticky hover styles on touch devices (hover gated behind @media (hover: hover)). Build: - Rename deprecated rolldown output.advancedChunks to codeSplitting. - Fix unocss 'unmatched utility' warnings in the pretty-scrollbar shortcut; override js-sha256 to 0.11.x (drops eval); bump javascript-obfuscator to 5.4.6. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNayL5ianBBucVapfkM8CC * Remove unnecessary comment * Refresh lockfile, remove releaseage ignore Signed-off-by: Sebastian Danielsson <sebastian.danielsson@proton.me> * chore: remove unused LocaleSelector component Language selection moved into the NavbarButtons dropdown; nothing references this component anymore. Its i18n keys are left in place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNayL5ianBBucVapfkM8CC --------- Signed-off-by: Sebastian Danielsson <sebastian.danielsson@proton.me> Co-authored-by: Claude <noreply@anthropic.com>
34 lines
1.5 KiB
TypeScript
34 lines
1.5 KiB
TypeScript
import {
|
|
defineConfig,
|
|
presetAttributify,
|
|
presetTypography,
|
|
presetWind3,
|
|
transformerDirectives,
|
|
transformerVariantGroup,
|
|
} from 'unocss';
|
|
|
|
import { presetScrollbar } from 'unocss-preset-scrollbar';
|
|
|
|
export default defineConfig({
|
|
presets: [presetWind3(), presetAttributify({
|
|
ignoreAttributes: ['size'],
|
|
}), presetTypography(), presetScrollbar()],
|
|
transformers: [transformerDirectives(), transformerVariantGroup()],
|
|
theme: {
|
|
colors: {
|
|
primary: '#1ea54c',
|
|
|
|
},
|
|
},
|
|
shortcuts: {
|
|
// Inlined expansion of the preset's `scrollbar` shortcut, minus `scrollbar-width-auto`
|
|
// and `scrollbar-color-[...]`: preset-scrollbar 4.0.0 only registers rules for those
|
|
// two when `compatible: true`, so they trigger "unmatched utility" build warnings, and
|
|
// enabling compatible mode would make browsers ignore the ::-webkit-scrollbar styling.
|
|
'pretty-scrollbar': 'overflow-auto scrollbar-custom-property scrollbar-track:scrollbar-background-color-[var(--scrollbar-track)] scrollbar-thumb:scrollbar-background-color-[var(--scrollbar-thumb)] scrollbar:scrollbar-width-[var(--scrollbar-width)] scrollbar:scrollbar-height-[var(--scrollbar-height)] scrollbar-rounded scrollbar-thumb-color-gray-300 scrollbar-track-color-gray-100 dark:scrollbar-thumb-color-#424242 dark:scrollbar-track-color-#686868',
|
|
'divider': 'h-1px bg-current op-10',
|
|
'bg-surface': 'bg-#ffffff dark:bg-#232323',
|
|
'bg-background': 'bg-#f1f5f9 dark:bg-#1c1c1c',
|
|
},
|
|
});
|