Skip to content

Commit 905ebc6

Browse files
committed
Change layout to wide.
1 parent 07cec1d commit 905ebc6

31 files changed

+154
-2170
lines changed

astro.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ import metaTags from "astro-meta-tags";
1111
import pagefind from "astro-pagefind";
1212
import deleteUnusedImages from "astro-delete-unused-images";
1313
import preload from "astro-preload";
14+
import { execSync } from "node:child_process";
1415

1516
// https://astro.build/config
1617
export default defineConfig({
1718
vite: {
1819
define: {
19-
"process.env.VITE_BUILD_TIME": JSON.stringify(new Date().toISOString()),
20+
"import.meta.env.TIMESTAMP": new Date()
21+
.toISOString()
22+
.replace(/[-:T.Z]/g, "")
23+
.slice(0, 14),
24+
"import.meta.env.GIT_VERSION": new String(
25+
execSync("git rev-parse --short HEAD")
26+
),
2027
},
2128
resolve: {
2229
alias: {

src/components/BaseHead.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ interface Props {
55
image?: string;
66
}
77
8+
const buildTimestamp = import.meta.env.TIMESTAMP;
9+
const gitVersion = import.meta.env.GIT_VERSION;
810
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
911
1012
const { title, description, image = "/social-card.png" } = Astro.props;
@@ -15,6 +17,8 @@ const { title, description, image = "/social-card.png" } = Astro.props;
1517
<meta name="viewport" content="width=device-width,initial-scale=1" />
1618
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
1719
<meta name="generator" content="Astro" />
20+
<meta name="build-version" content={gitVersion} />
21+
<meta name="build-timestamp" content={buildTimestamp} />
1822
<link rel="sitemap" href="/sitemap-index.xml" />
1923

2024
<meta name="referrer" content="no-referrer-when-downgrade" />

src/components/Footer.astro

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ const buildTimestamp = import.meta.env.TIMESTAMP;
88
const gitVersion = import.meta.env.GIT_VERSION;
99
---
1010

11-
<div class="mt-auto">
12-
<Fullbleed className="bg-primary text-white">
13-
<footer
14-
class="max-w-4xl lg:max-w-6xl mx-auto py-16 lg:grid grid-cols-2 px-6 gap-60"
11+
<div
12+
class="text-white max-w-4xl lg:max-w-6xl mx-auto py-10 lg:grid grid-cols-2 px-6 gap-60"
1513
>
1614
<div>
1715
<nav class="mb-12">
@@ -34,7 +32,7 @@ const gitVersion = import.meta.env.GIT_VERSION;
3432
</nav>
3533
</div>
3634

37-
<article
35+
<div
3836
class="flex flex-col lg:flex-row self-center gap-8 lg:gap-12 justify-end"
3937
>
4038
<div>
@@ -99,12 +97,9 @@ const gitVersion = import.meta.env.GIT_VERSION;
9997
twitter.com/europython <span> ↗</span>
10098
</a>
10199
</p>
102-
103100
<p class="mb-4" style="color: rgba(255, 255, 255, 0.4)">
104-
version: {gitVersion} @ {buildTimestamp}
101+
version: {gitVersion} @ {buildTimestamp}
105102
</p>
106103
</div>
107-
</article>
104+
</div>
108105
</footer>
109-
</Fullbleed>
110-
</div>

src/components/Header.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { promises as fs } from "fs";
33
import { NavItems } from "@components/nav-items";
44
import HeaderActions from "@components/header/header-actions.astro";
55
import HeaderLogo from "@components/header/header-logo.astro";
6+
import Search from "@components/Search.astro";
67
78
import links from "../data/links.json";
89
---
@@ -54,4 +55,5 @@ import links from "../data/links.json";
5455
/>
5556
</nav>
5657
</div>
58+
<Search />
5759
</header>

src/components/card/card.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { title, subtitle, url, image } = Astro.props;
1414
---
1515

1616
<div
17-
class="min-w-[250px] w-full md:w-[40%] lg:w-[30%] p-4 bg-[#D5D6E6] rounded-2xl text-center flex flex-col"
17+
class="prose-xl min-w-[250px] w-full md:w-[40%] lg:w-[30%] p-4 bg-[#D5D6E6] rounded-2xl text-center flex flex-col"
1818
>
1919
<a href={url} class="block">
2020
<div class="relative w-full">

src/components/hero/hero.astro

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)