**Phase 2c: no more Nuxt UI, the same site on plain Tailwind** #5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/phase-2c-no-nuxt-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The site used Nuxt UI for six things: buttons, the header navigation, two menu icons, a card, a placeholder block and the gallery lightbox. To get those, it pulled in a UI kit with an icon runtime, a colour-mode module, Headless UI, VueUse and four Tailwind plugins. After this PR, each of the six is a small plain component with Tailwind classes, and Tailwind is a direct dependency. No page looks different. Nothing changes on the server: same Dockerfile, compose file, pipeline and Traefik labels.
Commits:
elements/button.vue). The header's Inschrijven button, the content's Link buttons and the 404 button are now an<a>through NuxtLink, or a<button>when the content gives no link. They use the classes the Nuxt UI button rendered. Thedownload="false"attribute is gone, along with the other props Nuxt UI leaked onto the link as HTML attributes (as,type,exact,exactquery,exacthash).main/header.vue,svg/icon_menu.vue,svg/icon_close.vue). The four nav links are a plain list of NuxtLinks with the same classes. The active link is the router's, as before: only a page's own link, so on an atelier page no link is active. The mobile menu's open and close icons are inline SVG, so no icon runtime is needed.elements/course.vue,elements/person.vue). The aanbod card was a transparent box with no padding, ring or shadow, so it is now a plaindiv. The placeholder for a teacher without a photo is a greendiv. No teacher is missing a photo today, so it does not show anywhere.elements/images.vue), now a native<dialog>. While it is open, focus stays in the dialog and the rest of the page is inert. Esc or a click outside the image closes it, focus goes back to where it was, and the page does not scroll behind it. It hasaria-modal="true"and a label ("Vergrote afbeelding"). The fade and zoom use the same classes and timings as before.@nuxt/uiis removed.@nuxtjs/tailwindcss(the same 6.13.1 that Nuxt UI used, with the same content globs) and@tailwindcss/typography(the same 0.5.16, for theprosetext) become direct dependencies. Tailwind itself stays 3.4.17, and the lockfile has only removals. The lastprimary/grayclasses becomemain/black, which are the same colours. The Tailwind config keepsgraypointing at the black palette, as Nuxt UI did, because Tailwind's own defaults read it: without it, the footer's 4 px bottom border turned light grey.darkMode: 'class'stays, so nothing ever turns dark.main.csstakes over Nuxt UI's two global rules, the green focus colour for links and the green text selection.app.config.tsheld only the Nuxt UI colours, so it is removed.Smaller:
@nuxt/uiout;@nuxtjs/tailwindcssand@tailwindcss/typographyin, both already installed through it)pnpm list --depth Infinity, unique)node_modules.outputpublic/: 106.9 → 106.8 MB).output/public/_nuxt/*.js)Checked locally with Node 22.14.0 and pnpm 9.1.2 (Corepack). Both builds were made from a clean checkout,
main(66920d6) against the branch, and served side by side. They were checked in headless Chromium with third-party requests blocked in both (map tiles, Vimeo, TimeTree, MailerLite) and the home banner's frame timer stopped in both, so the only thing that differs is the code:pnpm install --frozen-lockfileandpnpm buildpass./nope,/aanbod/x/y). At 1280, all 22 are identical, 0 pixels. At 375, each page differs in 2 pixels, by 1/255: the anti-aliasing of the menu icon, which was a CSS mask and is now inline SVG. Every page has the same height in both builds.download="false"and the leaked props)./inschrijven.target="_self"andrel="noopener noreferrer". The 4 Link buttons without a link stay<button>.mainused on a page lose their CSS rule in the branch. All 49 are Nuxt UI's own classes on the replaced components (for examplebg-primary-200,dark:*,disabled:*,before:*, the icon classes and the modal's wrapper classes). None of them is still in the branch's rendered pages or source. No class used on a branch page lacks a rule thatmainhad. 794 class names disappear from the generated CSS, mostly Nuxt UI's safelist and the styles of its components. None of them is in the branch's pages or source. The one name the check flags,@container, is a CSS at-rule inmain.css, not the removed plugin's class./(pass) and an atelier page with a gallery (the same 2 findings and 6 advisories in both).Not checked:
<dialog>, which Safari supports from 15.4 and Firefox from 98.Found, not changed:
divwith a click handler), so the lightbox opens only by mouse or touch. This is the same as onmain.aria-current. Pressing Enter on a nav link drops focus to the page (blur()). Both are kept as they were.border-accent-800in the footer andbg-backgroundin the header are classes Tailwind does not know, so they do nothing (also onmain).