Internet Światłowodowy, drobne poprawki SectionDefault

This commit is contained in:
dm
2025-11-21 19:02:03 +01:00
parent f9b8d58e8d
commit 8c0e59b173
11 changed files with 162 additions and 17 deletions

View File

@@ -1,20 +1,61 @@
---
import DefaultLayout from "../../layouts/DefaultLayout.astro";
import Hero from "../../components/hero/Hero.astro";
import SectionRenderer from "../../components/sections/SectionRenderer.astro";
import Markdown from "../../islands/Markdown.jsx";
const seo = {
title: "Internet FUZ",
description: "Internet FUZ",
canonical: "/internet"
};
import yaml from "js-yaml";
import fs from "fs";
const seo = yaml.load(
fs.readFileSync("./src/content/internet-swiatlowodowy/seo.yaml", "utf8"),
);
const hero = yaml.load(
fs.readFileSync("./src/content/internet-swiatlowodowy/hero.yaml", "utf8"),
);
const page = yaml.load(
fs.readFileSync("./src/content/internet-swiatlowodowy/page.yaml", "utf8"),
);
const first = page.paragraphs[0];
---
<DefaultLayout seo={seo}>
<section class="fuz-section">
<Hero {...hero} />
<section class="fuz-section text-center">
<div class="fuz-section-grid md:grid-cols-1">
{page.title.map((line: any) => <h1 class="fuz-section-title">{line}</h1>)}
{first.title && <h3>{first.title}</h3>}
<Markdown text={first.content} />
</div>
</section>
{
page.paragraphs.slice(1).map((p: { title: string; content: string }) => (
<section class="fuz-section text-center">
<div class="fuz-section-grid md:grid-cols-1">
{p.title && <h3 class="fuz-section-title">{p.title}</h3>}
{p.content
.trim()
.split(/\n\n+/)
.map((par: string) => (
<Markdown text={par} />
))}
</div>
</section>
))
}
<SectionRenderer src="./src/content/internet-swiatlowodowy/section.yaml" />
<!-- <section class="fuz-section">
<div class="fuz-container">
<h1 class="fuz-hero-title">Internet FUZ</h1>
<p class="mt-4 text-gray-600 dark:text-gray-300">
Ta podstrona jest na razie szkieletem. Możemy tu później wczytać treść z YAML.
</p>
</div>
</section>
</section> -->
</DefaultLayout>