The repo is already named cmjs, so the nested cmjs/ subfolder was redundant. Moved css/, js/, strings/, templates/, and the gitignored articles/ up to the repo root and removed the empty cmjs/ directory, so the whole repo (or just css/js/strings/templates/articles) can be dropped into an existing site and embedded as-is — no wrapper folder required. This also fixes a real bug: js/config.js's MARKED_URL previously reached outside cmjs/ (../../js/marked.min.js) to find the vendored marked.min.js, which already lived at the repo root as a sibling of cmjs/ rather than inside it. Now that both files sit in the same js/ folder, MARKED_URL is a same-directory reference and no longer depends on anything outside this one folder tree. BASE_URL's own formula is unchanged (config.js is still exactly one level below whatever holds articles/, strings/, and templates/ — previously that was cmjs/, now it's the repo root). Updated index.html, .gitignore (/cmjs/articles/ -> /articles/), and every path reference throughout README.md (project structure diagram, embedding instructions, nginx config, discovery/caching docs) to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXSVPS3UmmASiiprPfcnUd
155 lines
3.1 KiB
CSS
155 lines
3.1 KiB
CSS
/* -------------------------------------------------------------------------
|
|
Article list cards
|
|
------------------------------------------------------------------------- */
|
|
.card {
|
|
display: grid;
|
|
grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
|
|
gap: 1.75rem;
|
|
padding: 1.1rem 0 1.75rem;
|
|
border-bottom: 1px solid var(--color-border);
|
|
margin-bottom: 1.75rem;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.card:hover {
|
|
border-color: var(--color-accent);
|
|
}
|
|
|
|
.card--no-image { grid-template-columns: 1fr; }
|
|
|
|
.card-media {
|
|
display: block;
|
|
align-self: start;
|
|
overflow: hidden;
|
|
aspect-ratio: 16 / 10;
|
|
background: var(--color-code-bg);
|
|
}
|
|
|
|
.card-image {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.25s ease;
|
|
}
|
|
|
|
.card:hover .card-image { transform: scale(1.025); }
|
|
|
|
.card-media:focus-visible {
|
|
outline: 2px solid var(--color-accent);
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
/* Text content wrapper */
|
|
.card-body {
|
|
padding: 0.1rem 0 0;
|
|
}
|
|
|
|
.card h2 {
|
|
margin: 0 0 0.35rem;
|
|
font-size: clamp(1.35rem, 2.2vw, 1.8rem);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.card h2 a {
|
|
color: var(--color-text);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.card h2 a:hover {
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
/* Date + reading-time row */
|
|
.card-byline {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.6rem;
|
|
margin-bottom: 0.4rem;
|
|
}
|
|
|
|
.card time {
|
|
font-size: 0.83rem;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.card-reading-time {
|
|
font-size: 0.8rem;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.card-reading-time::before {
|
|
content: '·';
|
|
margin-right: 0.4rem;
|
|
}
|
|
|
|
.card p {
|
|
margin: 1rem 0 0.8rem;
|
|
color: var(--color-text-soft);
|
|
font-size: 1rem;
|
|
line-height: 1.65;
|
|
}
|
|
|
|
/* Author + category row at the bottom of each card */
|
|
.card-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
margin-top: 0.5rem;
|
|
font-size: 0.82rem;
|
|
}
|
|
|
|
.tag-list {
|
|
display: contents;
|
|
}
|
|
|
|
/* Shared author link — used in cards and article headers */
|
|
.author-link {
|
|
color: var(--color-text-muted);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.author-link:hover {
|
|
color: var(--color-accent);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Shared category badge — used in cards and article headers */
|
|
.tag {
|
|
display: inline-block;
|
|
background: var(--color-tag-bg);
|
|
border: 1px solid var(--color-tag-border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 0.1em 0.5em;
|
|
color: var(--color-text-soft);
|
|
text-decoration: none;
|
|
font-size: 0.82rem;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
|
|
.tag:hover {
|
|
background: var(--color-accent);
|
|
border-color: var(--color-accent);
|
|
color: #fff;
|
|
}
|
|
|
|
/* Heading shown above a filtered list (author or category view) */
|
|
.category-heading {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--color-text-soft);
|
|
margin: 0 0 1.25rem;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.card {
|
|
grid-template-columns: 1fr;
|
|
gap: 0.9rem;
|
|
padding-top: 0;
|
|
}
|
|
|
|
.card-media { aspect-ratio: 16 / 9; }
|
|
.card-body { padding: 0; }
|
|
}
|