Skip to content

Commit 970dd59

Browse files
committed
fix MDX_EXPAND_LG and add debugging
1 parent eda889a commit 970dd59

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

docs/working-notes/todo3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,5 +542,6 @@ IPv6 Traefik
542542
pitaj plausible zasto ne radi za razlicite poddomene i domene
543543
text float around images on blog, home and about page
544544
design system pages, typography
545+
js function to print image dom and src size over image for debugging, moze npm paket
545546
------------
546547
```

src/components/Header.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import { Icon } from 'astro-icon/components';
33
import { Image } from 'astro:assets';
44
5-
import clsx from 'clsx';
6-
75
import HeaderLink from '@/components/HeaderLink.astro';
86
import ThemeToggle from '@/components/ThemeToggle.astro';
97
import { SELECTORS } from '@/constants/dom';
@@ -12,6 +10,7 @@ import { NAVIGATION_ITEMS } from '@/constants/navigation';
1210
import { ROUTES } from '@/constants/routes';
1311
import { CONFIG_CLIENT } from '@/config/client';
1412
import { getActiveNavItemPath } from '@/utils/navigation';
13+
import { cn } from '@/utils/styles';
1514
1615
import Avatar from '@/assets/images/avatar.jpg';
1716
@@ -26,7 +25,7 @@ const activeNavItemPath = getActiveNavItemPath(routePathname);
2625

2726
<header id={SCROLL_TO_TOP_ID} class="group border-b border-base-300">
2827
<div
29-
class={clsx(
28+
class={cn(
3029
'flex gap-2',
3130
'group-[.menu-open]:flex-col md:!flex-row md:justify-between md:items-center',
3231
'max-w-6xl py-2 px-4 md:mx-auto'

src/constants/image.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ export const IMAGE_SIZES = {
6464
widths: [TW_SCREENS.XXS, TW_SCREENS.SM],
6565
sizes: `(max-width: ${TW_SCREENS.XS}px) ${TW_SCREENS.XXS}px, ${TW_SCREENS.SM}px`,
6666
},
67-
// doesn't work
6867
MDX_EXPAND_LG: {
6968
widths: [TW_SCREENS.XXS, TW_SCREENS.SM, TW_SCREENS.MD, TW_SCREENS.LG, TW_SCREENS.XL],
70-
sizes: `(max-width: ${TW_SCREENS.XS}px) ${TW_SCREENS.XXS}px, (max-width: ${TW_SCREENS.MD}px) ${TW_SCREENS.SM}px, (max-width: ${TW_SCREENS.LG}px) ${TW_SCREENS.LG}px, ${TW_SCREENS.XL}px`,
69+
sizes: `(max-width: ${TW_SCREENS.XS}px) ${TW_SCREENS.XXS}px, (max-width: ${TW_SCREENS.MD}px) ${TW_SCREENS.SM}px, (max-width: ${TW_SCREENS.XL}px) ${TW_SCREENS.LG}px, ${TW_SCREENS.XL}px`,
70+
// for debugging
71+
// class: `border-8 border-blue-500 [@media(max-width:475px)]:!border-yellow-300 [@media(max-width:768px)]:border-orange-500 [@media(max-width:1280px)]:border-red-500`,
7172
},
7273
},
7374
} as const satisfies ImageSizes;

0 commit comments

Comments
 (0)