restyle tweaks
All checks were successful
Deploy Blog / deploy (push) Successful in 2m18s

This commit is contained in:
Thomas Bishop 2026-03-11 16:06:45 +00:00
parent f62963f5c9
commit dbf853be9e
11 changed files with 132 additions and 78 deletions

View file

@ -2,9 +2,9 @@ import MetricBar from "./MetricBar"
const LanguagesChart = ({ chartData, error }) => { const LanguagesChart = ({ chartData, error }) => {
return ( return (
<div className="bg-sidebar p-3 my-4"> <div style={{marginTop:'1rem'}}>
<div className="text-muted-foreground text-sm pb-2"> <div className="code-stat-label" style={{marginBottom: '.5rem'}}>
programming languages Programming languages
</div> </div>
{error ? ( {error ? (
@ -18,7 +18,7 @@ const LanguagesChart = ({ chartData, error }) => {
metric={x.language} metric={x.language}
hours={x.hours} hours={x.hours}
percentage={x.percentage} percentage={x.percentage}
color="#458588" color="dodgerblue"
/> />
)) ))
)} )}

View file

@ -1,5 +1,5 @@
const MetricBar = ({ metric, hours, percentage, color }) => ( const MetricBar = ({ metric, hours, percentage, color }) => (
<div style={{ marginBottom: "12px" }}> <div style={{ marginBottom: "12px", margin: '.5rem' }}>
<div <div
style={{ style={{
display: "flex", display: "flex",
@ -9,7 +9,7 @@ const MetricBar = ({ metric, hours, percentage, color }) => (
}} }}
> >
<span style={{}}>{metric}</span> <span style={{}}>{metric}</span>
<span style={{ color: "#bdae93" }}> <span style={{ color: "black" }}>
{hours}h ({percentage}%) {hours}h ({percentage}%)
</span> </span>
</div> </div>
@ -17,8 +17,7 @@ const MetricBar = ({ metric, hours, percentage, color }) => (
style={{ style={{
width: "100%", width: "100%",
height: "8px", height: "8px",
backgroundColor: "#32302f", backgroundColor: "lightgrey",
borderRadius: "4px",
overflow: "hidden", overflow: "hidden",
}} }}
> >

View file

@ -2,8 +2,8 @@ import MetricBar from "./MetricBar"
const ProjectsChart = ({ chartData, error }) => { const ProjectsChart = ({ chartData, error }) => {
return ( return (
<div className="bg-sidebar p-3 my-4"> <div style={{marginTop: '1rem'}}>
<div className="text-muted-foreground text-sm pb-2">projects</div> <div className="code-stat-label">Repos</div>
{error ? ( {error ? (
<div>Data could not be found!</div> <div>Data could not be found!</div>
@ -16,11 +16,11 @@ const ProjectsChart = ({ chartData, error }) => {
metric={x.project} metric={x.project}
hours={x.hours} hours={x.hours}
percentage={x.percentage} percentage={x.percentage}
color="#fe8019" color="dodgerblue"
/> />
)) ))
)} )}
<div className="text-sm text-muted-foreground"> <div className="code-stats-disclaimer">
Data excludes workplace repos. Data excludes workplace repos.
</div> </div>
</div> </div>

View file

@ -1,8 +1,8 @@
const Scorecard = ({ title, metric }) => { const Scorecard = ({ title, metric }) => {
return ( return (
<div className="bg-sidebar p-3"> <div className="code-stat-grid">
<div className="text-muted-foreground text-sm">{title}</div> <div className="code-stat-label">{title}</div>
<div className="text-lg">{metric}</div> <div className="code-stat-metric">{metric}</div>
</div> </div>
) )
} }

View file

@ -32,7 +32,7 @@ const CodeStats = () => {
data && data &&
data?.projects.filter( data?.projects.filter(
(project) => (project) =>
!project.key.includes("gp-") && !project.key.includes("unknown") !project.key.includes("gp-") && !project.key.includes("unknown") && !project.key.includes("amber")
) )
const personalProjectsSorted = const personalProjectsSorted =
@ -67,44 +67,42 @@ const CodeStats = () => {
.slice(0, 4) .slice(0, 4)
return ( return (
<div className="container mx-auto py-4 px-1 md:p-4 grow "> <div className="">
<div className="space-my-8"> <div className="">
<section className="container"> <section className="">
<div className="flex flex-col md:flex-row items-start md:items-center md:justify-between"> <div className="">
<h2 className="text-2xl font-semibold mb-4 text-[#458588]! h2-home scanlined px-2"> <h2 className="">
{`code stats`} {`Code stats`}
</h2> </h2>
<div className="mb-4 text-sm text-muted"> <div className="code-stat-grid">
{convertDateFriendly(data?.from)} -{" "} <span className="code-stat-label" style={{marginRight: '2rem'}}>Period:</span>
{convertDateFriendly(data?.to)} <span className="code-stat-metric">{convertDateFriendly(data?.from)} -{" "}
{convertDateFriendly(data?.to)}</span>
</div> </div>
</div> </div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> <div className="">
<Scorecard <Scorecard
title="time coding" title="Total time:"
metric={ metric={
error ? "Error" : isLoading ? "Loading..." : grandTotalFormatted error ? "Error" : isLoading ? "Loading..." : grandTotalFormatted
} }
/> />
<Scorecard <Scorecard
title="main project" title="Main project"
metric={error ? "Error" : isLoading ? "Loading..." : mainProject} metric={error ? "Error" : isLoading ? "Loading..." : mainProject}
/> />
<Scorecard
title="OS"
metric={error ? "Error" : isLoading ? "Loading..." : osMetric}
/>
</div> </div>
<LanguagesChart chartData={languagesChartData} error={error} /> <LanguagesChart chartData={languagesChartData} error={error} />
<ProjectsChart chartData={projectsChartData} error={error} /> <ProjectsChart chartData={projectsChartData} error={error} />
<div className="text-sm text-center text-muted-foreground"> <div className="code-stats-disclaimer">
Data sourced from my self-hosted{" "} Data sourced from my self-hosted{" "}
<a <a
href="https://wakapi.dev/" href="https://wakapi.dev/"
target="__blank" target="__blank"
className="underline decoration-1 hover:text-primary/80 underline-offset-4 text-primary" className=""
> >
Wakapi Wakapi
</a>{" "} </a>{" "}

View file

@ -14,7 +14,7 @@ const PostListing = ({ posts, title, showAllButton }) => {
{posts.map((post) => ( {posts.map((post) => (
<ul className="no-bullets"> <ul className="no-bullets">
<li className=""> <li className="">
<div className=""> <div className="post-listing-item">
<span style={{ marginRight: '1rem' }}> <span style={{ marginRight: '1rem' }}>
{convertDate(post.date)} {convertDate(post.date)}
</span> </span>

View file

@ -1,42 +1,94 @@
@media (min-width: 768px) {
main {
max-width: 768px;
margin: 0 1.5rem;
}
.post-listing-item {
display: flex;
flex-direction: row;
}
}
@media (max-width: 768px) {
.post-listing-item {
display: flex;
flex-direction: column;
}
}
.post-listing-item {
display: flex;
}
h1.site-title {
font-weight: 800;
}
.header-links { .header-links {
display: flex; display: flex;
list-style: none; list-style: none;
gap: .5rem; gap: 0.5rem;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.plain-link { .plain-link {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
.no-bullets { .no-bullets {
list-style: none; list-style: none;
padding-left: 0; padding-left: 0;
} }
blockquote { blockquote {
font-style: italic; font-style: italic;
} }
figcaption { figcaption {
text-align: center; text-align: center;
font-style: italic; font-style: italic;
font-size: 14px;
} }
figure { figure {
text-align: center; text-align: center;
} }
figure img { figure img {
width: 100%; width: 100%;
max-width: 500px; max-width: 500px;
min-width: 300px; min-width: 300px;
height: auto; height: auto;
} }
.shiki { .shiki {
padding: 1rem; padding: 1rem;
border: 1pt solid black; /* border: 1pt solid black; */
background-color: whitesmoke !important;
overflow: auto;
}
.code-stat-grid {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 0.5rem;
}
.code-stat-label {
font-weight: 500;
font-style: italic;
}
.code-stats-disclaimer {
font-style: italic;
font-size: 14px;
text-align: center;
}
.about-li-padding {
padding-right: 1rem;
} }

View file

@ -57,29 +57,33 @@ const AboutPage = () => {
> >
Arria NLG Arria NLG
</a>{" "} </a>{" "}
and in several web developer roles. Before software I was a and in several web developer roles. Before software, I was a
teacher.{" "} teacher.{" "}
</p> </p>
<p>I am licenced amateur radio operator. My callsign is ME7SYO.</p>
<p className="leading-[1.6] [&:not(:first-child)]:mt-6"> <p className="leading-[1.6] [&:not(:first-child)]:mt-6">
Some things I like: Some things I like:
<ul className="no-bullets"> <ul className="no-bullets">
<li className="">🐶 Staffies and other bull-breeds</li> <li className=""><span className="about-li-padding">🐶</span>Staffies and other bull-breeds</li>
<li className="">🎼 Classical music (Haydn, Mozart, JSB)</li> <li className=""><span className="about-li-padding">🎼</span>Classical music (Haydn, Mozart, JSB)</li>
<li className="">🛸 Science fiction </li> <li className=""><span className="about-li-padding">🛸</span>Science fiction </li>
<li className=""><span className="about-li-padding">🐦</span>Bird watching</li>
</ul> </ul>
</p> </p>
<p className=""> <p className="">
Some things I'm interested in: Some things I'm interested in:
<ul className="no-bullets"> <ul className="no-bullets">
<li className="">🧑💻 Self-hosting and digital resiliance</li> <li className=""><span className="about-li-padding">🧑💻</span>Self-hosting and digital resiliance</li>
<li className="">🖳 The history of computing and networks</li>
<li className=""> Buddhism</li>
{/* <li className=""><span className="about-li-padding">🖥</span>The history of computing and networks</li>
<li className=""><span className="about-li-padding"></span>Buddhism</li>
<li className=""><span className="about-li-padding">📡</span>Amateur radio</li>
<li className=""><span className="about-li-padding">👽</span>SETI</li>
<li className="">📡 Civil communications infrastructure</li>
*/}
</ul> </ul>
</p> </p>
</div> </div>

View file

@ -4,13 +4,13 @@ import { usePosts } from "@/hooks/usePosts"
import gruvboxComputer from "../images/gruvbox-computer.svg" import gruvboxComputer from "../images/gruvbox-computer.svg"
import EolasListing from "@/components/EolasListing" import EolasListing from "@/components/EolasListing"
import CodeStats from "../containers/CodeStats" import CodeStats from "../containers/CodeStats"
// import TodayILearned from "@/containers/TodayILearned" import { Link } from "react-router"
const HomePage = () => { const HomePage = () => {
const { posts } = usePosts() const { posts } = usePosts()
return ( return (
<MainTemplate> <MainTemplate>
<p>A wizard who goes to bed early. This is my technical scrapbook <p>A wizard who goes to bed early. This is <Link to="/about">my</Link> technical scrapbook
and digital garden. and digital garden.
</p> </p>
@ -23,8 +23,7 @@ const HomePage = () => {
/> />
{/* <CodeStats /> <CodeStats />
<EolasListing /> */}
</MainTemplate> </MainTemplate>
) )
} }

View file

@ -12,7 +12,7 @@ const BlogTemplate = () => {
return ( return (
<MainTemplate> <MainTemplate>
<div className="container mx-auto py-4 px-1 md:p-4 grow"> <div className="">
{!post ? ( {!post ? (
<div>Loading...</div> <div>Loading...</div>
) : ( ) : (
@ -25,7 +25,8 @@ const BlogTemplate = () => {
<time datetime={convertDate(post?.date)} className="text-sm"> <time datetime={convertDate(post?.date)} className="text-sm">
{convertDateFriendly(post?.date)} {convertDateFriendly(post?.date)}
</time> </time>
<div className="flex flex-wrap gap-3 align-center"> <div className="">
<span>Tag(s): </span>
{post?.tags?.map((tag, i) => ( {post?.tags?.map((tag, i) => (
<Link <Link
style={{ marginRight: '0.5rem' }} style={{ marginRight: '0.5rem' }}
@ -40,10 +41,7 @@ const BlogTemplate = () => {
</header> </header>
<div <div
className=" dangerouslySetInnerHTML={{ __html: post?.html }}
"
dangerouslySetInnerHTML={{ __html: post?.html }}
/> />
</article> </article>
)} )}

View file

@ -5,12 +5,16 @@ const Header = () => {
return ( return (
<header> <header>
<nav className=""> <nav className="">
<h1> <h1 className="site-title">
<Link <Link
className="plain-link" className="plain-link"
to="/">Systems Obscure</Link> to="/">Systems Obscure</Link>
</h1> </h1>
<ul className="header-links"> <ul className="header-links">
<li>
<Link to="/">Home</Link>
</li>
<li> <li>
<Link to="/posts">Posts</Link> <Link to="/posts">Posts</Link>
</li> </li>
@ -23,7 +27,7 @@ const Header = () => {
href="https://forgejo.systemsobscure.net/thomasabishop" href="https://forgejo.systemsobscure.net/thomasabishop"
target="blank" target="blank"
> >
Forgejo Forgejo (ext.)
</a> </a>
</li> </li>