Ripristina card servizi e sistema typing plugin Vite
Made-with: Cursor
This commit is contained in:
@ -9,11 +9,16 @@ import alpinejs from '@astrojs/alpinejs';
|
|||||||
* Mitiga race su richieste SSR parallele durante l’ottimizzazione dipendenze
|
* Mitiga race su richieste SSR parallele durante l’ottimizzazione dipendenze
|
||||||
* (Astro + Cloudflare + Vite 7: file mancanti sotto `node_modules/.vite/deps_*`).
|
* (Astro + Cloudflare + Vite 7: file mancanti sotto `node_modules/.vite/deps_*`).
|
||||||
* Se l’errore persiste: `npm run dev:fresh` (cancella la cache Vite e riavvia).
|
* Se l’errore persiste: `npm run dev:fresh` (cancella la cache Vite e riavvia).
|
||||||
|
*
|
||||||
|
* @returns {import('vite').Plugin}
|
||||||
*/
|
*/
|
||||||
function viteSsrOptimizeIgnoreOutdated() {
|
function viteSsrOptimizeIgnoreOutdated() {
|
||||||
return {
|
return {
|
||||||
name: 'vite-ssr-optimize-ignore-outdated',
|
name: 'vite-ssr-optimize-ignore-outdated',
|
||||||
enforce: 'post',
|
enforce: /** @type {'post'} */ ('post'),
|
||||||
|
/**
|
||||||
|
* @param {string} name
|
||||||
|
*/
|
||||||
configEnvironment(name) {
|
configEnvironment(name) {
|
||||||
if (name === 'astro' || name === 'ssr' || name === 'prerender') {
|
if (name === 'astro' || name === 'ssr' || name === 'prerender') {
|
||||||
return {
|
return {
|
||||||
@ -31,6 +36,8 @@ export default defineConfig({
|
|||||||
/** Usato da Astro per URL assoluti (es. sitemap). Imposta il dominio di produzione. */
|
/** Usato da Astro per URL assoluti (es. sitemap). Imposta il dominio di produzione. */
|
||||||
// site: 'https://www.tuodominio.com',
|
// site: 'https://www.tuodominio.com',
|
||||||
|
|
||||||
|
output: 'server', // per il deployment su Cloudflare Pages
|
||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss(), viteSsrOptimizeIgnoreOutdated()],
|
plugins: [tailwindcss(), viteSsrOptimizeIgnoreOutdated()],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -416,47 +416,19 @@ const langMeta = {
|
|||||||
const hasGlobe =
|
const hasGlobe =
|
||||||
'decoration' in card &&
|
'decoration' in card &&
|
||||||
card.decoration === 'wireframe-globe';
|
card.decoration === 'wireframe-globe';
|
||||||
const hasOchreAccent =
|
|
||||||
card.title === 'Aggiornamento e manutenzione evolutiva';
|
|
||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
class:list={[
|
class:list={[
|
||||||
card.layout === 'wide' && 'md:col-span-2',
|
card.layout === 'wide' && 'md:col-span-2',
|
||||||
card.layout === 'tall' && 'md:row-span-2',
|
card.layout === 'tall' && 'md:row-span-2',
|
||||||
hasGlobe && 'relative overflow-hidden',
|
hasGlobe && 'relative overflow-hidden',
|
||||||
hasOchreAccent && 'border-amber-500/90 ring-1 ring-inset ring-amber-700/70',
|
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{hasGlobe && <CardBottomRightTexture />}
|
{hasGlobe && <CardBottomRightTexture />}
|
||||||
<div class:list={[hasGlobe && 'relative z-10']}>
|
<div class:list={[hasGlobe && 'relative z-10']}>
|
||||||
<h3
|
<h3 class="text-lg font-semibold text-nx-fg">{card.title}</h3>
|
||||||
class:list={[
|
|
||||||
'text-lg font-semibold',
|
|
||||||
hasOchreAccent ? 'text-amber-200/95' : 'text-nx-fg',
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{hasOchreAccent ? (
|
|
||||||
<>
|
|
||||||
<span class="text-amber-500">Aggiornamento</span>{' '}
|
|
||||||
<span class="text-white">e manutenzione evolutiva</span>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
card.title
|
|
||||||
)}
|
|
||||||
</h3>
|
|
||||||
<p class="mt-2 text-sm leading-relaxed text-nx-muted">
|
<p class="mt-2 text-sm leading-relaxed text-nx-muted">
|
||||||
{hasOchreAccent ? (
|
{card.body}
|
||||||
<>
|
|
||||||
Il mondo dell'IA e delle{' '}
|
|
||||||
<span class="text-amber-500">normative</span> (legali e sanitarie) e'
|
|
||||||
in costante mutamento. Il nostro servizio include l'aggiornamento continuo
|
|
||||||
dei motori di analisi, garantendo che il software sia sempre allineato con
|
|
||||||
le ultime <span class="text-amber-500">tecnologie</span> e le evoluzioni del
|
|
||||||
mercato di riferimento.
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
card.body
|
|
||||||
)}
|
|
||||||
</p>
|
</p>
|
||||||
{'callout' in card && card.callout && (
|
{'callout' in card && card.callout && (
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user