diff --git a/_includes/new-includes/components/linux-releases.html b/_includes/new-includes/components/linux-releases.html index 1da22be14..e2a74562a 100644 --- a/_includes/new-includes/components/linux-releases.html +++ b/_includes/new-includes/components/linux-releases.html @@ -79,7 +79,7 @@

RPM

-

Development Snapshots

+

Development Snapshots

Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.

diff --git a/assets/javascripts/new-javascripts/application.js b/assets/javascripts/new-javascripts/application.js index 955afc964..334c1c7b1 100644 --- a/assets/javascripts/new-javascripts/application.js +++ b/assets/javascripts/new-javascripts/application.js @@ -112,3 +112,24 @@ if (codeBoxes.length) { }) }) } + +document.querySelectorAll('h2.header-with-anchor').forEach(header => { + if (!header.id) return; + + const link = document.createElement('a'); + link.href = `#${header.id}`; + link.title = `Permalink for ${header.textContent}`; + link.innerHTML = ` + `; + + header.appendChild(link); +}); \ No newline at end of file diff --git a/assets/stylesheets/new-stylesheets/_core.scss b/assets/stylesheets/new-stylesheets/_core.scss index bc42414e6..2d1825590 100644 --- a/assets/stylesheets/new-stylesheets/_core.scss +++ b/assets/stylesheets/new-stylesheets/_core.scss @@ -57,3 +57,24 @@ code { serif; font-weight: 400; } + +.header-with-anchor { + scroll-margin-top: 80px; + + a { + display: none; + margin-left: 0.2em; + + svg { + filter: var(--icon-filter); + } + } +} + +h2.header-with-anchor { + &:hover { + a { + display: inline-block; + } + } +} \ No newline at end of file diff --git a/assets/stylesheets/new-stylesheets/_themes.scss b/assets/stylesheets/new-stylesheets/_themes.scss index 715d4faa9..1f86fe675 100644 --- a/assets/stylesheets/new-stylesheets/_themes.scss +++ b/assets/stylesheets/new-stylesheets/_themes.scss @@ -24,6 +24,9 @@ --exception-page-bg: #fac685; + --icon-filter: none; + --icon-filter-hover: invert(1); + --install-page-bg: linear-gradient(0deg, #f6b391 0%, #f8ce6e 92%); --install-site-code-box-bg: #ffffff; --install-site-code-box-pre-bg: #f2f2f2; @@ -128,6 +131,9 @@ --exception-page-bg: #23344a; + --icon-filter: invert(1); + --icon-filter-hover: none; + --install-page-bg: linear-gradient(0deg, #ff8115 0%, #b7451b 92%); --install-site-code-box-bg: #23344a; --install-site-code-box-pre-bg: #111727; diff --git a/documentation/index.md b/documentation/index.md index 761c52b98..b9403513a 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -11,9 +11,7 @@ If you are new to Swift, you may want to check out these additional resources. {%- for category in site.data.documentation %} -

- {{ category.header }} -

+## {{ category.header }}
{%- for entry in category.pages %}
diff --git a/install/linux/index.md b/install/linux/index.md index 9afddbde0..551c0813e 100644 --- a/install/linux/index.md +++ b/install/linux/index.md @@ -26,7 +26,7 @@ title: Install Swift - Linux {% include new-includes/components/code-box.html content = site.data.new-data.install.windows.releases.latest-release.vscode%}
-

Development Snapshots

+

Development Snapshots

Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.

diff --git a/install/macos/index.md b/install/macos/index.md index 09f4a1677..00c168dd0 100644 --- a/install/macos/index.md +++ b/install/macos/index.md @@ -50,7 +50,7 @@ title: Install Swift - macOS -

Development Snapshots

+

Development Snapshots

Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.

The easiest way to install development snapshots is with the Swiftly tool. Read more on the instructions page.

diff --git a/install/windows/index.md b/install/windows/index.md index aaa390bb4..7d72d6291 100644 --- a/install/windows/index.md +++ b/install/windows/index.md @@ -23,7 +23,7 @@ title: Install Swift - Windows {% include new-includes/components/code-box.html content = site.data.new-data.install.windows.releases.latest-release.vscode%}
-

Alternative install options

+

Alternative install options

@@ -61,7 +61,7 @@ title: Install Swift - Windows
-

Previous Releases

+

Previous Releases

Previous releases of Swift are available for installation on Windows using the manual installer, as documented here.

@@ -73,7 +73,7 @@ title: Install Swift - Windows -

Development Snapshots

+

Development Snapshots

Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.