Skip to content

Commit

Permalink
chore: add description to docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
justinrubek committed Apr 11, 2023
1 parent d5a6de1 commit fc3ce62
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
47 changes: 47 additions & 0 deletions astro/src/layouts/page.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
import { SITE } from '$/config'
import MainLayout from '$/components/MainLayout.astro'
import BaseHead from '$/components/BaseHead.astro'
import Prose from '$/components/Prose.astro'
import '../styles/code.css'
const { content } = Astro.props
---
<!doctype html>
<html lang="en">
<head>
<BaseHead title={ content.title ? `${ SITE.title } | ${content.title}` : SITE.title } description={ content.description }/>
</head>
<MainLayout>
<div class="page__header">
<div class="page__tags">
{ content.tags.length > 0 && content.tags.map(tag => <a class="page__tag" href={`/tags/${tag}`} title={tag}>{tag}</a>) }
</div>
<h1 class="page__title">{ content.title }</h1>
</div>
<!--<img src={content.image} alt={content.title} />-->
<Prose>
<slot />
</Prose>
</MainLayout>
</html>
<style>
.page__header {
@apply py-4 mb-1
}
.page__title {
@apply text-5xl font-extrabold text-theme-primary dark:text-theme-dark-primary
}
.page__author {
@apply no-underline dark:text-white hover:text-theme-primary
}
.page__date {
@apply text-gray-400
}
.page__tags {
@apply inline-flex gap-2
}
.page__tag {
@apply text-gray-400 hover:text-theme-primary dark:hover:text-theme-dark-primary
}
</style>
7 changes: 7 additions & 0 deletions astro/src/pages/docs/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import DefaultPageLayout from '$/layouts/default.astro'
import PreviewList from '$/components/PreviewList.astro'
import PagePreview from '$/components/PagePreview.astro'
import Paginator from '$/components/Paginator.astro'
import Prose from '$/components/Prose.astro'
import { PAGE_SIZE } from '$/config'
let title = 'resources'
Expand All @@ -23,6 +24,12 @@ const { page } = Astro.props
console.log(page)
---
<DefaultPageLayout content={{ title, description }}>
<Prose>
This contains miscellaneous information I've found useful but don't have a place for
</Prose>

<br />

<PreviewList items={page.data} />
<Paginator page={page} />
</DefaultPageLayout>
3 changes: 1 addition & 2 deletions astro/src/pages/docs/git-info.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: $/layouts/post.astro
layout: $/layouts/page.astro
title: git tips
date: 2023-04-10
category: info
tags:
- git
Expand Down

0 comments on commit fc3ce62

Please sign in to comment.