99 lines
5.4 KiB
JavaScript
99 lines
5.4 KiB
JavaScript
import { ref, computed, mergeProps, unref, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderComponent, ssrRenderAttr } from 'vue/server-renderer';
|
|
import { FileText, Download, ExternalLink } from 'lucide-vue-next';
|
|
import { u as useHead } from './composables-CK-Mp9jS.mjs';
|
|
import './server.mjs';
|
|
import '../nitro/nitro.mjs';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'node:url';
|
|
import '../routes/renderer.mjs';
|
|
import 'vue-bundle-renderer/runtime';
|
|
import 'unhead/server';
|
|
import 'devalue';
|
|
import 'unhead/utils';
|
|
import 'pinia';
|
|
import 'vue-router';
|
|
|
|
const _sfc_main = {
|
|
__name: "spielplaene",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const spielplaene = ref([]);
|
|
const mannschaftenMitLinks = ref([]);
|
|
const aktuellesSaison = computed(() => {
|
|
const jetzt = /* @__PURE__ */ new Date();
|
|
const monat = jetzt.getMonth() + 1;
|
|
const jahr = jetzt.getFullYear();
|
|
if (monat >= 7) {
|
|
return { start: jahr, ende: jahr + 1 };
|
|
} else {
|
|
return { start: jahr - 1, ende: jahr };
|
|
}
|
|
});
|
|
const aktuellesSaisonLabel = computed(() => {
|
|
return `${aktuellesSaison.value.start}/${aktuellesSaison.value.ende}`;
|
|
});
|
|
useHead({
|
|
title: "Spielpläne - Harheimer TC"
|
|
});
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-full py-16 bg-gray-50" }, _attrs))}><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"><div class="text-center mb-12"><h1 class="text-4xl sm:text-5xl font-display font-bold text-gray-900 mb-4"> Spielpläne </h1><div class="w-24 h-1 bg-primary-600 mx-auto mb-6"></div><p class="text-xl text-gray-600 max-w-3xl mx-auto"> Aktuelle Spielpläne der Saison ${ssrInterpolate(aktuellesSaisonLabel.value)}</p></div>`);
|
|
if (spielplaene.value.length > 0) {
|
|
_push(`<div class="space-y-4 max-w-4xl mx-auto"><!--[-->`);
|
|
ssrRenderList(spielplaene.value, (plan, index) => {
|
|
_push(`<div class="bg-white rounded-xl shadow-lg border border-gray-100 p-6 hover:shadow-xl transition-shadow"><div class="flex items-center justify-between"><div class="flex items-center space-x-4"><div class="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center">`);
|
|
_push(ssrRenderComponent(unref(FileText), {
|
|
size: 24,
|
|
class: "text-primary-600"
|
|
}, null, _parent));
|
|
_push(`</div><div><h3 class="text-lg font-semibold text-gray-900">${ssrInterpolate(plan.titel)}</h3><p class="text-sm text-gray-500">Saison ${ssrInterpolate(plan.saison)}</p></div></div><a${ssrRenderAttr("href", plan.url)} download class="inline-flex items-center px-4 py-2 bg-primary-600 hover:bg-primary-700 text-white font-medium rounded-lg transition-colors">`);
|
|
_push(ssrRenderComponent(unref(Download), {
|
|
size: 18,
|
|
class: "mr-2"
|
|
}, null, _parent));
|
|
_push(` Download </a></div></div>`);
|
|
});
|
|
_push(`<!--]--></div>`);
|
|
} else {
|
|
_push(`<div class="text-center py-16 bg-white rounded-xl shadow-lg max-w-4xl mx-auto">`);
|
|
_push(ssrRenderComponent(unref(FileText), {
|
|
size: 48,
|
|
class: "text-gray-400 mx-auto mb-4"
|
|
}, null, _parent));
|
|
_push(`<h3 class="text-xl font-semibold text-gray-900 mb-2">Keine Spielpläne verfügbar</h3><p class="text-gray-600"> Für die aktuelle Saison ${ssrInterpolate(aktuellesSaisonLabel.value)} sind noch keine Spielpläne verfügbar. </p></div>`);
|
|
}
|
|
_push(`<div class="mt-12 max-w-4xl mx-auto"><h2 class="text-2xl font-display font-bold text-gray-900 mb-6 text-center"> Online Spielpläne & Tabellen </h2>`);
|
|
if (mannschaftenMitLinks.value.length > 0) {
|
|
_push(`<div class="space-y-3"><!--[-->`);
|
|
ssrRenderList(mannschaftenMitLinks.value, (mannschaft, index) => {
|
|
_push(`<div class="bg-white rounded-lg shadow border border-gray-100 p-4 hover:shadow-md transition-shadow"><div class="flex items-center justify-between"><div><h3 class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.mannschaft)}</h3><p class="text-sm text-gray-500">${ssrInterpolate(mannschaft.liga)}</p></div><a${ssrRenderAttr("href", mannschaft.weitere_informationen_link)} target="_blank" class="inline-flex items-center px-4 py-2 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors text-sm">`);
|
|
_push(ssrRenderComponent(unref(ExternalLink), {
|
|
size: 16,
|
|
class: "mr-2"
|
|
}, null, _parent));
|
|
_push(` Online ansehen </a></div></div>`);
|
|
});
|
|
_push(`<!--]--></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div><div class="mt-12 max-w-4xl mx-auto bg-primary-50 border border-primary-100 rounded-xl p-6"><h3 class="text-lg font-semibold text-primary-900 mb-2"> Hinweis </h3><p class="text-primary-800"> Die Spielpläne werden automatisch für die aktuelle Saison angezeigt. Ältere Spielpläne können auf Anfrage bereitgestellt werden. </p></div></div></div>`);
|
|
};
|
|
}
|
|
};
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/mannschaften/spielplaene.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as default };
|
|
//# sourceMappingURL=spielplaene-DVdlC_Hk.mjs.map
|