diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 3e90cbd..74984f3 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -49,6 +49,7 @@ export default defineConfig({ components: { MarkdownContent: './src/components/Content.astro', TableOfContents: './src/components/TableOfContents.astro', + PageTitle: './src/components/PageTitle.astro', }, }), ], diff --git a/docs/src/components/ChallengeFooter.astro b/docs/src/components/ChallengeFooter.astro new file mode 100644 index 0000000..cd20bef --- /dev/null +++ b/docs/src/components/ChallengeFooter.astro @@ -0,0 +1,59 @@ +--- +import VideoButton from './VideoButton.astro' + +const {author, challengeNumber, title, blogLink, videoLink, command} = Astro.props.entry.data; + +const authorLink = `https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A${challengeNumber}+label%3A"answer+author"`; +const authorDescription = `${title} solution author`; +const communityLink = `https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A${challengeNumber}+label%3Aanswer`; +const communityDescription = `${title} community solutions`; + +--- + +
+ +{command && + +} + + + + + + \ No newline at end of file diff --git a/docs/src/components/CommentSection.astro b/docs/src/components/CommentSection.astro new file mode 100644 index 0000000..a306de6 --- /dev/null +++ b/docs/src/components/CommentSection.astro @@ -0,0 +1,29 @@ +--- + +--- + + + + + + \ No newline at end of file diff --git a/docs/src/components/Content.astro b/docs/src/components/Content.astro index fdfd614..0203249 100644 --- a/docs/src/components/Content.astro +++ b/docs/src/components/Content.astro @@ -1,41 +1,26 @@ --- +import ChallengeFooter from './ChallengeFooter.astro' +import CommentSection from './CommentSection.astro' import type { Props } from '@astrojs/starlight/props'; import Default from '@astrojs/starlight/components/MarkdownContent.astro'; -const slug = Astro.props.slug; +const {challengeNumber, author} = Astro.props.entry.data; const renderCommentSection = !Astro.props.entry.data.noCommentSection; + --- +{ challengeNumber && author && }