Skip to main content

update-header-footer

Propagate a change to the site-wide top navigation or footer across every page of the SureAdhere site, keeping them identical and fixing the root-vs-subpage link paths. Use whenever editing the nav, logo, nav links, nav CTAs, or anything in the footer.

소스 정보

저장소
sureadhere/marketing
최근 소스 활동
2026년 6월 3일 20:45
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
update-header-footer
description
Propagate a change to the site-wide top navigation or footer across every page of the SureAdhere site, keeping them identical and fixing the root-vs-subpage link paths. Use whenever editing the nav, logo, nav links, nav CTAs, or anything in the footer.
# Update the header or footer across all pages The SureAdhere site has no templating, so the nav and footer are copied into every page. This skill makes a header/footer change once and applies it consistently everywhere. ## Pages that contain the shared nav and footer (10 total) **Root-level** (links use no prefix, e.g. `clinical-trials/index.html`, `assets/styles.css`): - `index.html` - `404.html` **Subpages** (links use `../`, e.g. `../clinical-trials/index.html`, `../assets/styles.css`): - `clinical-trials/index.html` - `public-health/index.html` - `behavioral-health/index.html` - `resources/index.html` - `publications/index.html` - `contact/index.html` - `privacy-policy/index.html` - `privacy-policy-chinese/index.html` **Do NOT touch:** `login/index.html` (a bare redirect with no nav or footer). ## How link paths differ between root and subpages When you copy a nav/footer block, internal links must match the page's depth: | Link target | Root pages (`index.html`, `404.html`) | Subpages | |---|---|---| | Home | `index.html` | `../index.html` | | A solution page | `clinical-trials/index.html` | `../clinical-trials/index.html` | | Contact | `contact/` | `../contact/` | | Stylesheet / images | `assets/...` | `../assets/...` | | External (`https://`, `mailto:`) | unchanged | unchanged | On a subpage, the nav link to **that same page** also carries `class="nav-active" aria-current="page"`. Only the four nav items have an active state: Clinical Trials, Public Health, Behavioral Health, Resources. The other subpages have no active nav item. ## Steps 1. **Make the change on `index.html` first.** Locate the block: - Nav: the `<div class="nav-wrap">` ... `</div>` block, just after `<body>`. - Footer: the `<footer>` ... `</footer>` block near the end. Edit it there to the desired new state, using root-style paths. 2. **Apply the same change to `404.html`** (also root-style paths, identical to `index.html`). 3. **Apply the same change to each of the 8 subpages.** Take the new block and: - Add `../` to every internal link and asset path. - On the subpage's own nav item, keep or add `class="nav-active" aria-current="page"`. 4. **Verify.** After editing: - Confirm the nav link set and footer link set are the same on every page; only the `../` prefix and the active item should differ. - Preview `index.html` and at least one subpage; check the nav and footer render and that links resolve. ## Verification commands Run from the site root to spot drift: ```bash # Count footers per page (every listed page should show exactly 1) for f in index.html 404.html clinical-trials/index.html public-health/index.html behavioral-health/index.html resources/index.html publications/index.html contact/index.html privacy-policy/index.html privacy-policy-chinese/index.html; do printf "%-36s footer:%s nav:%s\n" "$f" "$(grep -c '<footer' "$f")" "$(grep -c 'nav-wrap' "$f")"; done # Compare the nav links block between the homepage and a subpage grep -A6 'nav-links' index.html grep -A6 'nav-links' clinical-trials/index.html ``` If you changed a nav label or a footer link, also check the footer "Product" list (it mirrors the nav) and any in-page links pointing to that destination.
GitHub에서 보기