Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(2.6): Add common layout components
- Loading branch information
Showing
3 changed files
with
43 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
import BaseHead from '../components/BaseHead.astro'; | ||
import MainLayout from '../components/MainLayout.astro'; | ||
const { content, showPageHeader = true } = Astro.props | ||
--- | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<BaseHead title={content.title ? `Astro - Ink | ${content.title}` : ''} description={content.description}/> | ||
</head> | ||
<MainLayout> | ||
{showPageHeader && | ||
<div class="page__header"> | ||
<h1 class="page__title">{content.title}</h1> | ||
<h5 class="page__desc">{content.description}</h5> | ||
</div> | ||
} | ||
<slot /> | ||
</MainLayout> | ||
</html> | ||
<style> | ||
.page__header { | ||
@apply py-4 mb-1 | ||
} | ||
.page__title { | ||
@apply text-5xl font-extrabold text-primary dark:text-primaryDark | ||
} | ||
.page__desc { | ||
@apply text-gray-400 | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
--- | ||
import BaseHead from '$/components/BaseHead.astro' | ||
import MainLayout from '$/components/MainLayout.astro' | ||
import DefaultPageLayout from '$/layouts/default.astro' | ||
import Intro from '$/components/Intro.astro' | ||
const title = 'Home' | ||
const description = 'Astro-Ink is a crisp, minimal, personal blog theme for Astro' | ||
--- | ||
<html> | ||
<head> | ||
<BaseHead title="Astro Ink | Home" /> | ||
</head> | ||
<MainLayout> | ||
<DefaultPageLayout content={{ title, description }} showPageHeader={false}> | ||
<Intro/> | ||
</MainLayout> | ||
</html> | ||
</DefaultPageLayout> |
39c2d60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: