diff --git a/.gitignore b/.gitignore index 184eff81..080debc2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Package.resolved **/*.docc/header.html **/*.docc/footer.html scripts/__pycache__/ +.playwright-cli/ diff --git a/.licenseignore b/.licenseignore index 1a6520c1..2b8601ab 100644 --- a/.licenseignore +++ b/.licenseignore @@ -1,4 +1,5 @@ **/*.gitkeep **/*.html +**/*.svg **/Package.swift common/README diff --git a/common/README b/common/README index cce65f4b..6ba140fd 100644 --- a/common/README +++ b/common/README @@ -8,9 +8,19 @@ The common files need to be copied, or perhaps linked, into each of the DocC cat Both files are intentionally minimal: -- `header.html` has no visible content. It's a reserved hook (DocC's - `custom-header` template) for a future documentation-version switcher — - add the switcher UI to the `#version-switcher` div when that lands. +- `header.html` uses DocC's `custom-header` template hook to add a Swift logo + linking to swift.org to the masthead, between the sidebar-toggle control + and the page title. It targets the masthead rather than the Navigator + sidebar because the sidebar gets torn down and rebuilt once its data + loads (discarding anything inserted into its loading-skeleton state), + while the masthead mounts once and stays. The logo is appended inside + `.pre-title` rather than inserted as a sibling before `.nav-title`, since + swift-docc-render positions the title via the adjacent-sibling CSS rule + `.pre-title + .nav-title`, which needs them to stay adjacent. Being part + of the masthead rather than the sidebar, it stays visible regardless of + the sidebar's shown/hidden/drawer state. It also still reserves the + `#version-switcher` div for a future documentation-version switcher — add + the switcher UI there when that lands. - `footer.html` carries the copyright/trademark notice, the same legal links (License, Security, Privacy Policy, Cookies) swift.org's footer has, and an Adobe Analytics page-activation snippet mirroring swift.org's diff --git a/common/header.html b/common/header.html index ef1d844f..e0096ef3 100644 --- a/common/header.html +++ b/common/header.html @@ -9,3 +9,64 @@ -->
+ + diff --git a/common/swift-logo-black.svg b/common/swift-logo-black.svg new file mode 100644 index 00000000..cf2cbb14 --- /dev/null +++ b/common/swift-logo-black.svg @@ -0,0 +1,42 @@ + + + diff --git a/common/swift-logo-color.svg b/common/swift-logo-color.svg new file mode 100644 index 00000000..8e8315cb --- /dev/null +++ b/common/swift-logo-color.svg @@ -0,0 +1,4 @@ + diff --git a/common/swift-logo-white.svg b/common/swift-logo-white.svg new file mode 100644 index 00000000..78122115 --- /dev/null +++ b/common/swift-logo-white.svg @@ -0,0 +1,42 @@ + + +