Compare commits
12
Commits
13cccd9c39
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9b3366627 | ||
|
|
f88f4ba0be | ||
|
|
602cbb007c | ||
|
|
60d9aeec2e | ||
|
|
06076eb3bb | ||
|
|
18970e3ffa | ||
|
|
8f524f6f79 | ||
|
|
ec0c8876dc | ||
|
|
949237c542 | ||
|
|
2418fc7a73 | ||
|
|
ff631650f4 | ||
|
|
e46bc0abb9 |
No files matched your search
@@ -15,6 +15,13 @@
|
||||
"izenburua": {
|
||||
"type": "string"
|
||||
},
|
||||
"hilekoEgitaraua": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"allowedTypes": [
|
||||
"files"
|
||||
]
|
||||
},
|
||||
"banner": {
|
||||
"type": "component",
|
||||
"component": "hasiera.banner",
|
||||
|
||||
+1
@@ -537,6 +537,7 @@ export interface ApiHasieraHasiera extends Struct.SingleTypeSchema {
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
hilekoEgitaraua: Schema.Attribute.Media<'files'>;
|
||||
izanLabazkide: Schema.Attribute.Component<'hasiera.izan-labazkide', false> &
|
||||
Schema.Attribute.Required;
|
||||
izenburua: Schema.Attribute.String;
|
||||
|
||||
+15
-14
@@ -7,27 +7,28 @@
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"serve": "serve dist"
|
||||
"serve": "serve dist",
|
||||
"upgrade": "pnpm dlx @astrojs/upgrade"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/node": "^11.0.0",
|
||||
"@astrojs/react": "^6.0.0",
|
||||
"@astrojs/node": "^11.1.11",
|
||||
"@astrojs/react": "^6.0.6",
|
||||
"@astrojs/rss": "^4.0.19",
|
||||
"@astrojs/sitemap": "^3.7.3",
|
||||
"@types/react": "^19.2.15",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"astro": "^7.0.4",
|
||||
"dayjs": "^1.11.21",
|
||||
"gsap": "^3.15.0",
|
||||
"marked": "^18.0.4",
|
||||
"react": "^19.2.6",
|
||||
"react-dom": "^19.2.6",
|
||||
"@astrojs/sitemap": "^3.7.4",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"astro": "^7.4.8",
|
||||
"dayjs": "^1.11.23",
|
||||
"gsap": "^3.15.1",
|
||||
"marked": "^18.2.0",
|
||||
"react": "^19.3.1",
|
||||
"react-dom": "^19.3.1",
|
||||
"satori": "^0.26.0",
|
||||
"serve": "^14.2.6",
|
||||
"serve": "^14.2.7",
|
||||
"sharp": "^0.34.5",
|
||||
"vite": "8.0.16"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sass-embedded": "^1.100.0"
|
||||
"sass-embedded": "^1.108.1"
|
||||
}
|
||||
}
|
||||
Vendored
+4
@@ -1,5 +1,9 @@
|
||||
type EnvBoolean = "true" | "false";
|
||||
|
||||
interface Window {
|
||||
_paq?: unknown[];
|
||||
}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly STRAPI_URL: string;
|
||||
readonly SITE_URL: string;
|
||||
|
||||
@@ -23,7 +23,6 @@ const {
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
@@ -48,13 +47,12 @@ const {
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = (window._paq = window._paq || []);
|
||||
// Call disableCookies before calling trackPageView
|
||||
_paq.push(["disableCookies"]);
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(["disableCookies"]);
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
(function () {
|
||||
var u = "https://analytics.txarli.dev/";
|
||||
var u = "//analytics.txarli.dev/";
|
||||
_paq.push(["setTrackerUrl", u + "matomo.php"]);
|
||||
_paq.push(["setSiteId", "1"]);
|
||||
var d = document,
|
||||
@@ -62,7 +60,9 @@ const {
|
||||
s = d.getElementsByTagName("script")[0];
|
||||
g.async = true;
|
||||
g.src = u + "matomo.js";
|
||||
s.parentNode.insertBefore(g, s);
|
||||
if (s?.parentNode) {
|
||||
s.parentNode.insertBefore(g, s);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface FileMedia {
|
||||
mime: "application/pdf";
|
||||
url: string;
|
||||
}
|
||||
|
||||
export function getPDFUrl(fileMedia: FileMedia) {
|
||||
if (fileMedia.mime !== "application/pdf") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return fileMedia.url;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { FileMedia } from "./FileMedia";
|
||||
import type { ImageMedia } from "./ImageMedia";
|
||||
import type { Markdown } from "./Markdown";
|
||||
|
||||
@@ -26,6 +27,7 @@ export interface Banner {
|
||||
export interface Hasiera {
|
||||
id: number;
|
||||
izenburua: string;
|
||||
hilekoEgitaraua: FileMedia;
|
||||
banner: Banner[];
|
||||
izanLabazkide: {
|
||||
izenburua: string;
|
||||
|
||||
@@ -11,6 +11,10 @@ const response = await fetch(`${import.meta.env.STRAPI_URL}/graphql`, {
|
||||
query {
|
||||
hasiera {
|
||||
izenburua
|
||||
hilekoEgitaraua {
|
||||
mime
|
||||
url
|
||||
}
|
||||
banner {
|
||||
izenburua
|
||||
url
|
||||
|
||||
@@ -7,15 +7,23 @@ export interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
isMainTitle?: boolean;
|
||||
hilekoEgitarauaUrl?: string;
|
||||
}
|
||||
|
||||
const { ekintzak, title, description, isMainTitle = false } = Astro.props;
|
||||
const {
|
||||
ekintzak,
|
||||
title,
|
||||
description,
|
||||
isMainTitle = false,
|
||||
hilekoEgitarauaUrl,
|
||||
} = Astro.props;
|
||||
---
|
||||
|
||||
<EkintzaZerrendaReact
|
||||
ekintzak={ekintzak}
|
||||
title={title}
|
||||
description={description}
|
||||
isMainTitle
|
||||
isMainTitle={isMainTitle}
|
||||
hilekoEgitarauaUrl={hilekoEgitarauaUrl}
|
||||
client:idle
|
||||
/>
|
||||
@@ -1,5 +1,6 @@
|
||||
@use "../../../../style/mixins/displayFonts.scss";
|
||||
@use "../../../../style/tools/mediaQueries.scss";
|
||||
@use "../../../../style/tools/toDVW.scss";
|
||||
@use "sass:color";
|
||||
|
||||
.wrapper {
|
||||
@@ -92,3 +93,35 @@
|
||||
|
||||
@include displayFonts.display2;
|
||||
}
|
||||
|
||||
.hilekoEgitaraua {
|
||||
display: inline-block;
|
||||
padding: var(--space-03-mobile) var(--space-04-mobile);
|
||||
margin-top: var(--space-07-mobile);
|
||||
grid-column: col-start 3 / span 8;
|
||||
|
||||
color: var(--zuria);
|
||||
background-color: var(--gorria);
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
border-radius: var(--space-05-mobile);
|
||||
border: #{toDVW.toMobileDVW(1)} solid var(--gorria);
|
||||
|
||||
transition:
|
||||
background-color 0.3s ease,
|
||||
color 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
color: var(--gorria);
|
||||
background-color: var(--zuria);
|
||||
}
|
||||
|
||||
@include mediaQueries.aboveTablet {
|
||||
padding: var(--space-04-desktop) var(--space-05-desktop);
|
||||
margin-top: var(--space-08-desktop);
|
||||
grid-column: col-start 6 / span 2;
|
||||
|
||||
border-radius: var(--space-06-desktop);
|
||||
border: #{toDVW.toDesktopDVW(1)} solid var(--gorria);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
isMainTitle?: boolean;
|
||||
hilekoEgitarauaUrl?: string;
|
||||
}
|
||||
|
||||
export const EkintzaZerrenda: React.FC<Props> = ({
|
||||
@@ -18,17 +19,18 @@ export const EkintzaZerrenda: React.FC<Props> = ({
|
||||
description,
|
||||
ekintzak,
|
||||
isMainTitle = false,
|
||||
hilekoEgitarauaUrl,
|
||||
}) => {
|
||||
const sortedEkintzak = useMemo(
|
||||
() =>
|
||||
[...ekintzak].sort((a, b) =>
|
||||
dayjs(a.hitzordua).isBefore(b.hitzordua) ? -1 : 1
|
||||
dayjs(a.hitzordua).isBefore(b.hitzordua) ? -1 : 1,
|
||||
),
|
||||
[ekintzak]
|
||||
[ekintzak],
|
||||
);
|
||||
|
||||
const [activeEkintza, setActiveEkintza] = useState<EkintzaSnippet>(
|
||||
sortedEkintzak[0]
|
||||
sortedEkintzak[0],
|
||||
);
|
||||
const [playInterval, setPlayInterval] = useState(true);
|
||||
|
||||
@@ -45,7 +47,7 @@ export const EkintzaZerrenda: React.FC<Props> = ({
|
||||
}
|
||||
|
||||
setActiveEkintza(
|
||||
sortedEkintzak[Math.floor(Math.random() * sortedEkintzak.length)]
|
||||
sortedEkintzak[Math.floor(Math.random() * sortedEkintzak.length)],
|
||||
);
|
||||
}, 1800);
|
||||
|
||||
@@ -59,7 +61,7 @@ export const EkintzaZerrenda: React.FC<Props> = ({
|
||||
gsap.fromTo(
|
||||
imgRef.current,
|
||||
{ autoAlpha: 0, scale: 1.05 },
|
||||
{ autoAlpha: 1, scale: 1, duration: 0.5, ease: "power2.out" }
|
||||
{ autoAlpha: 1, scale: 1, duration: 0.5, ease: "power2.out" },
|
||||
);
|
||||
}
|
||||
}, [activeEkintza]);
|
||||
@@ -109,6 +111,16 @@ export const EkintzaZerrenda: React.FC<Props> = ({
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
{hilekoEgitarauaUrl && (
|
||||
<a
|
||||
className={styles.hilekoEgitaraua}
|
||||
href={hilekoEgitarauaUrl}
|
||||
download
|
||||
>
|
||||
Ikusi hileko egitaraua PDF formatuan
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -20,7 +20,9 @@ interface Props {
|
||||
|
||||
const { ekintza } = Astro.props;
|
||||
|
||||
const irudia = ekintza.mainMedia ? getImageData(ekintza.mainMedia) : null;
|
||||
const irudia = ekintza.mainMedia
|
||||
? getImageData(ekintza.mainMedia, { preferredFormat: "medium" })
|
||||
: null;
|
||||
---
|
||||
|
||||
<Layout
|
||||
@@ -47,7 +49,7 @@ const irudia = ekintza.mainMedia ? getImageData(ekintza.mainMedia) : null;
|
||||
|
||||
{
|
||||
ekintza.elkarlana && (
|
||||
<div class="elkarlana-wrapper-desktop">
|
||||
<div class="elkarlana-wrapper">
|
||||
<Elkarlana elkarlana={ekintza.elkarlana} />
|
||||
</div>
|
||||
)
|
||||
@@ -74,20 +76,18 @@ const irudia = ekintza.mainMedia ? getImageData(ekintza.mainMedia) : null;
|
||||
|
||||
<h2>{ekintza.titularra}</h2>
|
||||
|
||||
{ekintza.sarrera && <Sarrera sarrera={ekintza.sarrera} />}
|
||||
|
||||
{
|
||||
ekintza.deskribapena && (
|
||||
<div class="deskribapena">
|
||||
<MarkdownParser content={ekintza.deskribapena} />
|
||||
ekintza.sarrera && (
|
||||
<div class="sarrera">
|
||||
<Sarrera sarrera={ekintza.sarrera} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
ekintza.elkarlana && (
|
||||
<div class="elkarlana-wrapper-mobile">
|
||||
<Elkarlana elkarlana={ekintza.elkarlana} />
|
||||
ekintza.deskribapena && (
|
||||
<div class="deskribapena">
|
||||
<MarkdownParser content={ekintza.deskribapena} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -122,14 +122,21 @@ const irudia = ekintza.mainMedia ? getImageData(ekintza.mainMedia) : null;
|
||||
grid-column: 1 / span 4;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@include mediaQueries.belowTablet {
|
||||
order: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.irudia {
|
||||
border-radius: 50%;
|
||||
aspect-ratio: 1;
|
||||
border-radius: var(--space-02-mobile);
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: cover;
|
||||
|
||||
@include mediaQueries.aboveTablet {
|
||||
border-radius: var(--space-03-desktop);
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
@@ -200,6 +207,14 @@ const irudia = ekintza.mainMedia ? getImageData(ekintza.mainMedia) : null;
|
||||
}
|
||||
}
|
||||
|
||||
.sarrera {
|
||||
margin-top: var(--space-02-mobile);
|
||||
|
||||
@include mediaQueries.aboveTablet {
|
||||
margin-top: var(--space-03-desktop);
|
||||
}
|
||||
}
|
||||
|
||||
.deskribapena {
|
||||
margin-top: var(--space-04-mobile);
|
||||
|
||||
@@ -210,19 +225,11 @@ const irudia = ekintza.mainMedia ? getImageData(ekintza.mainMedia) : null;
|
||||
}
|
||||
}
|
||||
|
||||
.elkarlana-wrapper-desktop {
|
||||
margin-top: var(--space-07-desktop);
|
||||
|
||||
@include mediaQueries.belowTablet {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.elkarlana-wrapper-mobile {
|
||||
.elkarlana-wrapper {
|
||||
margin-top: var(--space-05-mobile);
|
||||
|
||||
@include mediaQueries.aboveTablet {
|
||||
display: none;
|
||||
margin-top: var(--space-07-desktop);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -16,7 +16,7 @@ const { sarrera } = Astro.props;
|
||||
)
|
||||
}
|
||||
|
||||
<p class="deskribapena">{sarrera.deskribapena}</p>
|
||||
{sarrera.deskribapena && <p class="deskribapena">{sarrera.deskribapena}</p>}
|
||||
|
||||
<style lang="scss">
|
||||
@use "../../../style/mixins/displayFonts.scss";
|
||||
|
||||
@@ -13,6 +13,7 @@ import Footer from "../_components/Footer.astro";
|
||||
import EkintzaZerrenda from "../_components/EkintzaZerrenda.astro";
|
||||
import IrudiEstela from "views/_components/IrudiEstela.astro";
|
||||
import Banner from "./components/Banner.astro";
|
||||
import { getPDFUrl } from "models/FileMedia";
|
||||
|
||||
interface Props {
|
||||
hasiera: Hasiera;
|
||||
@@ -26,6 +27,8 @@ const { izenburua, izanLabazkide, parteHartu, mosaikoa, banner }: Hasiera = hasi
|
||||
const hurrengoEkintzak = ekintzak.filter((ekintza) =>
|
||||
dayjs().isBefore(ekintza.hitzordua)
|
||||
);
|
||||
|
||||
const hilekoEgitarauaUrl = hasiera.hilekoEgitaraua ? getPDFUrl(hasiera.hilekoEgitaraua) : undefined
|
||||
---
|
||||
|
||||
<Layout
|
||||
@@ -54,7 +57,7 @@ const hurrengoEkintzak = ekintzak.filter((ekintza) =>
|
||||
<ZigZag from="marroia" />
|
||||
|
||||
<section class="agenda" id="agenda">
|
||||
<EkintzaZerrenda ekintzak={hurrengoEkintzak} title="Agenda" />
|
||||
<EkintzaZerrenda ekintzak={hurrengoEkintzak} title="Agenda" hilekoEgitarauaUrl={hilekoEgitarauaUrl} />
|
||||
</section>
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ const mobileBanner = getImageData(banner.mugikorIrudia, {
|
||||
|
||||
<div>
|
||||
<a href={banner.url}>
|
||||
<picture>
|
||||
<span class="visually-hidden">{banner.izenburua}</span>
|
||||
<picture aria-hidden={true}>
|
||||
<source
|
||||
media="(min-width:1024px)"
|
||||
srcset={desktopBanner.src}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
"front:build": "pnpm --filter front build",
|
||||
"front:preview": "pnpm --filter front preview",
|
||||
"front:serve": "pnpm --filter front serve",
|
||||
"e2e:open": "pnpm --filter e2e open"
|
||||
"front:upgrade": "pnpm --filter front upgrade"
|
||||
},
|
||||
"dependencies": {
|
||||
"prettier": "^3.6.2"
|
||||
|
||||
Generated
+1458
-1200
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user