summaryrefslogtreecommitdiff
path: root/examples/docs/src/components/PageContent/PageContent.astro
diff options
context:
space:
mode:
authorGravatar Okiki <okikio.dev@gmail.com> 2021-08-14 00:58:00 +0000
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-08-26 12:15:33 -0700
commitb7ada11ddbabe4dd2f0798e140e5b280de4d6952 (patch)
treec01ff3eee4f770fc108c19d126dce31d9cbe5e51 /examples/docs/src/components/PageContent/PageContent.astro
parent59cc62f7bd53dbcb6ad8051fa501b7b797614178 (diff)
downloadastro-b7ada11ddbabe4dd2f0798e140e5b280de4d6952.tar.gz
astro-b7ada11ddbabe4dd2f0798e140e5b280de4d6952.tar.zst
astro-b7ada11ddbabe4dd2f0798e140e5b280de4d6952.zip
WIP update examples/docs/
Diffstat (limited to 'examples/docs/src/components/PageContent/PageContent.astro')
-rw-r--r--examples/docs/src/components/PageContent/PageContent.astro41
1 files changed, 41 insertions, 0 deletions
diff --git a/examples/docs/src/components/PageContent/PageContent.astro b/examples/docs/src/components/PageContent/PageContent.astro
new file mode 100644
index 000000000..fd1e9d242
--- /dev/null
+++ b/examples/docs/src/components/PageContent/PageContent.astro
@@ -0,0 +1,41 @@
+---
+const {content, githubEditUrl} = Astro.props;
+const title = content.title;
+const headers = content.astro.headers;
+import MoreMenu from '../RightSidebar/MoreMenu.astro';
+import TableOfContents from '../RightSidebar/TableOfContents.tsx';
+---
+<style>
+ .content {
+ padding: 0;
+ max-width: 75ch;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ }
+ .content > section {
+ margin-bottom: 4rem;
+ }
+ .block {
+ display: block;
+ }
+
+ @media (min-width: 50em) {
+ .sm\:hidden {
+ display: none;
+ }
+ }
+</style>
+<article id="article" class="content">
+ <section class="main-section">
+ <h1 class="content-title" id="overview">{title}</h1>
+ <nav class="block sm:hidden">
+ <TableOfContents client:media="(max-width: 50em)" headers={headers}/>
+ </nav>
+ <slot />
+ </section>
+ <nav class="block sm:hidden">
+ <MoreMenu editHref={githubEditUrl}/>
+ </nav>
+</article> \ No newline at end of file