Some basic styling on the blog index

This commit is contained in:
2025-06-05 13:09:19 -07:00
parent 5431967dce
commit 54b5a0b3b0
9 changed files with 59 additions and 136 deletions

View File

@@ -1 +1 @@
[["Map",1,2,9,10],"meta::meta",["Map",3,4,5,6,7,8],"astro-version","5.8.1","content-config-digest","8d1b7566f4d3c391","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://example.com\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"experimentalDefaultStyles\":true},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false},\"legacy\":{\"collections\":false}}","blog",["Map",11,12],"a-fresh-start",{"id":11,"data":13,"body":18,"filePath":19,"digest":20,"rendered":21},{"title":14,"description":15,"pubDate":16,"heroImage":17},"A Fresh Start","Starting a new venture",["Date","2025-06-03T00:00:00.000Z"],"https://placecats.com/500/400","This year we decided that we wanted to try something different. As funding\ntightens and the AI bubble grows we realized that start-ups are not where we\nwant to be.\n\nWe decided to found a tech co-operative to:\n\n- Support democratic decision making.\n- Center the company around the workers and not just profit.\n- Capture the value of our work for the workers and their communities.\n- Align our work with our values.","src/content/blog/a-fresh-start.md","d2a18861b3414187",{"html":22,"metadata":23},"\u003Cp>This year we decided that we wanted to try something different. As funding\ntightens and the AI bubble grows we realized that start-ups are not where we\nwant to be.\u003C/p>\n\u003Cp>We decided to found a tech co-operative to:\u003C/p>\n\u003Cul>\n\u003Cli>Support democratic decision making.\u003C/li>\n\u003Cli>Center the company around the workers and not just profit.\u003C/li>\n\u003Cli>Capture the value of our work for the workers and their communities.\u003C/li>\n\u003Cli>Align our work with our values.\u003C/li>\n\u003C/ul>",{"headings":24,"localImagePaths":25,"remoteImagePaths":26,"frontmatter":27,"imagePaths":29},[],[],[],{"title":14,"description":15,"pubDate":28,"heroImage":17},"2025-06-03",[]] [["Map",1,2,9,10],"meta::meta",["Map",3,4,5,6,7,8],"astro-version","5.8.1","content-config-digest","8d1b7566f4d3c391","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://example.com\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"experimentalDefaultStyles\":true},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false},\"legacy\":{\"collections\":false}}","blog",["Map",11,12,30,31],"a-fresh-start",{"id":11,"data":13,"body":18,"filePath":19,"digest":20,"rendered":21},{"title":14,"description":15,"pubDate":16,"heroImage":17},"A Fresh Start","Starting a new venture",["Date","2025-06-03T00:00:00.000Z"],"https://placecats.com/500/400","This year we decided that we wanted to try something different. As funding\ntightens and the AI bubble grows we realized that start-ups are not where we\nwant to be.\n\nWe decided to found a tech co-operative to:\n\n- Support democratic decision making.\n- Center the company around the workers and not just profit.\n- Capture the value of our work for the workers and their communities.\n- Align our work with our values.","src/content/blog/a-fresh-start.md","d2a18861b3414187",{"html":22,"metadata":23},"\u003Cp>This year we decided that we wanted to try something different. As funding\ntightens and the AI bubble grows we realized that start-ups are not where we\nwant to be.\u003C/p>\n\u003Cp>We decided to found a tech co-operative to:\u003C/p>\n\u003Cul>\n\u003Cli>Support democratic decision making.\u003C/li>\n\u003Cli>Center the company around the workers and not just profit.\u003C/li>\n\u003Cli>Capture the value of our work for the workers and their communities.\u003C/li>\n\u003Cli>Align our work with our values.\u003C/li>\n\u003C/ul>",{"headings":24,"localImagePaths":25,"remoteImagePaths":26,"frontmatter":27,"imagePaths":29},[],[],[],{"title":14,"description":15,"pubDate":28,"heroImage":17},"2025-06-03",[],"second-test-post",{"id":30,"data":32,"body":36,"filePath":37,"digest":38,"rendered":39},{"title":33,"description":34,"pubDate":35,"heroImage":17},"Test post","This is a second test post that I'm using just to check that everything is working out okay.",["Date","2025-06-01T11:00:00.000Z"],"Just some dummy content","src/content/blog/second-test-post.md","47c9190a5edaa272",{"html":40,"metadata":41},"\u003Cp>Just some dummy content\u003C/p>",{"headings":42,"localImagePaths":43,"remoteImagePaths":44,"frontmatter":45,"imagePaths":47},[],[],[],{"title":33,"description":34,"pubDate":46,"heroImage":17},"2025-06-01T04:00:00",[]]

View File

