summaryrefslogtreecommitdiff
path: root/docs/src/components/PageContent
diff options
context:
space:
mode:
authorGravatar Jonathan Neal <jonathantneal@hotmail.com> 2022-02-07 13:39:53 -0500
committerGravatar GitHub <noreply@github.com> 2022-02-07 13:39:53 -0500
commita911d14eabe4f4f9080b59b1c292818ea2ca6123 (patch)
tree529fdda395eedc122955fd2851954d61554869b4 /docs/src/components/PageContent
parent2bc91543ceeb5f3dd45e201bf75d79f186e85141 (diff)
downloadastro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.tar.gz
astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.tar.zst
astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.zip
Remove docs from monorepo (#2517)
* Remove docs from monorepo * Update PULL_REQUEST_TEMPLATE.md * Update relative doc references with links or todo
Diffstat (limited to 'docs/src/components/PageContent')
-rw-r--r--docs/src/components/PageContent/PageContent.astro78
1 files changed, 0 insertions, 78 deletions
diff --git a/docs/src/components/PageContent/PageContent.astro b/docs/src/components/PageContent/PageContent.astro
deleted file mode 100644
index da9939e50..000000000
--- a/docs/src/components/PageContent/PageContent.astro
+++ /dev/null
@@ -1,78 +0,0 @@
----
-import MoreMenu from '../RightSidebar/MoreMenu.astro';
-import TableOfContents from '../RightSidebar/TableOfContents.tsx';
-import { getLanguageFromURL } from '../../util.ts';
-import { SIDEBAR } from '../../config.ts';
-const { content, githubEditUrl, currentPage } = Astro.props;
-const title = content.title;
-const headers = content.astro?.headers;
-const langCode = getLanguageFromURL(currentPage);
-const links = SIDEBAR[langCode].filter(
- (x) => x.link && typeof x.header === 'undefined'
-);
-// handle cases with a trailing slash or not
-const index = links.findIndex(
- (x) => `/${x.link}/` === currentPage || `/${x.link}` === currentPage
-);
-const next =
- index !== -1 ? (index === links.length - 1 ? null : links[index + 1]) : null;
-const previous = index !== -1 ? (index === 0 ? null : links[index - 1]) : null;
----
-
-<article id="article" class="content">
- <section class="main-section">
- <h1 class="content-title" id="overview">{title}</h1>
- {headers && (
- <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>
- {(previous || next) && (
- <aside>
- {previous && (
- <div>
- Previous Article:{' '}
- <a rel="prev" href={new URL(previous.link, Astro.site).pathname}>
- {previous.text}
- </a>
- </div>
- )}
- {next && (
- <div>
- Next Article:{' '}
- <a rel="next" href={new URL(next.link, Astro.site).pathname}>
- {next.text}
- </a>
- </div>
- )}
- </aside>
- )}
-</article>
-
-<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>