Compare commits
5 Commits
660cc04920
...
b6a06ed787
Author | SHA1 | Date | |
---|---|---|---|
b6a06ed787 | |||
bc13a45d3d | |||
ef6185eb00 | |||
2aa8042e3d | |||
f8d98d2933 |
@ -1,16 +1,11 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import { remarkReadingTime } from "./src/plugins/remarkReadingTime";
|
||||
import cloudflare from "@astrojs/cloudflare";
|
||||
import icon from "astro-icon";
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
|
||||
export default defineConfig({
|
||||
site: "https://popov.link",
|
||||
output: "hybrid",
|
||||
adapter: cloudflare({
|
||||
imageService: "compile",
|
||||
}),
|
||||
integrations: [icon(), sitemap()],
|
||||
output: "static",
|
||||
integrations: [sitemap()],
|
||||
build: {
|
||||
inlineStylesheets: "always",
|
||||
},
|
||||
|
2440
package-lock.json
generated
2440
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "website",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"version": "2024.10.24",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"format": "prettier --write .",
|
||||
"dev": "astro dev",
|
||||
@ -12,21 +13,18 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/cloudflare": "^11.1.0",
|
||||
"@astrojs/rss": "^4.0.7",
|
||||
"@astrojs/sitemap": "^3.1.6",
|
||||
"@iconify-json/hugeicons": "^1.2.0",
|
||||
"astro": "^4.15.10",
|
||||
"astro-icon": "^1.1.1",
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/rss": "^4.0.9",
|
||||
"@astrojs/sitemap": "^3.2.1",
|
||||
"astro": "^4.16.7",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"cssnano": "^7.0.6",
|
||||
"cssnano-preset-advanced": "^7.0.6",
|
||||
"dayjs": "^1.11.13",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"reading-time": "^1.5.0",
|
||||
"sass": "^1.79.4",
|
||||
"typescript": "^5.6.2"
|
||||
"sass": "^1.80.4",
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.3.3",
|
||||
|
@ -1,60 +0,0 @@
|
||||
---
|
||||
import { Icon } from "astro-icon/components";
|
||||
import dayjs from "dayjs";
|
||||
---
|
||||
|
||||
<style lang="scss">
|
||||
@import "../scss/_variables.scss";
|
||||
|
||||
footer {
|
||||
bottom: 0;
|
||||
height: 4em;
|
||||
left: 0;
|
||||
padding: 1em 4em;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $colorText;
|
||||
|
||||
&:visited {
|
||||
color: $colorText;
|
||||
}
|
||||
}
|
||||
|
||||
.left-nav,
|
||||
.right-nav {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 49%;
|
||||
}
|
||||
|
||||
.left-nav {
|
||||
float: left;
|
||||
font-size: $fontSizeBase * 0.75;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.right-nav {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media (width <=684px) {
|
||||
footer {
|
||||
padding: 4em 1em 2em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<footer>
|
||||
<div class="left-nav">
|
||||
<span>© {dayjs().year()} <a href="mailto:valentin@popov.link">Valentin Popov</a></span>
|
||||
</div>
|
||||
<div class="right-nav">
|
||||
<a href="https://github.com/valentineus" target="_blank"><Icon name="hugeicons:github-01" /></a>
|
||||
<a href="https://analytics.popov.link" target="_blank"><Icon name="hugeicons:analytics-up" /></a>
|
||||
<a href="/feed.xml" target="_blank"><Icon name="hugeicons:rss" /></a>
|
||||
</div>
|
||||
</footer>
|
@ -1,64 +0,0 @@
|
||||
---
|
||||
import { Icon } from "astro-icon/components";
|
||||
|
||||
const { pathname } = Astro.url;
|
||||
---
|
||||
|
||||
<style lang="scss">
|
||||
@import "../scss/_variables.scss";
|
||||
|
||||
[data-icon] {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: $colorBg;
|
||||
left: 0;
|
||||
line-height: 3.5em;
|
||||
opacity: 0.975;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
nav {
|
||||
margin: auto;
|
||||
max-width: 52em;
|
||||
padding: 0 4em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $colorText;
|
||||
|
||||
&:visited {
|
||||
color: $colorText;
|
||||
}
|
||||
}
|
||||
|
||||
@media (width <=684px) {
|
||||
header {
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<header>
|
||||
<nav>
|
||||
<a href="/">
|
||||
{
|
||||
pathname !== "/" ? (
|
||||
<>
|
||||
<Icon name="hugeicons:arrow-left-01" />
|
||||
<span>Home</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Icon name="hugeicons:source-code" />
|
||||
<span>{import.meta.env.DEFAULT_TITLE}</span>
|
||||
</>
|
||||
)
|
||||
}
|
||||
</a>
|
||||
</nav>
|
||||
</header>
|
@ -1,8 +1,6 @@
|
||||
---
|
||||
import Analytics from "../components/Analytics.astro";
|
||||
import Footer from "../components/Footer.astro";
|
||||
import Head from "../components/Head.astro";
|
||||
import Header from "../components/Header.astro";
|
||||
import "../scss/global.scss";
|
||||
|
||||
type Props = {
|
||||
@ -20,11 +18,9 @@ const { description, title } = Astro.props;
|
||||
/>
|
||||
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
<Footer />
|
||||
<Analytics title={title ?? import.meta.env.DEFAULT_TITLE} />
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,12 +18,32 @@ export async function getStaticPaths() {
|
||||
}
|
||||
|
||||
const post = Astro.props;
|
||||
const { Content } = await post.render();
|
||||
const { Content, remarkPluginFrontmatter } = await post.render();
|
||||
const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
|
||||
---
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../scss/_variables.scss";
|
||||
|
||||
p {
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
|
||||
<Layout description={post.data.description} title={post.data.title}>
|
||||
<article>
|
||||
<section>
|
||||
<p>
|
||||
<small>
|
||||
Posted
|
||||
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
|
||||
by {post.data.author}
|
||||
<span> • </span>
|
||||
<span>{remarkPluginFrontmatter.minutesRead}</span>
|
||||
</small>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>{post.data.title}</h1>
|
||||
</section>
|
||||
@ -32,16 +52,6 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"
|
||||
<Content />
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>
|
||||
<small>
|
||||
Posted
|
||||
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
|
||||
by {post.data.author}
|
||||
</small>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<Comments />
|
||||
</section>
|
||||
|
@ -35,7 +35,7 @@ body {
|
||||
margin: auto;
|
||||
max-width: 52em;
|
||||
min-height: 100vh;
|
||||
padding: 4em;
|
||||
padding: 2em 4em;
|
||||
position: relative;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
@ -43,7 +43,7 @@ body {
|
||||
@media (width <=684px) {
|
||||
body {
|
||||
font-size: $fontSizeBase * 0.85;
|
||||
padding: 4em 1em 2em;
|
||||
padding: 2em 1em;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user