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 {
|
export interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
description: 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}>
|
<Layout title={"Blog | " + title} description={description}>
|
||||||
<slot name="metadata" slot="metadata" />
|
<slot name="metadata" slot="metadata" />
|
||||||
<NavMenu>
|
<NavMenu>
|
||||||
{
|
{
|
||||||
!article ?
|
mainpage ?
|
||||||
<MenuItem name="Home" icon="" link="/" />
|
<MenuItem name="Home" icon="" link="/" /> :
|
||||||
<MenuItem name="Articles" icon="" link="/blog" /> :
|
|
||||||
<MenuItem name="Articles" icon="" link="/blog" />
|
<MenuItem name="Articles" icon="" link="/blog" />
|
||||||
}
|
}
|
||||||
<MenuItem name="Shorts" icon="" link="/blog/shorts" />
|
<MenuItem name="Shorts" icon="" link="/blog/shorts" />
|
||||||
|
|
|
@ -52,7 +52,6 @@ const { title, description } = Astro.props;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: @main-padding;
|
padding: @main-padding;
|
||||||
max-width: @max-width;
|
max-width: @max-width;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
article {
|
article {
|
||||||
|
|
|
@ -22,7 +22,7 @@ const {
|
||||||
} = await postRenderer(post);
|
} = await postRenderer(post);
|
||||||
---
|
---
|
||||||
|
|
||||||
<BlogLayout title={title} description={description} article={true}>
|
<BlogLayout title={title} description={description}>
|
||||||
<Fragment slot="metadata">
|
<Fragment slot="metadata">
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:title" content={title} />
|
<meta property="og:title" content={title} />
|
||||||
|
@ -48,6 +48,10 @@ const {
|
||||||
<style lang="less" is:global>
|
<style lang="less" is:global>
|
||||||
@import "/src/styles/max_width.less";
|
@import "/src/styles/max_width.less";
|
||||||
|
|
||||||
|
main {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
article {
|
article {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ const description =
|
||||||
"The simpliest things!";
|
"The simpliest things!";
|
||||||
---
|
---
|
||||||
|
|
||||||
<BlogLayout title="Homepage" description={description}>
|
<BlogLayout title="Homepage" description={description} mainpage>
|
||||||
<Fragment slot="metadata">
|
<Fragment slot="metadata">
|
||||||
<meta name="robots" content="noindex, follow" />
|
<meta name="robots" content="noindex, follow" />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
Loading…
Add table
Reference in a new issue