@@ -6,7 +6,7 @@ import tailwindcss from "@tailwindcss/vite";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: "https://example.com", site: "https://www.terakoda.com",
integrations: [mdx(), sitemap()], integrations: [mdx(), sitemap()],
vite: { vite: {
plugins: [tailwindcss()], plugins: [tailwindcss()],

View File

@@ -1,5 +1,5 @@
{ {
"name": "astro", "name": "terakoda.com",
"type": "module", "type": "module",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {

View File

@@ -2,6 +2,8 @@
const today = new Date(); const today = new Date();
--- ---
<footer class="py-4 text-sm text-center bg-dark text-light"> <footer
class="py-4 text-sm text-center bg-dark text-light absolute bottom-0 w-full"
>
&copy; {today.getFullYear()} Terakoda, LLC. All rights reserved. &copy; {today.getFullYear()} Terakoda, LLC. All rights reserved.
</footer> </footer>

View File

@@ -1,17 +1,18 @@
--- ---
interface Props { interface Props {
date: Date; date: Date;
} }
const { date } = Astro.props; const { date } = Astro.props;
--- ---
<time datetime={date.toISOString()}> <time datetime={date.toISOString()}>
{ {
date.toLocaleDateString('en-us', { // date.toLocaleDateString('en-us', {
year: 'numeric', // year: 'numeric',
month: 'short', // month: 'short',
day: 'numeric', // day: 'numeric',
}) // })
} date.toISOString()
}
</time> </time>

View File

@@ -1,6 +1,5 @@
--- ---
import HeaderLink from "./HeaderLink.astro"; import HeaderLink from "./HeaderLink.astro";
import { Picture, Image } from "astro:assets";
import HeaderLogo from "../assets/HeaderLogo.png"; import HeaderLogo from "../assets/HeaderLogo.png";
--- ---

View File

@@ -1,135 +1,54 @@
--- ---
import BaseHead from '../../components/BaseHead.astro'; import BaseHead from "../../components/BaseHead.astro";
import Header from '../../components/Header.astro'; import Header from "../../components/Header.astro";
import Footer from '../../components/Footer.astro'; import Footer from "../../components/Footer.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts'; import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts";
import { getCollection } from 'astro:content'; import { getCollection } from "astro:content";
import FormattedDate from '../../components/FormattedDate.astro'; import FormattedDate from "../../components/FormattedDate.astro";
const posts = (await getCollection('blog')).sort( const posts = (await getCollection("blog")).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
); );
--- ---
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
<style> </head>
main { <body class="relative min-h-dvh">
width: 960px; <Header />
} <main>
ul { <section class="max-w-200 m-auto my-16">
display: flex; <ul>
flex-wrap: wrap; {
gap: 2rem; posts.map((post) => (
list-style-type: none; <li class="border-t-2 border-medium p-4 first:border-0">
margin: 0; <a href={`/blog/${post.id}/`}>
padding: 0; <div class="flex flex-row gap-4">
} <div class="flex-none">
ul li { <img
width: calc(50% - 1rem); width={200}
} height={200}
ul li * { src={post.data.heroImage}
text-decoration: none; alt=""
transition: 0.2s ease; />
}
ul li:first-child {
width: 100%;
margin-bottom: 1rem;
text-align: center;
}
ul li:first-child img {
width: 100%;
}
ul li:first-child .title {
font-size: 2.369rem;
}
ul li img {
margin-bottom: 0.5rem;
border-radius: 12px;
}
ul li a {
display: block;
}
.title {
margin: 0;
color: rgb(var(--black));
line-height: 1;
}
.date {
margin: 0;
color: rgb(var(--gray));
}
ul li a:hover h4,
ul li a:hover .date {
color: rgb(var(--accent));
}
ul a:hover img {
box-shadow: var(--box-shadow);
}
@media (max-width: 720px) {
ul {
gap: 0.5em;
}
ul li {
width: 100%;
text-align: center;
}
ul li:first-child {
margin-bottom: 0;
}
ul li:first-child .title {
font-size: 1.563em;
}
}
.post {
display: flex;
flex-direction: row;
align-items: top;
gap: 0.5em;
}
.post-text {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.5em;
}
.post-image img {
max-height: 200px;
}
</style>
</head>
<body>
<Header />
<main>
<section>
<ul>
{
posts.map((post) => (
<li>
<a href={`/blog/${post.id}/`}>
<div class="post">
<div class="post-image">
<img width={200} height={200} src={post.data.heroImage} alt="" />
</div> </div>
<div class="post-text"> <div>
<p class="date"> <p class="text-medium">
<FormattedDate date={post.data.pubDate} /> <FormattedDate date={post.data.pubDate} />
</p> </p>
<h4 class="title">{post.data.title}</h4> <h4 class="text-xl font-bold">{post.data.title}</h4>
<p>{post.data.description}</p>
</div> </div>
</div> </div>
</a> </a>
</li> </li>
)) ))
} }
</ul> </ul>
</section> </section>
</main> </main>
<Footer /> <Footer />
</body> </body>
</html> </html>

View File

@@ -12,7 +12,7 @@ import HeaderLogo from "../assets/HeaderLogo.png";
<head> <head>
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
</head> </head>
<body> <body class="relative min-h-dvh">
<Header /> <Header />
<div class="bg-dark text-light py-16"> <div class="bg-dark text-light py-16">
<div class="flex flex-col items-center gap-8 w-200 m-auto"> <div class="flex flex-col items-center gap-8 w-200 m-auto">

View File

@@ -17,6 +17,8 @@
--color-primary: rgb(46, 182, 112); --color-primary: rgb(46, 182, 112);
--color-primary-dark: #269e61; --color-primary-dark: #269e61;
--color-light: #fdfafc; --color-light: #fdfafc;
/* Mix light and dark using the perceptually uniform oklab color space */
--color-medium: color-mix(in oklab, var(--color-light), var(--color-dark));
--color-dark: #1f2932; --color-dark: #1f2932;
--color-light-accent: #f9f7f7; /* Slightly darker light background for contrast */ --color-light-accent: #f9f7f7; /* Slightly darker light background for contrast */
} }