redesign the site as a technical minimalist TUI

Replace the glassy hero treatment with a terminal and TUI vocabulary
while keeping the layout minimal:

- Switch the type stack to JetBrains Mono and flatten every surface:
  hairline borders, square corners, no blur or glow, and a faint
  graph-paper grid in place of the radial gradients.
- Rebuild the home hero as a terminal window whose output is typed in
  on load; the old mouse-parallax glow script becomes that typing
  sequence, and it no-ops under prefers-reduced-motion.
- Give the projects, about, and entry panels title bars, and render
  cards with a metadata strip, status dot, ISO date, and prompt-style
  links.
- Hide the inline nav behind the hamburger on narrow screens; the old
  rule was outranked by the #menu id selector and never applied.
- Add an SVG favicon, which also clears the only 404 on the site.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
SowinskiBraedenandClaude Opus 5 committed 2026-10-17 23:41:38 -07:00
1 parent 2e67914fd6
commit 8595290318
10 files changed
+1270 -1167

No files matched your search

+201 -151
View File
@@ -1,193 +1,243 @@
.container {
display: grid;
grid-template-columns: minmax(280px, 320px) repeat(3, 1fr);
grid-template-areas:
"pro about about about"
"pro other other other"
"footer footer footer footer";
grid-template-rows: auto 1fr auto;
gap: 24px;
padding-top: 18px;
min-height: calc(100vh - 132px);
align-items: stretch;
display: grid;
grid-template-columns: minmax(260px, 300px) repeat(3, 1fr);
grid-template-areas:
"pro about about about"
"pro other other other"
"footer footer footer footer";
grid-template-rows: auto 1fr auto;
gap: 18px;
padding-top: 22px;
min-height: calc(100vh - 120px);
align-items: stretch;
}
.left-content {
grid-area: pro;
display: flex;
flex-direction: column;
grid-area: pro;
display: flex;
flex-direction: column;
gap: 18px;
}
.about {
grid-area: about;
grid-area: about;
}
.honors {
grid-area: other;
display: flex;
flex-direction: column;
height: 100%;
grid-area: other;
display: flex;
flex-direction: column;
height: 100%;
}
.footer {
grid-area: footer;
grid-area: footer;
}
.about {
display: flex;
flex-direction: column;
}
/* ----------------------------------------------------------- TUI panels */
section {
transition: 0.8s;
padding: 24px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
linear-gradient(135deg, rgba(235, 82, 52, 0.05), transparent 48%),
rgba(20, 21, 24, 0.36);
border-radius: 22px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow:
0 18px 44px rgba(0, 0, 0, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.12),
inset 0 -1px 0 rgba(255, 255, 255, 0.03);
backdrop-filter: blur(14px) saturate(120%);
-webkit-backdrop-filter: blur(14px) saturate(120%);
padding: 0;
background: var(--surface);
border: 1px solid var(--border);
display: flex;
flex-direction: column;
}
body.light section {
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.42)),
linear-gradient(135deg, rgba(235, 82, 52, 0.04), transparent 48%),
rgba(255, 255, 255, 0.34);
border-color: rgba(255, 255, 255, 0.52);
box-shadow:
0 16px 36px rgba(0, 0, 0, 0.06),
inset 0 1px 0 rgba(255, 255, 255, 0.72),
inset 0 -1px 0 rgba(255, 255, 255, 0.22);
.panel__bar {
margin: 0;
padding: 6px 12px;
background: var(--bar);
border-bottom: 1px solid var(--border);
font-size: 0.92rem;
font-weight: 700;
letter-spacing: 0.02em;
color: var(--bright);
}
section h3 {
margin-top: 0;
margin-bottom: 14px;
font-size: 1.2rem;
.panel__bar::before {
content: "▸ ";
color: var(--secondary);
}
#profile {
background-image: linear-gradient(rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.24)), url("../images/pic.png");
background-size: cover;
background-position: center;
color: #d8d8d9;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
margin-bottom: 0;
.panel__body {
padding: 16px;
flex: 1;
}
#skills {
border-top-left-radius: 0;
border-top-right-radius: 0;
flex: 1;
flex: 1;
}
#profile img {
border: 4px solid rgba(235, 82, 52, 0.18);
box-shadow: var(--shadow);
#profile .panel__body {
display: flex;
flex-direction: column;
gap: 14px;
}
#profile img.profile {
width: 100%;
max-width: 180px;
aspect-ratio: 1;
object-fit: cover;
border: 1px solid var(--border-strong);
border-radius: 0;
filter: grayscale(0.3) contrast(1.03);
}
.profile-sub {
background:
linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.42)),
rgba(0, 0, 0, 0.36);
padding: 16px;
border-radius: 14px;
margin-top: 16px;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
padding: 0;
border: 0;
background: transparent;
}
.profile-sub .profile-name,
.profile-sub .profile-role,
.profile-sub .profile-focus {
color: #f4f1ed;
}
.skills-list {
padding-left: 18px;
}
.skills-list li {
margin-bottom: 8px;
}
.text {
font-weight: 400;
transition: 0.8s;
margin: 0 0 14px;
}
dt {
margin-top: 16px;
}
dd {
margin-left: 0;
color: var(--muted);
}
.honor-inline-link {
display: inline-block;
margin-top: 8px;
}
.honor-subitem {
margin-top: 10px;
padding-left: 14px;
}
.honor-subitem__label {
display: inline-block;
font-size: 0.74rem;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--muted);
}
.honor-subitem__text {
margin: 4px 0 0;
color: var(--muted);
}
.honors dl,
.skills-list {
margin-bottom: 0;
}
@media only screen and (max-width: 920px) {
.container {
display: flex;
flex-direction: column;
min-height: auto;
}
#skills {
margin-bottom: 0;
}
}
.profile-name {
margin: 0 0 6px;
font-size: clamp(1.45rem, 2vw, 1.9rem);
line-height: 1.1;
margin: 0 0 4px;
font-size: 1.15rem;
line-height: 1.25;
}
.profile-role,
.profile-focus {
margin: 0;
margin: 0;
font-size: 0.82rem;
color: var(--primary);
padding-left: 14px;
text-indent: -14px;
}
.profile-focus {
margin-top: 6px;
color: rgba(255, 255, 255, 0.76);
margin-top: 6px;
color: var(--muted);
}
.profile-role::before,
.profile-focus::before {
content: "#\00a0";
color: var(--border-strong);
}
/* ------------------------------------------------------------- contents */
.skills-list {
list-style: none;
padding: 0;
margin: 0;
font-size: 0.85rem;
}
.skills-list li {
margin-bottom: 4px;
color: var(--primary);
padding-left: 14px;
text-indent: -14px;
}
.skills-list li::before {
content: "-\00a0";
color: var(--secondary);
}
.text {
font-weight: 400;
margin: 0 0 14px;
font-size: 0.9rem;
}
.about .panel__body,
.honors .panel__body {
max-width: 92ch;
}
.about .text:last-child {
margin-bottom: 0;
}
.about .text,
.honors .text {
color: var(--primary);
}
.honors dl {
margin: 0;
}
dt {
margin-top: 16px;
}
dt:first-of-type {
margin-top: 0;
}
dt.text {
margin-bottom: 4px;
color: var(--bright);
}
dt.text b::before {
content: "▸ ";
color: var(--secondary);
font-weight: 400;
}
dd {
margin-left: 14px;
color: var(--muted);
border-left: 1px solid var(--border);
padding-left: 12px;
}
dd.text {
color: var(--muted);
}
.honor-inline-link {
display: inline-block;
margin-top: 6px;
font-size: 0.82rem;
color: var(--secondary);
}
.honor-inline-link::before {
content: "> ";
}
.honor-subitem {
margin-top: 10px;
padding-left: 12px;
border-left: 1px solid var(--border);
}
.honor-subitem__label {
display: inline-block;
font-size: 0.68rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--secondary);
}
.honor-subitem__text {
margin: 2px 0 0;
color: var(--muted);
font-size: 0.85rem;
}
abbr {
text-decoration: underline dotted var(--border-strong);
cursor: help;
}
@media only screen and (max-width: 920px) {
.container {
display: flex;
flex-direction: column;
min-height: auto;
gap: 14px;
}
#profile img.profile {
max-width: 140px;
}
}
+332 -132
View File
@@ -1,27 +1,28 @@
.projects-page,
.entry-page {
padding-top: 18px;
padding-top: 22px;
}
/* ----------------------------------------------------------- TUI panels */
.projects-hero,
.entry-shell,
.content-section {
background: var(--menu-text-bg);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 22px;
padding: 28px;
box-shadow: var(--shadow);
}
.projects-hero {
margin-bottom: 24px;
margin-bottom: 20px;
padding: 20px;
}
.projects-hero h1,
.entry-title {
font-size: clamp(2rem, 4vw, 3rem);
line-height: 1.1;
margin: 6px 0 14px;
font-size: clamp(1.3rem, 2.6vw, 1.75rem);
line-height: 1.25;
margin: 8px 0 10px;
max-width: 860px;
}
.projects-intro,
@@ -29,287 +30,486 @@
margin: 0;
max-width: 760px;
color: var(--muted);
font-size: 0.92rem;
}
.eyebrow {
text-transform: uppercase;
letter-spacing: 0.14em;
font-size: 0.78rem;
color: var(--secondary);
margin: 0;
font-size: 11px;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--secondary);
font-weight: 700;
}
.content-section {
margin-bottom: 24px;
.eyebrow::before {
content: "// ";
color: var(--border-strong);
}
.content-section {
margin-bottom: 20px;
padding: 0;
}
/* Panel title bar, like a window chrome strip in a TUI. */
.section-heading {
display: flex;
justify-content: space-between;
align-items: end;
align-items: center;
gap: 12px;
margin-bottom: 18px;
margin: 0;
padding: 6px 12px;
background: var(--bar);
border-bottom: 1px solid var(--border);
}
.section-heading h2 {
margin: 6px 0 0;
font-size: 1.8rem;
margin: 0;
font-size: 0.95rem;
font-weight: 700;
letter-spacing: 0.02em;
}
.section-link,
.card-link,
.entry-back,
.inline-button {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 12px;
.section-heading h2::before {
content: "▸ ";
color: var(--secondary);
}
.section-heading .eyebrow {
display: none;
}
.section-link {
font-size: 12px;
color: var(--muted);
border: 1px solid var(--border);
padding: 10px 14px;
font-weight: 600;
background: transparent;
padding: 1px 8px;
background: var(--surface);
}
.section-link:hover,
.card-link:hover,
.entry-back:hover,
.inline-button:hover {
border-color: rgba(235, 82, 52, 0.32);
.section-link::before {
content: "> ";
color: var(--secondary);
}
.section-link:hover {
color: var(--bright);
border-color: var(--secondary);
}
.content-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 18px;
}
.content-card.is-hidden {
display: none;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 14px;
padding: 16px;
}
.updates-grid {
grid-template-columns: 1fr;
}
.content-card.is-hidden {
display: none;
}
/* ------------------------------------------------------------ TUI cards */
.content-card {
border-radius: 18px;
padding: 22px;
background: var(--panel);
padding: 0;
background: var(--surface-alt);
border: 1px solid var(--border);
display: flex;
flex-direction: column;
min-height: 100%;
scroll-margin-top: 96px;
scroll-margin-top: 80px;
transition:
border-color 0.12s linear,
background-color 0.12s linear;
}
.content-card:hover {
border-color: var(--border-strong);
}
.content-card.featured {
border-color: rgba(235, 82, 52, 0.34);
border-color: rgba(235, 82, 52, 0.42);
}
.card-meta,
.entry-meta,
.entry-links,
.card-links,
.tag-list,
.entry-tag-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
body.light .content-card.featured {
border-color: rgba(200, 64, 31, 0.42);
}
.card-meta {
margin-bottom: 14px;
}
.card-kicker,
.card-date,
.entry-pill {
display: inline-flex;
display: flex;
flex-wrap: wrap;
align-items: center;
border-radius: 999px;
padding: 6px 12px;
font-size: 0.84rem;
font-weight: 600;
gap: 10px;
margin: 0;
padding: 4px 12px;
background: var(--bar);
border-bottom: 1px solid var(--border);
font-size: 11px;
}
.card-kicker,
.entry-pill-primary {
background: rgba(235, 82, 52, 0.16);
.card-kicker {
color: var(--secondary);
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.card-date,
.entry-pill-secondary {
background: rgba(216, 216, 217, 0.08);
.card-date {
color: var(--muted);
}
.card-status {
margin-left: auto;
color: var(--muted);
display: inline-flex;
align-items: center;
gap: 6px;
}
.card-status::before {
content: "";
width: 6px;
height: 6px;
background: var(--muted);
display: inline-block;
}
.card-status[data-state="active"]::before {
background: var(--ok);
}
.card-status[data-state="attention"]::before {
background: var(--secondary);
}
.content-card h3 {
margin: 0 0 10px;
font-size: 1.35rem;
line-height: 1.2;
margin: 0;
padding: 12px 12px 0;
font-size: 1.05rem;
line-height: 1.3;
}
.card-summary {
color: var(--muted);
margin: 0 0 18px;
margin: 0;
padding: 8px 12px 12px;
font-size: 0.85rem;
flex: 1;
}
.tag-list,
.entry-tag-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.tag-list {
padding: 0 12px 12px;
}
.tag,
.entry-tag {
display: inline-flex;
border-radius: 999px;
padding: 6px 10px;
font-size: 0.82rem;
background: rgba(255, 255, 255, 0.04);
text-transform: lowercase;
padding: 0 6px;
font-size: 11px;
color: var(--muted);
background: transparent;
border: 1px solid var(--border);
}
.tag::before,
.entry-tag::before {
content: "#";
color: var(--border-strong);
margin-right: 2px;
}
.card-links,
.entry-links {
margin-top: 18px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.card-links {
margin-top: auto;
padding: 10px 12px;
border-top: 1px solid var(--border);
background: var(--surface);
}
.card-link,
.entry-back,
.inline-button {
display: inline-flex;
align-items: center;
border: 1px solid var(--border);
background: transparent;
color: var(--primary);
padding: 2px 9px;
font-size: 12px;
}
.card-link::before,
.entry-back::before,
.inline-button::before {
content: ">\00a0";
color: var(--secondary);
}
.card-link:hover,
.entry-back:hover,
.inline-button:hover {
color: var(--bright);
border-color: var(--secondary);
}
.card-link-primary,
.inline-button-primary {
background: var(--secondary);
color: #fff;
border-color: transparent;
border-color: var(--border-strong);
color: var(--bright);
}
.card-link-primary:hover,
.inline-button-primary:hover {
color: #fff;
filter: brightness(1.04);
background: var(--secondary);
color: #0c0d10;
}
.card-link-primary:hover::before,
.inline-button-primary:hover::before {
color: #0c0d10;
}
.projects-toggle-shell {
display: flex;
justify-content: center;
margin-top: 20px;
padding: 0 16px 16px;
}
.projects-toggle {
font-family: var(--mono);
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 999px;
border: 1px solid var(--border);
padding: 12px 18px;
font-weight: 600;
background: rgba(255, 255, 255, 0.03);
color: var(--primary);
padding: 4px 14px;
font-size: 12px;
background: var(--surface-alt);
color: var(--muted);
cursor: pointer;
transition:
color 0.12s linear,
border-color 0.12s linear;
}
.projects-toggle:hover {
border-color: rgba(235, 82, 52, 0.32);
.projects-toggle::before {
content: "+\00a0";
color: var(--secondary);
}
.projects-toggle[aria-expanded="true"]::before {
content: "-\00a0";
}
.projects-toggle:hover {
color: var(--bright);
border-color: var(--secondary);
}
.updates-grid .content-card {
background: linear-gradient(
180deg,
rgba(235, 82, 52, 0.08),
rgba(255, 255, 255, 0.02)
);
background: var(--surface-alt);
}
.site-footer {
margin-bottom: 24px;
margin-bottom: 22px;
}
/* ------------------------------------------------------------ entry page */
.entry-shell {
padding: 24px 28px 30px;
padding: 20px 22px 26px;
}
.entry-header {
margin-bottom: 24px;
}
.entry-back {
margin-bottom: 20px;
}
.entry-meta {
.entry-back {
margin-bottom: 18px;
}
.entry-meta {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 14px;
font-size: 11px;
}
.entry-pill {
display: inline-flex;
align-items: center;
padding: 1px 8px;
border: 1px solid var(--border);
}
.entry-pill-primary {
color: var(--secondary);
border-color: rgba(235, 82, 52, 0.4);
text-transform: uppercase;
letter-spacing: 0.08em;
font-weight: 700;
}
.entry-pill-secondary {
color: var(--muted);
}
.entry-links {
margin-top: 18px;
margin-top: 16px;
}
.entry-content {
margin-top: 28px;
padding-top: 24px;
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid var(--border);
font-size: 0.92rem;
max-width: 88ch;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
margin-top: 28px;
line-height: 1.2;
margin-top: 26px;
margin-bottom: 8px;
line-height: 1.3;
font-size: 1rem;
}
.entry-content h2::before,
.entry-content h3::before {
content: "## ";
color: var(--secondary);
font-weight: 400;
}
.entry-content h3::before {
content: "### ";
}
.entry-content p,
.entry-content li,
.entry-content blockquote {
.entry-content li {
color: var(--primary);
}
.entry-content ul,
.entry-content ol {
padding-left: 22px;
padding-left: 20px;
}
.entry-content ul {
list-style: none;
padding-left: 4px;
}
.entry-content ul li {
padding-left: 14px;
text-indent: -14px;
}
.entry-content ul li::before {
content: "-\00a0";
color: var(--secondary);
}
.entry-content a {
color: var(--secondary);
border-bottom: 1px solid rgba(235, 82, 52, 0.35);
}
.entry-content a:hover {
border-bottom-color: var(--secondary);
}
.entry-content blockquote {
margin: 18px 0;
padding: 12px 16px;
border-left: 4px solid var(--secondary);
background: rgba(235, 82, 52, 0.08);
border-radius: 0 12px 12px 0;
margin: 16px 0;
padding: 10px 14px;
border-left: 2px solid var(--secondary);
background: var(--surface-alt);
color: var(--muted);
}
.entry-content code {
background: rgba(0, 0, 0, 0.24);
padding: 2px 6px;
border-radius: 6px;
font-size: 0.92rem;
background: var(--bar);
border: 1px solid var(--border);
padding: 0 4px;
font-size: 0.86rem;
}
.entry-content pre {
padding: 16px;
padding: 14px;
overflow-x: auto;
background: rgba(0, 0, 0, 0.24);
border-radius: 16px;
background: var(--bar);
border: 1px solid var(--border);
border-left: 2px solid var(--secondary);
font-size: 0.84rem;
line-height: 1.5;
}
.entry-content pre code {
background: transparent;
border: 0;
padding: 0;
}
.entry-empty {
text-align: center;
padding: 40px 18px;
padding: 36px 18px;
}
@media only screen and (max-width: 740pt) {
@media only screen and (max-width: 860px) {
.projects-hero,
.entry-shell,
.content-section {
padding: 22px;
.entry-shell {
padding: 18px;
}
.content-grid {
padding: 12px;
gap: 12px;
}
.section-heading {
flex-direction: column;
align-items: start;
gap: 6px;
}
}
.section-heading__right {
display: flex;
align-items: center;
gap: 10px;
}
.section-count {
font-size: 11px;
color: var(--muted);
}
.section-count::before {
content: "[ ";
color: var(--border-strong);
}
.section-count::after {
content: " ]";
color: var(--border-strong);
}
+504 -708
View File
File diff suppressed because it is too large. Load diff
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<rect width="32" height="32" fill="#0c0d10"/>
<path d="M7 10l6 6-6 6" fill="none" stroke="#eb5234" stroke-width="3" stroke-linecap="square"/>
<rect x="17" y="19" width="9" height="3" fill="#c9cdd6"/>
</svg>

After

Width:  |  Height:  |  Size: 274 B

+39 -12
View File
@@ -134,12 +134,12 @@
const renderLinks = (entry, className) => {
const links = [];
const sourceLabel = entry.github && entry.github.includes("git.sowinski.dev") ? "Gitea" : "GitHub";
const sourceLabel = entry.github && entry.github.includes("git.sowinski.dev") ? "gitea" : "github";
links.push(`<a class="${className} ${className}-primary" href="./entry.html?type=${encodeURIComponent(entry.type)}&slug=${encodeURIComponent(entry.slug)}">Read More</a>`);
links.push(`<a class="${className} ${className}-primary" href="./entry.html?type=${encodeURIComponent(entry.type)}&slug=${encodeURIComponent(entry.slug)}">details</a>`);
if (entry.demo) {
links.push(`<a class="${className}" href="${escapeHtml(entry.demo)}" target="_blank" rel="noopener noreferrer">Live</a>`);
links.push(`<a class="${className}" href="${escapeHtml(entry.demo)}" target="_blank" rel="noopener noreferrer">live</a>`);
} else if (entry.github) {
links.push(`<a class="${className}" href="${escapeHtml(entry.github)}" target="_blank" rel="noopener noreferrer">${sourceLabel}</a>`);
}
@@ -147,8 +147,21 @@
return `<div class="${className.replace("card-link", "card-links")}">${links.join("")}</div>`;
};
const statusState = (entry) => {
const status = String(entry.status || "").toLowerCase();
if (status.startsWith("active")) {
return "active";
}
if (entry.type === "updates") {
return "attention";
}
return "idle";
};
const createCard = (entry) => {
const formattedDate = formatDate(entry.date);
const featuredClass = entry.featured ? " featured" : "";
const anchorId = entry.slug ? ` id="${escapeHtml(entry.slug)}"` : "";
@@ -156,7 +169,8 @@
<article class="content-card${featuredClass}"${anchorId}>
<div class="card-meta">
<span class="card-kicker">${escapeHtml(entry.label || entry.type)}</span>
${formattedDate ? `<span class="card-date">${escapeHtml(formattedDate)}</span>` : ""}
${entry.date ? `<span class="card-date">${escapeHtml(entry.date)}</span>` : ""}
${entry.status ? `<span class="card-status" data-state="${statusState(entry)}">${escapeHtml(entry.status.toLowerCase())}</span>` : ""}
</div>
<h3>${escapeHtml(entry.title)}</h3>
<p class="card-summary">${escapeHtml(entry.summary || "")}</p>
@@ -166,6 +180,15 @@
`;
};
const setSectionCount = (countId, entries) => {
const element = document.getElementById(countId);
if (!element) {
return;
}
element.textContent = `${entries.length} ${entries.length === 1 ? "entry" : "entries"}`;
};
const renderSection = (containerId, entries, emptyMessage) => {
const container = document.getElementById(containerId);
if (!container) {
@@ -201,7 +224,7 @@
card.classList.toggle("is-hidden", !expanded && index >= defaultVisibleCount);
});
toggleButton.textContent = expanded ? "Show Fewer Projects" : "Show More Projects";
toggleButton.textContent = expanded ? "show fewer projects" : "show more projects";
toggleButton.setAttribute("aria-expanded", String(expanded));
};
@@ -255,8 +278,12 @@
const index = await getIndex();
const sortedProjects = [...(index.projects || [])].sort(compareByPriorityOrder);
renderSection("projects-grid", sortedProjects, "No projects added yet.");
setSectionCount("projects-count", sortedProjects);
initProjectsToggle(sortedProjects);
renderSection("updates-grid", [...(index.updates || [])].sort(compareByNewestDate), "No updates added yet.");
const sortedUpdates = [...(index.updates || [])].sort(compareByNewestDate);
renderSection("updates-grid", sortedUpdates, "No updates added yet.");
setSectionCount("updates-count", sortedUpdates);
} catch (error) {
renderSection("projects-grid", [], error.message);
renderSection("updates-grid", [], error.message);
@@ -279,7 +306,7 @@
<div class="entry-empty">
<p class="eyebrow">Not found</p>
<h1 class="entry-title">This entry could not be loaded.</h1>
<a class="entry-back" href="./projects.html">Back to projects</a>
<a class="entry-back" href="./projects.html">cd ../projects</a>
</div>
`;
return;
@@ -305,7 +332,7 @@
shell.innerHTML = `
<div class="entry-header">
<a class="entry-back" href="./projects.html">Back to projects</a>
<a class="entry-back" href="./projects.html">cd ../projects</a>
<div class="entry-meta">
<span class="entry-pill entry-pill-primary">${escapeHtml(entry.label || entry.type)}</span>
${entry.date ? `<span class="entry-pill entry-pill-secondary">${escapeHtml(formatDate(entry.date))}</span>` : ""}
@@ -315,8 +342,8 @@
<p class="entry-summary">${escapeHtml(entry.summary || "")}</p>
${renderTags(entry.tags || [], "entry-tag-list")}
<div class="entry-links">
${entry.demo ? `<a class="inline-button inline-button-primary" href="${escapeHtml(entry.demo)}" target="_blank" rel="noopener noreferrer">Live</a>` : ""}
${entry.github ? `<a class="inline-button" href="${escapeHtml(entry.github)}" target="_blank" rel="noopener noreferrer">${entry.github.includes("git.sowinski.dev") ? "Gitea" : "GitHub"}</a>` : ""}
${entry.demo ? `<a class="inline-button inline-button-primary" href="${escapeHtml(entry.demo)}" target="_blank" rel="noopener noreferrer">live</a>` : ""}
${entry.github ? `<a class="inline-button" href="${escapeHtml(entry.github)}" target="_blank" rel="noopener noreferrer">${entry.github.includes("git.sowinski.dev") ? "gitea" : "github"}</a>` : ""}
</div>
</div>
<article class="entry-content">
@@ -328,7 +355,7 @@
<div class="entry-empty">
<p class="eyebrow">Not found</p>
<h1 class="entry-title">${escapeHtml(error.message)}</h1>
<a class="entry-back" href="./projects.html">Back to projects</a>
<a class="entry-back" href="./projects.html">cd ../projects</a>
</div>
`;
}
+41 -41
View File
@@ -1,62 +1,62 @@
(function() {
const heroShell = document.querySelector(".hero-main .hero-shell");
const stream = document.querySelector(".term__stream");
if (!heroShell) {
if (!stream) {
return;
}
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const coarsePointer = window.matchMedia("(pointer: coarse)").matches;
if (prefersReducedMotion || coarsePointer) {
if (prefersReducedMotion) {
return;
}
let targetX = 0;
let targetY = 0;
let currentX = 0;
let currentY = 0;
const CHAR_DELAY = 18;
const AFTER_COMMAND_DELAY = 90;
const AFTER_OUTPUT_DELAY = 130;
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
// Build the playback script before hiding anything, so a thrown error here
// leaves the page in its fully rendered state.
const steps = Array.from(stream.children).map((element) => ({
element,
isCommand: element.classList.contains("cmd"),
text: element.textContent
}));
const animate = () => {
currentX += (targetX - currentX) * 0.065;
currentY += (targetY - currentY) * 0.065;
if (!steps.some((step) => step.isCommand)) {
return;
}
const bgX = 50 + currentX * 6.8;
const bgY = 18 + currentY * 5.6;
const bgXAlt = 50 - currentX * 5.2;
const bgYAlt = 30 - currentY * 4.6;
const glowRotate = currentX * 16 + currentY * 10;
const glowShiftX = currentX * 54;
const glowShiftY = currentY * 42;
steps.forEach((step) => {
if (step.isCommand) {
step.element.textContent = "";
return;
}
document.body.style.setProperty("--hero-glow-x", `${bgX}%`);
document.body.style.setProperty("--hero-glow-y", `${bgY}%`);
document.body.style.setProperty("--hero-glow-alt-x", `${bgXAlt}%`);
document.body.style.setProperty("--hero-glow-alt-y", `${bgYAlt}%`);
document.body.style.setProperty("--hero-glow-rotate", `${glowRotate}deg`);
document.body.style.setProperty("--hero-glow-shift-x", `${glowShiftX}px`);
document.body.style.setProperty("--hero-glow-shift-y", `${glowShiftY}px`);
step.element.classList.add("is-typing-hidden");
});
heroShell.style.setProperty("--hero-shell-spot-x", `${50 + currentX * 14}%`);
heroShell.style.setProperty("--hero-shell-spot-y", `${28 + currentY * 10}%`);
const wait = (ms) => new Promise((resolve) => window.setTimeout(resolve, ms));
requestAnimationFrame(animate);
const typeCommand = async (element, text) => {
for (let index = 0; index < text.length; index += 1) {
element.textContent = text.slice(0, index + 1);
await wait(CHAR_DELAY);
}
};
window.addEventListener("mousemove", (event) => {
const x = clamp((event.clientX / window.innerWidth - 0.5) * 2, -1, 1);
const y = clamp((event.clientY / window.innerHeight - 0.5) * 2, -1, 1);
const play = async () => {
for (const step of steps) {
if (step.isCommand) {
await typeCommand(step.element, step.text);
await wait(AFTER_COMMAND_DELAY);
continue;
}
targetX = x;
targetY = y;
});
step.element.classList.remove("is-typing-hidden");
await wait(AFTER_OUTPUT_DELAY);
}
};
window.addEventListener("mouseleave", () => {
targetX = 0;
targetY = 0;
});
requestAnimationFrame(animate);
play();
})();