Move to Astro
This commit is contained in:
89
src/layouts/LayoutMdx.astro
Normal file
89
src/layouts/LayoutMdx.astro
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
import Hero from "../components/Hero.astro";
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
date: Date;
|
||||
img: string;
|
||||
}
|
||||
|
||||
const { frontmatter } = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link
|
||||
rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🏠</text></svg>"
|
||||
/>
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PKGWW2LC50"
|
||||
></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag("js", new Date());
|
||||
|
||||
gtag("config", "G-PKGWW2LC50");
|
||||
</script>
|
||||
<title>{frontmatter.title}</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-light">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">nozzy house news</a>
|
||||
</div>
|
||||
</nav>
|
||||
<Hero
|
||||
date={frontmatter.date}
|
||||
title={frontmatter.title}
|
||||
image={frontmatter.image}
|
||||
/>
|
||||
<div class="container-lg">
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<style lang="scss" is:global>
|
||||
:root {
|
||||
--accent: 124, 58, 237;
|
||||
--accent-gradient: linear-gradient(
|
||||
45deg,
|
||||
rgb(var(--accent)),
|
||||
#da62c4 30%,
|
||||
white 60%
|
||||
);
|
||||
}
|
||||
html {
|
||||
font-family: system-ui, sans-serif;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
code {
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
|
||||
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
}
|
||||
main {
|
||||
padding: 0 20px 100px 20px;
|
||||
}
|
||||
</style>
|
||||
82
src/layouts/TitleLayout.astro
Normal file
82
src/layouts/TitleLayout.astro
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
import Hero from "../components/Hero.astro";
|
||||
|
||||
export interface Props {}
|
||||
|
||||
const {} = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link
|
||||
rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🏠</text></svg>"
|
||||
/>
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PKGWW2LC50"
|
||||
></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag("js", new Date());
|
||||
|
||||
gtag("config", "G-PKGWW2LC50");
|
||||
</script>
|
||||
<title>Nozzy House News</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-light">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">nozzy house news</a>
|
||||
</div>
|
||||
</nav>
|
||||
<Hero
|
||||
title="Welcome to Nozzy's House"
|
||||
image="year2022-1/bathroom1.jpg"
|
||||
bold
|
||||
/>
|
||||
<div class="container-lg">
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<style is:global>
|
||||
:root {
|
||||
--accent: 124, 58, 237;
|
||||
--accent-gradient: linear-gradient(
|
||||
45deg,
|
||||
rgb(var(--accent)),
|
||||
#da62c4 30%,
|
||||
white 60%
|
||||
);
|
||||
}
|
||||
html {
|
||||
font-family: system-ui, sans-serif;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
code {
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
|
||||
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user