diff options
author | 2021-08-26 15:04:19 -0700 | |
---|---|---|
committer | 2021-08-26 15:04:44 -0700 | |
commit | fdd701dd88529ee0d4911283e35be86b000ed1fc (patch) | |
tree | 61d450d04633eece1c12b350b9ef3512dc2fa7b7 /examples/docs/src/components/PageContent | |
parent | 84c18d3030c98b2770144a8a27d1cca7bbfedc1d (diff) | |
parent | 2e8db7ad2384b756894eac6be72bcf720f7f28fa (diff) | |
download | astro-fdd701dd88529ee0d4911283e35be86b000ed1fc.tar.gz astro-fdd701dd88529ee0d4911283e35be86b000ed1fc.tar.zst astro-fdd701dd88529ee0d4911283e35be86b000ed1fc.zip |
Merge branch 'okikio/main' (#1111)
Diffstat (limited to 'examples/docs/src/components/PageContent')
-rw-r--r-- | examples/docs/src/components/PageContent/PageContent.astro | 41 |
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 |