121 lines
6.8 KiB
JavaScript
121 lines
6.8 KiB
JavaScript
import { a as useRoute, _ as __nuxt_component_0$1 } from './server.mjs';
|
|
import { ref, mergeProps, unref, withCtx, createTextVNode, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrRenderComponent } from 'vue/server-renderer';
|
|
import { BarChart } from 'lucide-vue-next';
|
|
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: "[slug]",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
useRoute();
|
|
const mannschaft = ref(null);
|
|
const getSpielerListe = (mannschaft2) => {
|
|
if (!mannschaft2.spieler) return [];
|
|
return mannschaft2.spieler.split(";").map((s) => s.trim()).filter((s) => s !== "");
|
|
};
|
|
const formatDate = (dateString) => {
|
|
if (!dateString) return "";
|
|
if (/^\d{2}\.\d{2}\.\d{4}$/.test(dateString)) {
|
|
return dateString;
|
|
}
|
|
const date = new Date(dateString);
|
|
if (isNaN(date.getTime())) {
|
|
return dateString;
|
|
}
|
|
return date.toLocaleDateString("de-DE", {
|
|
day: "2-digit",
|
|
month: "2-digit",
|
|
year: "numeric"
|
|
});
|
|
};
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_NuxtLink = __nuxt_component_0$1;
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-full py-16 bg-gray-50" }, _attrs))}><div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">`);
|
|
if (mannschaft.value) {
|
|
_push(`<div class="space-y-8"><div class="bg-gradient-to-r from-primary-600 to-primary-700 rounded-xl p-8 text-white"><h1 class="text-4xl font-display font-bold mb-2">${ssrInterpolate(mannschaft.value.mannschaft)}</h1><p class="text-primary-100 text-xl">${ssrInterpolate(mannschaft.value.liga)}</p></div><div class="bg-white rounded-xl shadow-lg p-6"><h2 class="text-2xl font-semibold text-gray-900 mb-6">Liga-Informationen</h2><div class="grid md:grid-cols-2 gap-6"><div class="space-y-4"><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Staffelleiter:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.value.staffelleiter)}</span></div><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Telefon:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.value.telefon)}</span></div></div><div class="space-y-4"><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Heimspieltag:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.value.heimspieltag)}</span></div><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Spielsystem:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.value.spielsystem)}</span></div></div></div></div><div class="bg-white rounded-xl shadow-lg p-6"><h2 class="text-2xl font-semibold text-gray-900 mb-6"> Mannschaftsaufstellung Saison 2025/26 (Hinrunde) </h2><div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-4"><!--[-->`);
|
|
ssrRenderList(getSpielerListe(mannschaft.value), (spieler, index) => {
|
|
_push(`<div class="${ssrRenderClass([spieler === mannschaft.value.mannschaftsfuehrer ? "ring-2 ring-primary-500 bg-primary-50" : "", "bg-gray-50 rounded-lg p-4 text-center"])}"><div class="font-semibold text-gray-900">${ssrInterpolate(spieler)}</div>`);
|
|
if (spieler === mannschaft.value.mannschaftsfuehrer) {
|
|
_push(`<div class="text-xs text-primary-600 font-medium mt-1"> Mannschaftsführer </div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div>`);
|
|
});
|
|
_push(`<!--]--></div></div><div class="bg-white rounded-xl shadow-lg p-6"><h2 class="text-2xl font-semibold text-gray-900 mb-6">Weitere Informationen</h2><div class="text-center">`);
|
|
if (mannschaft.value.weitere_informationen_link && mannschaft.value.weitere_informationen_link !== "") {
|
|
_push(`<a${ssrRenderAttr("href", mannschaft.value.weitere_informationen_link)} target="_blank" class="inline-flex items-center px-8 py-4 bg-primary-600 hover:bg-primary-700 text-white font-semibold rounded-lg transition-colors">`);
|
|
_push(ssrRenderComponent(unref(BarChart), {
|
|
size: 24,
|
|
class: "mr-3"
|
|
}, null, _parent));
|
|
_push(` Weitere Informationen </a>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div></div><div class="bg-white rounded-xl shadow-lg p-6"><p class="text-sm text-gray-500 text-center"> Zuletzt aktualisiert am: ${ssrInterpolate(formatDate(mannschaft.value.letzte_aktualisierung))}</p></div><div class="text-center">`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
to: "/mannschaften",
|
|
class: "inline-flex items-center px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white font-semibold rounded-lg transition-colors"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(` ← Zurück zur Übersicht `);
|
|
} else {
|
|
return [
|
|
createTextVNode(" ← Zurück zur Übersicht ")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div></div>`);
|
|
} else {
|
|
_push(`<div class="text-center py-16"><h1 class="text-4xl font-display font-bold text-gray-900 mb-4">Mannschaft nicht gefunden</h1><p class="text-gray-600 mb-8">Die angeforderte Mannschaft konnte nicht gefunden werden.</p>`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
to: "/mannschaften",
|
|
class: "inline-flex items-center px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white font-semibold rounded-lg transition-colors"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(` Zur Mannschaftsübersicht `);
|
|
} else {
|
|
return [
|
|
createTextVNode(" Zur Mannschaftsübersicht ")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div>`);
|
|
}
|
|
_push(`</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/[slug].vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as default };
|
|
//# sourceMappingURL=_slug_-CcxmD4wa.mjs.map
|