From 2718d3d8893c06ec1406faef85087b283dc3287f Mon Sep 17 00:00:00 2001 From: Aarya Date: Thu, 19 Nov 2026 20:40:34 +0545 Subject: [PATCH] view project fixes --- assets/css/style.css | 436 ++++++++++++++++++++++++++++++++----------- view-project.php | 114 ++++++----- 2 files changed, 392 insertions(+), 158 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 87072c1..5ff1588 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -3996,7 +3996,7 @@ button { .cert-hero { position: relative; overflow: hidden; - padding: 50px 0 90px; + padding: 40px 0 40px; background: var(--cert-bg); } .cert-hero::after { @@ -6779,8 +6779,7 @@ button { transform: scale(1.04); } -.student-work .student-card__badge, -.project-detail .project-detail__badge { +.student-work .student-card__badge { display: inline-flex; align-items: center; padding: 6px 12px; @@ -6964,75 +6963,32 @@ button { line-height: 1.7; } -/* ---------- Detail page (view-project.php) ---------- */ +/* ============================================================ + VIEW PROJECT PAGE + ============================================================ */ + +/* ---------- Hero ---------- */ .project-detail { + --cert-bg: #0D0D0D; + --cert-white: var(--text); + --cert-muted: var(--muted); + --cert-red: var(--accent); background-color: var(--bg); + font-family: var(--font-main); } -.project-detail .section { - padding-block: 64px; -} - -.project-detail .section__head { - max-width: none; - margin-bottom: 26px; -} - -.project-detail .project-detail__hero .eyebrow, -.project-detail .project-detail__info .eyebrow, -.project-detail .section__head .eyebrow { - gap: 8px; - margin-bottom: 0; - color: var(--white); - font-size: 10px; - font-weight: 500; - line-height: 1.4; - letter-spacing: 0.15em; - text-transform: uppercase; -} - -.project-detail .eyebrow::before { - width: 14px; - height: 2px; - border-radius: 0; - background: var(--white); -} - -.project-detail .section__title { - margin: 14px 0 0; - color: var(--text); - font-size: clamp(26px, 3.4vw, 36px); - font-weight: 700; - line-height: 1.15; - letter-spacing: -0.01em; -} - -.project-detail .project-detail__missing { - padding-top: calc(var(--header-h) + 32px); -} - -.project-detail .project-detail__missing-inner { - max-width: 720px; -} - -.project-detail .project-detail__missing-inner .btn { - margin-top: 24px; -} - -.project-detail .project-detail__hero { - padding-top: calc(var(--header-h) - 8px); - padding-bottom: 48px; - border-bottom: 1px solid var(--border); - background-color: var(--bg-deep); +.project-detail a:focus-visible, +.project-detail button:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 3px; } .project-detail .project-detail__hero-inner { - max-width: 860px; - margin-bottom: 26px; + max-width: 760px; } -.project-detail .breadcrumb { - margin-bottom: 16px; +.project-detail .project-detail__breadcrumb { + margin-bottom: 22px; } .project-detail .breadcrumb__list { @@ -7040,6 +6996,9 @@ button { flex-wrap: wrap; align-items: center; gap: 8px; + margin: 0; + padding: 0; + list-style: none; color: var(--muted); font-size: 12px; line-height: 1.5; @@ -7058,6 +7017,7 @@ button { .project-detail .breadcrumb__item a { color: var(--muted); + text-decoration: none; transition: color var(--transition); } @@ -7069,61 +7029,127 @@ button { color: var(--text); } +.project-detail .project-detail__course { + display: block; + color: var(--accent); + font-size: 12px; + font-weight: 600; + line-height: 1.4; + letter-spacing: 0.08em; + text-transform: uppercase; +} + .project-detail .project-detail__title { margin-top: 14px; + color: var(--text); font-size: clamp(30px, 4.5vw, 46px); + font-weight: 700; line-height: 1.1; + letter-spacing: -0.02em; } .project-detail .project-detail__lead { - max-width: 720px; + max-width: 680px; margin-top: 16px; color: var(--muted); font-size: 15px; - line-height: 1.7; + line-height: 1.75; } -.project-detail .project-detail__media { - overflow: hidden; - border: 1px solid var(--border); - border-radius: var(--radius-md); - box-shadow: var(--shadow); +/* ---------- Layout ---------- */ +.project-detail .project-detail__missing { + padding-top: calc(var(--section-y) / 2); } -.project-detail .project-detail__media img { - width: 100%; - aspect-ratio: 16 / 9; - object-fit: cover; +.project-detail .project-detail__missing-inner { + max-width: 720px; +} + +.project-detail .project-detail__missing-inner .btn { + margin-top: 24px; } .project-detail .project-detail__grid { display: grid; - grid-template-columns: 1fr; + grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; } .project-detail .project-detail__main { display: flex; + min-width: 0; flex-direction: column; - gap: 30px; + gap: 24px; } +.project-detail .project-detail__block { + min-width: 0; + padding: 26px; +} + +.project-detail .project-detail__block-head { + margin-bottom: 18px; +} + +.project-detail .project-detail__block .eyebrow { + gap: 8px; + margin-bottom: 8px; + color: var(--accent); + font-size: 11px; +} + +.project-detail .project-detail__block .eyebrow::before { + width: 14px; + height: 2px; + border-radius: 0; + background: var(--accent); +} + +.project-detail .project-detail__block-title { + margin: 0; + color: var(--text); + font-size: 20px; + font-weight: 700; + line-height: 1.3; + letter-spacing: -0.015em; +} + + +/* ---------- Content blocks ---------- */ .project-detail .project-detail__disclaimer { + display: flex; + align-items: flex-start; + gap: 12px; padding: 14px 16px; border: 1px solid var(--border); - border-radius: var(--radius-sm); + border-radius: var(--radius); background-color: var(--surface); +} + +.project-detail .project-detail__disclaimer-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 28px; + height: 28px; + flex: none; + border-radius: 50%; + background-color: var(--accent-soft); + color: var(--accent); +} + +.project-detail .project-detail__disclaimer-icon .icon { + width: 14px; + height: 14px; +} + +.project-detail .project-detail__disclaimer p { color: var(--muted); font-size: 13px; line-height: 1.6; } -.project-detail .project-detail__block + .project-detail__block { - padding-top: 30px; - border-top: 1px solid var(--border); -} - .project-detail .project-detail__text { color: var(--muted); font-size: 15px; @@ -7140,7 +7166,7 @@ button { display: flex; align-items: flex-start; gap: 12px; - color: var(--text-muted); + color: var(--text); font-size: 15px; line-height: 1.7; } @@ -7153,7 +7179,7 @@ button { height: 28px; margin-top: 1px; flex: none; - border-radius: 8px; + border-radius: 50%; background-color: var(--accent-soft); color: var(--accent); } @@ -7163,6 +7189,8 @@ button { height: 14px; } + +/* ---------- Skills ---------- */ .project-detail .project-detail__skills { display: grid; grid-template-columns: 1fr; @@ -7171,6 +7199,7 @@ button { .project-detail .project-detail__skill { display: flex; + min-width: 0; align-items: center; gap: 14px; padding: 16px 18px; @@ -7183,8 +7212,8 @@ button { width: 40px; height: 40px; flex: none; - border-radius: 10px; - background-color: var(--float-icon-bg); + border-radius: 50%; + background-color: var(--accent-soft); color: var(--accent); } @@ -7200,6 +7229,7 @@ button { line-height: 1.4; } +/* ---------- Thinking cards ---------- */ .project-detail .project-detail__thinking-grid { display: grid; grid-template-columns: 1fr; @@ -7207,11 +7237,17 @@ button { } .project-detail .project-detail__thinking-card { - padding: 22px; + display: flex; + height: 100%; + flex-direction: column; + padding: 24px; } + +/* ---------- Sidebar ---------- */ .project-detail .project-detail__sidebar { display: flex; + min-width: 0; flex-direction: column; gap: 16px; } @@ -7221,7 +7257,7 @@ button { } .project-detail .project-detail__meta-title { - margin-bottom: 18px; + margin: 0; color: var(--text); font-size: 18px; font-weight: 600; @@ -7231,14 +7267,14 @@ button { .project-detail .project-detail__meta-list { display: flex; flex-direction: column; - gap: 16px; + gap: 14px; } .project-detail .project-detail__meta-item { display: flex; flex-direction: column; gap: 6px; - padding-top: 16px; + padding-top: 14px; border-top: 1px solid var(--border); } @@ -7273,7 +7309,7 @@ button { border: 1px solid var(--border); border-radius: var(--radius-pill); background-color: var(--surface); - color: var(--text-muted); + color: var(--text); font-size: 12px; line-height: 1.4; } @@ -7282,10 +7318,199 @@ button { width: 100%; } +/* ---------- More projects ---------- */ .project-detail .project-detail__more .section__head { margin-bottom: 32px; } +.project-detail .student-work__grid--more { + display: grid; + grid-template-columns: 1fr; + gap: 24px; +} + +.project-detail .student-work__grid--more .student-card { + display: flex; + height: 100%; + min-width: 0; + flex-direction: column; +} + +.project-detail .student-work__grid--more .student-card__media { + position: relative; + aspect-ratio: 16 / 10; + overflow: hidden; + background-color: var(--bg-alt); +} + +.project-detail .student-work__grid--more .student-card__img { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 0.6s ease; +} + +.project-detail .student-work__grid--more .student-card:hover .student-card__img { + transform: scale(1.04); +} + +.project-detail .student-work__grid--more .student-card__badge { + position: absolute; + top: 14px; + left: 14px; +} + +.project-detail .student-work__grid--more .student-card__body { + display: flex; + flex: 1; + flex-direction: column; + gap: 10px; + padding: 22px; +} + +.project-detail .student-work__grid--more .student-card__course { + color: var(--accent); + font-size: 11px; + font-weight: 600; + line-height: 1.4; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +.project-detail .student-work__grid--more .student-card__title { + color: var(--text); + font-size: 20px; + font-weight: 600; + line-height: 1.3; + letter-spacing: -0.015em; +} + +.project-detail .student-work__grid--more .student-card__desc { + color: var(--muted); + font-size: 14px; + line-height: 1.7; +} + +.project-detail .student-work__grid--more .student-card__meta { + color: var(--muted-2); + font-size: 13px; + line-height: 1.6; +} + +.project-detail .student-work__grid--more .student-card__skills { + color: var(--muted); + font-size: 13px; + font-weight: 500; + line-height: 1.6; +} + +.project-detail .student-work__grid--more .student-card__footer { + display: flex; + flex-direction: column; + gap: 14px; + margin-top: auto; + padding-top: 6px; +} + +.project-detail .student-work__grid--more .student-card__divider { + display: block; + width: 100%; + height: 1px; + background-color: var(--border); +} + +.project-detail .student-work__grid--more .student-card__link { + display: inline-flex; + align-items: center; + gap: 8px; + align-self: flex-end; + color: var(--text); + font-size: 14px; + font-weight: 500; + line-height: 1.4; + transition: color var(--transition); +} + +.project-detail .student-work__grid--more .student-card__link .icon { + width: 16px; + height: 16px; + transition: transform var(--transition); +} + +.project-detail .student-work__grid--more .student-card__link:hover { + color: var(--accent); +} + +.project-detail .student-work__grid--more .student-card__link:hover .icon { + transform: translateX(3px); +} + +/* ---------- Responsive ---------- */ +@media (min-width: 640px) { + .project-detail .project-detail__skills { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .project-detail .student-work__grid--more { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 768px) { + .project-detail .project-detail__thinking-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 980px) { + .project-detail .project-detail__grid { + grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); + gap: 40px; + } + + .project-detail .project-detail__thinking-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .project-detail .project-detail__sidebar { + position: sticky; + top: calc(var(--header-h) + 24px); + align-self: start; + } + + .project-detail .student-work__grid--more { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + +@media (max-width: 576px) { + .project-detail .project-detail__block, + .project-detail .project-detail__meta { + padding: 18px; + } + + .project-detail .student-work__grid--more .student-card__body { + padding: 18px; + } +} + +@media (prefers-reduced-motion: reduce) { + .project-detail *, + .project-detail *::before, + .project-detail *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } + + .project-detail .reveal { + opacity: 1; + transform: none; + } +} + + /* ---------- CTA ---------- */ .student-work .student-work__cta-note { margin-top: 18px; @@ -7300,20 +7525,17 @@ button { grid-template-columns: repeat(3, minmax(0, 1fr)); } - .student-work .student-work__grid, - .project-detail .project-detail__skills { + .student-work .student-work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } - .student-work .student-work__process-grid, - .project-detail .project-detail__thinking-grid { + .student-work .student-work__process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (min-width: 768px) { - .student-work .section, - .project-detail .section { + .student-work .section { padding-block: 72px; } @@ -7328,25 +7550,13 @@ button { gap: 40px; } - .student-work .student-work__process-grid, - .project-detail .project-detail__thinking-grid { + .student-work .student-work__process-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } - - .project-detail .project-detail__grid { - grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); - gap: 40px; - } - - .project-detail .project-detail__sidebar { - position: sticky; - top: calc(var(--header-h) + 24px); - } } @media (max-width: 576px) { - .student-work .section, - .project-detail .section { + .student-work .section { padding-block: 52px; } @@ -7361,9 +7571,7 @@ button { } .student-work .student-card__body, - .student-work .student-work__process-card, - .project-detail .project-detail__meta, - .project-detail .project-detail__thinking-card { + .student-work .student-work__process-card { padding: 18px; } } diff --git a/view-project.php b/view-project.php index a72a38f..56545bb 100644 --- a/view-project.php +++ b/view-project.php @@ -57,10 +57,35 @@ require __DIR__ . '/includes/header.php'; $skillIcons = !empty($currentProject['skill_icons']) && is_array($currentProject['skill_icons']) ? $currentProject['skill_icons'] : (!empty($currentProject['skills']) && is_array($currentProject['skills']) ? $currentProject['skills'] : []); + $skillIconMap = []; + if (is_array($skillIcons)) { + foreach ($skillIcons as $index => $skillIconEntry) { + if (!is_array($skillIconEntry)) { + continue; + } + $iconLabel = (string) ($skillIconEntry['label'] ?? ''); + if ($iconLabel === '') { + $iconLabel = (string) ($projectSkills[$index] ?? ''); + } + if ($iconLabel !== '') { + $skillIconMap[$iconLabel] = (string) ($skillIconEntry['icon'] ?? 'sparkles'); + } + } + } + $projectSkillItems = []; + foreach ($projectSkills as $skillLabel) { + if (isset($projectSkillItems[$skillLabel])) { + continue; + } + $projectSkillItems[$skillLabel] = [ + 'label' => $skillLabel, + 'icon' => $skillIconMap[$skillLabel] ?? 'sparkles', + ]; + } ?> -
+
- Placeholder project + + + -

+

-

+

- -
- <?= e($currentProject['alt'] ?? $currentProject['title']) ?> -
@@ -96,23 +114,26 @@ require __DIR__ . '/includes/header.php';
-

Editable placeholder – not an actual student achievement.

+
+ +

Editable placeholder – not an actual student achievement.

+
-
-
+
+
Project summary -

Overview

+

Overview

-
+
-
-
+
+
Student work -

What the students built

+

What the students built

    @@ -122,38 +143,31 @@ require __DIR__ . '/includes/header.php';
-
+ - -
-
+ +
+
Learning outcomes -

Skills learned

+

Skills learned

    - - +
  • - - + +
-
+ -
-
+
+
More than the final output -

Brief / Process / Reflection

+

Brief / Process / Reflection

@@ -178,13 +192,16 @@ require __DIR__ . '/includes/header.php';
-
+
@@ -278,6 +295,15 @@ require __DIR__ . '/includes/header.php'; })); } $skillsLine = implode(' · ', $skillsList); + $metaParts = []; + if ($student !== '') { + $metaParts[] = $student; + } + if ($batch !== '') { + $metaParts[] = $batch; + } + $metaParts[] = 'Editable placeholders – not an actual student achievement'; + $metaLine = implode(' · ', $metaParts); ?>
@@ -299,7 +325,7 @@ require __DIR__ . '/includes/header.php';

-

· · Editable placeholders – not an actual student achievement

+