Compare commits

..

5 Commits

Author SHA1 Message Date
b6a06ed787
Deleted the unnecessary CF adapter
All checks were successful
Test / test (push) Successful in 42s
RenovateBot / renovate (push) Successful in 1m11s
2024-10-24 19:54:32 +00:00
bc13a45d3d
Updated the structure of the post's page 2024-10-24 19:50:34 +00:00
ef6185eb00
Deleted the footer of the pages 2024-10-24 19:45:26 +00:00
2aa8042e3d
Deleted the page headers 2024-10-24 19:16:56 +00:00
f8d98d2933
Update package dependencies 2024-10-24 19:11:06 +00:00
8 changed files with 306 additions and 2327 deletions

View File

@ -1,16 +1,11 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
import { remarkReadingTime } from "./src/plugins/remarkReadingTime"; import { remarkReadingTime } from "./src/plugins/remarkReadingTime";
import cloudflare from "@astrojs/cloudflare";
import icon from "astro-icon";
import sitemap from "@astrojs/sitemap"; import sitemap from "@astrojs/sitemap";
export default defineConfig({ export default defineConfig({
site: "https://popov.link", site: "https://popov.link",
output: "hybrid", output: "static",
adapter: cloudflare({ integrations: [sitemap()],
imageService: "compile",
}),
integrations: [icon(), sitemap()],
build: { build: {
inlineStylesheets: "always", inlineStylesheets: "always",
}, },

2440
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,8 @@
{ {
"name": "website", "name": "website",
"type": "module", "type": "module",
"version": "0.0.1", "version": "2024.10.24",
"private": true,
"scripts": { "scripts": {
"format": "prettier --write .", "format": "prettier --write .",
"dev": "astro dev", "dev": "astro dev",
@ -12,21 +13,18 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.3", "@astrojs/check": "^0.9.4",
"@astrojs/cloudflare": "^11.1.0", "@astrojs/rss": "^4.0.9",
"@astrojs/rss": "^4.0.7", "@astrojs/sitemap": "^3.2.1",
"@astrojs/sitemap": "^3.1.6", "astro": "^4.16.7",
"@iconify-json/hugeicons": "^1.2.0",
"astro": "^4.15.10",
"astro-icon": "^1.1.1",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"cssnano": "^7.0.6", "cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6", "cssnano-preset-advanced": "^7.0.6",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"mdast-util-to-string": "^4.0.0", "mdast-util-to-string": "^4.0.0",
"reading-time": "^1.5.0", "reading-time": "^1.5.0",
"sass": "^1.79.4", "sass": "^1.80.4",
"typescript": "^5.6.2" "typescript": "^5.6.3"
}, },
"devDependencies": { "devDependencies": {
"prettier": "^3.3.3", "prettier": "^3.3.3",

View File

@ -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>&copy; {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>

View File

@ -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>

View File

@ -1,8 +1,6 @@
--- ---
import Analytics from "../components/Analytics.astro"; import Analytics from "../components/Analytics.astro";
import Footer from "../components/Footer.astro";
import Head from "../components/Head.astro"; import Head from "../components/Head.astro";
import Header from "../components/Header.astro";
import "../scss/global.scss"; import "../scss/global.scss";
type Props = { type Props = {
@ -20,11 +18,9 @@ const { description, title } = Astro.props;
/> />
<body> <body>
<Header />
<main> <main>
<slot /> <slot />
</main> </main>
<Footer />
<Analytics title={title ?? import.meta.env.DEFAULT_TITLE} /> <Analytics title={title ?? import.meta.env.DEFAULT_TITLE} />
</body> </body>
</html> </html>

View File

@ -18,12 +18,32 @@ export async function getStaticPaths() {
} }
const post = Astro.props; 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"); 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}> <Layout description={post.data.description} title={post.data.title}>
<article> <article>
<section>
<p>
<small>
Posted
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
by&nbsp;{post.data.author}
<span>&nbsp;•&nbsp;</span>
<span>{remarkPluginFrontmatter.minutesRead}</span>
</small>
</p>
</section>
<section> <section>
<h1>{post.data.title}</h1> <h1>{post.data.title}</h1>
</section> </section>
@ -32,16 +52,6 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"
<Content /> <Content />
</section> </section>
<section>
<p>
<small>
Posted
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
by&nbsp;{post.data.author}
</small>
</p>
</section>
<section> <section>
<Comments /> <Comments />
</section> </section>

View File

@ -35,7 +35,7 @@ body {
margin: auto; margin: auto;
max-width: 52em; max-width: 52em;
min-height: 100vh; min-height: 100vh;
padding: 4em; padding: 2em 4em;
position: relative; position: relative;
text-rendering: optimizelegibility; text-rendering: optimizelegibility;
} }
@ -43,7 +43,7 @@ body {
@media (width <=684px) { @media (width <=684px) {
body { body {
font-size: $fontSizeBase * 0.85; font-size: $fontSizeBase * 0.85;
padding: 4em 1em 2em; padding: 2em 1em;
} }
} }