Add footer component
This commit is contained in:
parent
42fc3e2a15
commit
b9c68eae7c
|
@ -10,7 +10,8 @@
|
|||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": "^2.2.0"
|
||||
"astro": "^2.2.0",
|
||||
"dayjs": "^1.11.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sass": "^1.61.0"
|
||||
|
|
|
@ -4,6 +4,9 @@ dependencies:
|
|||
astro:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0(sass@1.61.0)
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
version: 1.11.7
|
||||
|
||||
devDependencies:
|
||||
sass:
|
||||
|
@ -1044,6 +1047,10 @@ packages:
|
|||
which: 2.0.2
|
||||
dev: false
|
||||
|
||||
/dayjs@1.11.7:
|
||||
resolution: {integrity: sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==}
|
||||
dev: false
|
||||
|
||||
/debug@4.3.4:
|
||||
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
|
||||
engines: {node: '>=6.0'}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
import '../styles/styles.scss';
|
||||
import Footer from './base/Footer.astro';
|
||||
---
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -12,4 +13,6 @@ import '../styles/styles.scss';
|
|||
<body>
|
||||
<h1>My Astro Site</h1>
|
||||
</body>
|
||||
|
||||
<Footer />
|
||||
</html>
|
||||
|
|
14
src/layouts/base/Footer.astro
Normal file
14
src/layouts/base/Footer.astro
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
import dayjs from 'dayjs';
|
||||
const copyright = `Copyright © ${dayjs().year()} Maciej Jur`;
|
||||
const email = "maciej@kamoshi.org";
|
||||
---
|
||||
<footer class="p-footer flex flex-row items-center justify-between">
|
||||
<div class="p-footer__info">
|
||||
<div set:html={copyright}></div>
|
||||
<div><a href={`mailto:${email}`}>{email}</a></div>
|
||||
</div>
|
||||
<a class="block" rel="license" href="http://creativecommons.org/licenses/by/4.0/">
|
||||
<img class="block" alt="Creative Commons License" width="88" height="31" src="/static/svg/by.svg" />
|
||||
</a>
|
||||
</footer>
|
3
src/layouts/base/Header.astro
Normal file
3
src/layouts/base/Header.astro
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
|
||||
---
|
Loading…
Reference in a new issue