Internet plus Telewizja, dodanie modal, poprawki w Markdown
This commit is contained in:
@@ -3,6 +3,7 @@ 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";
|
||||
import Modal from "../../islands/Modal.jsx";
|
||||
import OffersIsland from "../../islands/OffersIsland.jsx";
|
||||
|
||||
import yaml from "js-yaml";
|
||||
@@ -17,6 +18,9 @@ const hero = yaml.load(
|
||||
const page = yaml.load(
|
||||
fs.readFileSync("./src/content/internet-telewizja/page.yaml", "utf8"),
|
||||
);
|
||||
const modalData = yaml.load(
|
||||
fs.readFileSync("./src/content/internet-telewizja/modal.yaml", "utf8")
|
||||
);
|
||||
|
||||
type Paragraph = {
|
||||
title?: string;
|
||||
@@ -42,23 +46,19 @@ const rest = page.paragraphs.slice(1);
|
||||
</section>
|
||||
|
||||
<OffersIsland client:load data={data} />
|
||||
|
||||
{rest.map((p: Paragraph) => (
|
||||
<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>}
|
||||
<Markdown text={p.content.replace(/\n/g, "\n\n")} />
|
||||
</div>
|
||||
</section>
|
||||
))}
|
||||
{
|
||||
rest.map((p: Paragraph) => (
|
||||
<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>}
|
||||
<Markdown text={p.content.replace(/\n/g, "\n\n")} />
|
||||
</div>
|
||||
</section>
|
||||
))
|
||||
}
|
||||
|
||||
<SectionRenderer src="./src/content/internet-telewizja/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> -->
|
||||
|
||||
<Modal client:load modalData={modalData} />
|
||||
|
||||
</DefaultLayout>
|
||||
|
||||
Reference in New Issue
Block a user