Changed blog nav menu; <main>
width:100% only in articles
This commit is contained in:
parent
ffd45a4cc6
commit
d148f1e0f3
4 changed files with 10 additions and 8 deletions
|
@ -6,19 +6,18 @@ import MenuItem from "../components/MenuItem.astro";
|
|||
export interface Props {
|
||||
title: string;
|
||||
description: string;
|
||||
article?: boolean;
|
||||
mainpage?: boolean;
|
||||
}
|
||||
|
||||
const { title, description, article = false } = Astro.props;
|
||||
const { title, description, mainpage = false } = Astro.props;
|
||||
---
|
||||
|
||||
<Layout title={"Blog | " + title} description={description}>
|
||||
<slot name="metadata" slot="metadata" />
|
||||
<NavMenu>
|
||||
{
|
||||
!article ?
|
||||
<MenuItem name="Home" icon="" link="/" />
|
||||
<MenuItem name="Articles" icon="" link="/blog" /> :
|
||||
mainpage ?
|
||||
<MenuItem name="Home" icon="" link="/" /> :
|
||||
<MenuItem name="Articles" icon="" link="/blog" />
|
||||
}
|
||||
<MenuItem name="Shorts" icon="" link="/blog/shorts" />
|
||||
|
|
|
@ -52,7 +52,6 @@ const { title, description } = Astro.props;
|
|||
margin: auto;
|
||||
padding: @main-padding;
|
||||
max-width: @max-width;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
article {
|
||||
|
|
|
@ -22,7 +22,7 @@ const {
|
|||
} = await postRenderer(post);
|
||||
---
|
||||
|
||||
<BlogLayout title={title} description={description} article={true}>
|
||||
<BlogLayout title={title} description={description}>
|
||||
<Fragment slot="metadata">
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content={title} />
|
||||
|
@ -48,6 +48,10 @@ const {
|
|||
<style lang="less" is:global>
|
||||
@import "/src/styles/max_width.less";
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
article {
|
||||
margin: 0;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ const description =
|
|||
"The simpliest things!";
|
||||
---
|
||||
|
||||
<BlogLayout title="Homepage" description={description}>
|
||||
<BlogLayout title="Homepage" description={description} mainpage>
|
||||
<Fragment slot="metadata">
|
||||
<meta name="robots" content="noindex, follow" />
|
||||
</Fragment>
|
||||
|
|
Loading…
Add table
Reference in a new issue