Add semester-aware archive banner with required date and archive path validation#131
Add semester-aware archive banner with required date and archive path validation#131
Conversation
Agent-Logs-Url: https://github.com/berkeley-cdss/berkeley-class-site/sessions/b541e009-643e-4e51-a543-e291bb28f017 Co-authored-by: cycomachead <1505907+cycomachead@users.noreply.github.com>
Agent-Logs-Url: https://github.com/berkeley-cdss/berkeley-class-site/sessions/b541e009-643e-4e51-a543-e291bb28f017 Co-authored-by: cycomachead <1505907+cycomachead@users.noreply.github.com>
| left: 0; | ||
| z-index: 999; | ||
| padding: 0.75rem 1rem; | ||
| background-color: #d02670; |
There was a problem hiding this comment.
OK, this is wrong / should be a berkeley color, but otherwise... not bad!
There was a problem hiding this comment.
Updated in 178b839: the archive banner now uses a Berkeley color variable ($berkeley-rose-medium) instead of a hardcoded hex. Screenshot: https://github.com/user-attachments/assets/ae0d04e6-f5f5-431d-9ff7-d287ed242657
|
@pancakereport I'm just trying to keep messing around w/copilot and other tools, but I think this is a nearly complete solution to #122. Not tested, but the screenshot it attached (which, that is cool!) looks good and the good itself seems right. |
|
Agent-Logs-Url: https://github.com/berkeley-cdss/berkeley-class-site/sessions/3cf00aba-dd2e-446c-ba39-1db759bf2bf3 Co-authored-by: cycomachead <1505907+cycomachead@users.noreply.github.com>
Addressed in 178b839: Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Preliminaries
Summary
This change adds an automatic archive state for course sites: when today is outside the configured semester window, a full-width archive banner is shown at the top with a link to current offerings. It also makes semester dates and archive link configuration required and validated so banner behavior is deterministic.
Config contract (required semester window + archive path)
_config.ymlkeys:semester_start_date,semester_end_date(ISOYYYY-MM-DD), andclass_archive_path._config.ymlcomments forclass_archive_pathto explain usage, keep default/, and suggest/archive._plugins/config_validator.rbto validate:semester_start_date <= semester_end_dateclass_archive_pathmust be either:/, orArchive banner UI + behavior
_includes/header_custom.htmlwith hidden-by-default full-width banner.This site is archived. Please check: {url}class_archive_path.Styling
.archive-bannerstyles in_sass/custom/custom.scssfor fixed top placement, full width, and contrast-safe link styling.$berkeley-rose-medium) defined in_sass/berkeley/variables.scss.Tests
spec/jekyll/config_validator_spec.rbcoverage for:class_archive_pathclass_archive_path