diff --git a/docs/assets/legacy-catalog-banner-screenshot.png b/docs/assets/legacy-catalog-banner-screenshot.png new file mode 100644 index 0000000..804c923 Binary files /dev/null and b/docs/assets/legacy-catalog-banner-screenshot.png differ diff --git a/docs/index.html b/docs/index.html index 7ebec99..8987682 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,9 +7,23 @@ - + + + +
@@ -112,7 +126,7 @@

@@ -125,6 +139,6 @@

- + diff --git a/docs/styles.css b/docs/styles.css index ed7be59..75c14e0 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -61,6 +61,94 @@ body { flex-direction: column; } +/* Deprecated legacy catalog banner (archived agentic-collections Pages site) */ +.legacy-catalog-banner { + position: sticky; + top: 0; + z-index: 2000; + background: linear-gradient(90deg, #3d0000 0%, #c9190b 45%, #a30000 100%); + color: #fff; + border-bottom: 4px solid #ffcc00; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28); +} + +.legacy-catalog-banner-inner { + max-width: 72rem; + margin: 0 auto; + padding: 1.25rem 1.5rem; + text-align: center; +} + +.legacy-catalog-banner-kicker { + font-size: 0.8rem; + font-weight: 700; + letter-spacing: 0.14em; + text-transform: uppercase; + color: #ffeb99; + margin-bottom: 0.4rem; +} + +.legacy-catalog-banner-title { + font-family: var(--font-heading); + font-size: clamp(1.15rem, 2.8vw, 1.65rem); + font-weight: 700; + line-height: 1.35; + margin-bottom: 0.5rem; +} + +.legacy-catalog-banner-title a { + color: #fff; + text-decoration: underline; + text-underline-offset: 0.15em; +} + +.legacy-catalog-banner-body { + font-size: 1rem; + margin-bottom: 0.85rem; + color: rgba(255, 255, 255, 0.95); +} + +.legacy-catalog-banner-links { + list-style: none; + margin: 0 0 1rem; + padding: 0; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.75rem 1.25rem; +} + +.legacy-catalog-banner-links a { + color: #fff; + text-decoration: underline; + text-underline-offset: 0.15em; +} + +.legacy-catalog-banner-links a:hover { + color: #ffeb99; +} + +.legacy-catalog-banner-cta { + margin: 0; +} + +.legacy-catalog-banner-cta a { + display: inline-block; + background: #fff; + color: #a30000; + font-weight: 700; + padding: 0.65rem 1.35rem; + border-radius: var(--radius); + text-decoration: none; + font-size: 1.05rem; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); +} + +.legacy-catalog-banner-cta a:hover { + background: #ffeb99; + color: #3d0000; +} + /* Standalone collection pages (no catalog header): Red Hat top bar */ .site-brand-accent { height: 3px; diff --git a/scripts/build_website.py b/scripts/build_website.py index b8c8e95..bc5d1a6 100644 --- a/scripts/build_website.py +++ b/scripts/build_website.py @@ -12,6 +12,7 @@ # Import our data generators from catalog_site_bundle import bundle_catalog_for_site from eval_site_enrichment import apply_eval_enrichment +from catalog_legacy_banner import sync_index_banner from generate_collection_pages import generate_collection_pages from generate_pack_data import generate_pack_data from generate_mcp_data import generate_mcp_data @@ -55,6 +56,8 @@ def build_website(): pack_data = generate_pack_data() root = Path(__file__).resolve().parent.parent + docs_dir = Path('docs') + docs_dir.mkdir(exist_ok=True) # Merge pack icons and optional resolved collection catalog (for Pages UI) for pack in pack_data: @@ -91,6 +94,13 @@ def build_website(): print(f"✅ Generated {page_count} pages in docs/collections/") print() + print("⚠️ Syncing legacy catalog deprecation banner...") + if sync_index_banner(docs_dir / "index.html"): + print("✅ Updated docs/index.html with legacy catalog banner") + else: + print("ℹ️ docs/index.html banner already current or marker missing") + print() + # Combine into final output output = { 'repository': { @@ -104,9 +114,7 @@ def build_website(): 'generated_at': datetime.now(timezone.utc).isoformat() } - # Ensure docs directory exists - docs_dir = Path('docs') - docs_dir.mkdir(exist_ok=True) + # Ensure docs directory exists (mkdir at start of build_website) # Write data.json output_file = docs_dir / 'data.json' diff --git a/scripts/catalog_legacy_banner.py b/scripts/catalog_legacy_banner.py new file mode 100644 index 0000000..138f21a --- /dev/null +++ b/scripts/catalog_legacy_banner.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +"""Shared HTML for the deprecated legacy catalog site banner.""" + +from __future__ import annotations + +import html +import re +from pathlib import Path + +ARCHIVED_REPO_URL = "https://github.com/RHEcosystemAppEng/agentic-collections" +CURRENT_CATALOG_SITE_URL = "https://rhecosystemappeng.github.io/agentic-collections-catalog/" +CURRENT_CATALOG_REPO_URL = "https://github.com/RHEcosystemAppEng/agentic-collections-catalog" +CURRENT_SKILLS_REPO_URL = "https://github.com/RHEcosystemAppEng/agentic-collections-skills" + +BANNER_MARKER_START = "" +BANNER_MARKER_END = "" + + +def render_legacy_catalog_banner() -> str: + """Return a prominent deprecation banner for archived catalog Pages.""" + archived = html.escape(ARCHIVED_REPO_URL, quote=True) + catalog_site = html.escape(CURRENT_CATALOG_SITE_URL, quote=True) + catalog_repo = html.escape(CURRENT_CATALOG_REPO_URL, quote=True) + skills = html.escape(CURRENT_SKILLS_REPO_URL, quote=True) + + return f"""""" + + +def wrap_banner_markers(fragment: str) -> str: + return f"{BANNER_MARKER_START}\n{fragment}\n{BANNER_MARKER_END}" + + +def sync_index_banner(index_path: Path) -> bool: + """Insert or refresh the legacy banner block in docs/index.html.""" + if not index_path.is_file(): + return False + + content = index_path.read_text(encoding="utf-8") + wrapped = wrap_banner_markers(render_legacy_catalog_banner()) + pattern = re.compile( + re.escape(BANNER_MARKER_START) + r".*?" + re.escape(BANNER_MARKER_END), + re.DOTALL, + ) + + if pattern.search(content): + updated = pattern.sub(wrapped, content, count=1) + elif "legacy-catalog-banner" in content: + return False + elif "" in content: + updated = content.replace("", f"\n {wrapped}", 1) + else: + return False + + if updated != content: + index_path.write_text(updated, encoding="utf-8") + return True + return False diff --git a/scripts/generate_collection_pages.py b/scripts/generate_collection_pages.py index 10cf0a0..053ce6a 100644 --- a/scripts/generate_collection_pages.py +++ b/scripts/generate_collection_pages.py @@ -16,7 +16,10 @@ import markdown +from catalog_legacy_banner import render_legacy_catalog_banner + REPO_ROOT = Path(__file__).resolve().parent.parent +STYLES_VERSION = "74" def md_to_html(text: Any) -> str: @@ -638,6 +641,8 @@ def render_collection_page(pack: Dict[str, Any], mcp_data: List[Dict[str, Any]]) license_nav_href = "https://github.com/RHEcosystemAppEng/agentic-collections/blob/main/LICENSE" license_nav_href_esc = html.escape(license_nav_href, quote=True) + legacy_banner = render_legacy_catalog_banner() + return f""" @@ -647,9 +652,10 @@ def render_collection_page(pack: Dict[str, Any], mcp_data: List[Dict[str, Any]]) - + + {legacy_banner}
@@ -694,7 +700,7 @@ def render_collection_page(pack: Dict[str, Any], mcp_data: List[Dict[str, Any]])
- + """