2022-12-26 23:15:27 +01:00
|
|
|
---
|
2023-07-20 15:35:04 +02:00
|
|
|
// import { renderContent } from "astro-i18n";
|
2022-12-28 10:36:15 +01:00
|
|
|
import MetaDate from "./MetaDate.astro";
|
2022-12-26 23:15:27 +01:00
|
|
|
import TOC from "./TOC.astro";
|
|
|
|
|
|
|
|
const { content } = Astro.props;
|
2023-07-20 15:35:04 +02:00
|
|
|
const { Content, headings } = await content.render();
|
|
|
|
// const { html, headings } = await renderContent(Astro, content);
|
2022-12-26 23:15:27 +01:00
|
|
|
|
|
|
|
const toc = headings.map((heading) => {
|
|
|
|
return heading;
|
|
|
|
});
|
2022-12-28 10:36:15 +01:00
|
|
|
|
2023-07-20 15:35:04 +02:00
|
|
|
import "../styles/vendor/one-dark-pro.css";
|
2022-12-26 23:15:27 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
<div class="sidebar region">
|
|
|
|
<TOC toc={toc} />
|
|
|
|
<article class="flow editorial">
|
|
|
|
<h1>{content.data.title}</h1>
|
2022-12-28 10:36:15 +01:00
|
|
|
<p class="h3">{content.data.subtitle}</p>
|
|
|
|
<MetaDate item={content.data} />
|
2023-07-20 15:35:04 +02:00
|
|
|
<!-- <div class="flow content" set:html={html}> -->
|
|
|
|
<Content />
|
2022-12-26 23:15:27 +01:00
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
|
2023-07-20 15:35:04 +02:00
|
|
|
<style define:vars={{ permalink: content.data.permalink }}>
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
|
|
article {
|
|
|
|
view-transition-name: var(--permalink);
|
|
|
|
}
|
|
|
|
}
|
2022-12-28 10:36:15 +01:00
|
|
|
.sidebar {
|
|
|
|
--gutter: var(--space-xs-m);
|
|
|
|
}
|
|
|
|
.sidebar > :global(:first-child) {
|
|
|
|
--sidebar-target-width: 16rem;
|
|
|
|
}
|
|
|
|
.sidebar > :global(:last-child) {
|
|
|
|
--sidebar-content-min-width: 60%;
|
|
|
|
}
|
2022-12-26 23:15:27 +01:00
|
|
|
h1 {
|
|
|
|
font-size: var(--size-4);
|
|
|
|
}
|
|
|
|
.editorial :global(h2),
|
|
|
|
.editorial :global(.h2) {
|
|
|
|
font-size: var(--size-3);
|
|
|
|
color: var(--color-blue);
|
|
|
|
}
|
2022-12-28 10:36:15 +01:00
|
|
|
|
|
|
|
.editorial :global(img),
|
|
|
|
.editorial :global(picture) {
|
|
|
|
margin: var(--space-s-m) 0;
|
|
|
|
}
|
2023-02-03 18:39:31 +01:00
|
|
|
.content :global(p + p) {
|
|
|
|
margin-block-start: var(--space-s);
|
|
|
|
}
|
2022-12-26 23:15:27 +01:00
|
|
|
</style>
|