Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const CONTRIBUTE =

<div class="wrap">
<div class="register-head" aria-hidden="true">
<span class="col-no">№</span>
<span class="col-no">No.</span>
<span class="col-name">
Project: <span class="result-line" id="result-line"
>{projects.length} shown</span
Expand Down
4 changes: 2 additions & 2 deletions src/pages/projects/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Base from '../../layouts/Base.astro';
import Tag from '../../components/Tag.astro';
import Embed from '../../components/Embed.astro';
import Figure from '../../components/Figure.astro';
import { asset, deptColor, href } from '../../lib/format';
import { asset, href } from '../../lib/format';
import { publishedProjects } from '../../lib/projects';

export async function getStaticPaths() {
Expand All @@ -28,7 +28,7 @@ const links = [
<Base title={`${data.name} · CML Project Gallery`} description={data.summary}>
<article class="detail wrap">
<a class="back" href={href('/')}>&larr; All projects</a>
<p class="eyebrow" style={`color:${deptColor(data.department)}`}>
<p class="eyebrow" data-department={data.department}>
{data.department} · {data.type}
</p>
<h1>{data.name}</h1>
Expand Down
27 changes: 21 additions & 6 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ a:hover {
text-transform: uppercase;
color: var(--green);
}
.eyebrow[data-department] {
color: var(--dept, var(--ink-soft));
}
/* keep in step with DEPT_COLOR in src/lib/format.ts */
[data-department='Industrial Ecology'] {
--dept: var(--dept-ie);
}
[data-department='Environmental Biology'] {
--dept: var(--dept-eb);
}

/* ── header ────────────────────────────────────────────────── */
.site-header {
Expand Down Expand Up @@ -490,20 +500,25 @@ a:hover {
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 0.35rem 0.55rem;
gap: 0.35rem 1.1rem;
overflow: hidden;
font-family: var(--font-mono);
font-size: 0.72rem;
color: var(--ink-soft);
}
.row-tags li {
min-width: 0;
overflow-wrap: anywhere;
}
/* the dot sits in the gap before each tag; the list clips it when a tag starts a line */
.row-tags li::before {
content: '·';
margin-right: 0.55rem;
display: inline-block;
width: 1.1rem;
margin-left: -1.1rem;
text-align: center;
color: var(--green);
}
.row-tags li:first-child::before {
content: '';
margin: 0;
}

@media (max-width: 560px) {
.register-head,
Expand Down
Loading