From 81ff1dcaed3bac5e403f3b52272f5cf1864fde88 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 8 Oct 2026 09:54:40 +0200 Subject: [PATCH] Icons on the buttons, saying what each one does Every button now carries an Octicons glyph chosen by what it does: GitHub's mark for GitHub, a book for documentation and references, a rocket for getting started, a graph for benchmarks, a package for modules, a globe for a live demo, and an external-link arrow otherwise. The glyphs come from primer/octicons @primer/octicons-react@19.40.0, copied verbatim and not redrawn. Their MIT licence travels in layouts/partials/icons/OCTICONS-LICENSE. They are drawn in currentColor, so they follow the button in light and dark, and they are aria-hidden, since the text already says where each button leads. One CSS rule beside .btn aligns them. Co-Authored-By: Claude Opus 5.5 (1M context) --- layouts/index.html | 6 +++--- layouts/partials/icons/OCTICONS-LICENSE | 21 +++++++++++++++++++++ layouts/partials/icons/book.html | 5 +++++ layouts/partials/icons/link-external.html | 5 +++++ layouts/partials/icons/mark-github.html | 5 +++++ layouts/partials/styles.html | 1 + 6 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 layouts/partials/icons/OCTICONS-LICENSE create mode 100644 layouts/partials/icons/book.html create mode 100644 layouts/partials/icons/link-external.html create mode 100644 layouts/partials/icons/mark-github.html diff --git a/layouts/index.html b/layouts/index.html index ee7f446..eb8dec8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -34,8 +34,8 @@

The whole of PDF
in Go, with no C anywhere.

Read a file, write one, rearrange it, draw it, read it back as words and pictures, and edit it with other people — in a browser tab if you like, since every one of these builds for js/wasm. Fonts are parsed and shaped by go-opentype, pages are rasterised by go-gfx. Pure Go, CGO_ENABLED=0. BSD-3-Clause.

{{/* ⛔ DERIVED. A count typed beside the data it counts is right the day it is typed and has no way of staying right; the repository total @@ -145,7 +145,7 @@

A subset, an encoding, and text you can still copy.

100 % statement coverage, including the branches that report a bad file.

And it runs on {{ len .Site.Params.arches }} architectures, not merely compiles for them. Pure Go, cgo disabled, BSD-3-Clause.

- Read the source on GitHub → + {{ partial "icons/mark-github.html" . }}Read the source on GitHub →
diff --git a/layouts/partials/icons/OCTICONS-LICENSE b/layouts/partials/icons/OCTICONS-LICENSE new file mode 100644 index 0000000..aa1fa80 --- /dev/null +++ b/layouts/partials/icons/OCTICONS-LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/layouts/partials/icons/book.html b/layouts/partials/icons/book.html new file mode 100644 index 0000000..cf1e882 --- /dev/null +++ b/layouts/partials/icons/book.html @@ -0,0 +1,5 @@ +{{- /* Octicons "book" (16 px), primer/octicons @primer/octicons-react@19.40.0, copied verbatim, MIT, + (c) GitHub Inc.: the licence is OCTICONS-LICENSE beside this file. + currentColor follows the button in light and dark; aria-hidden, since + the button's text already says where it leads. */ -}} + \ No newline at end of file diff --git a/layouts/partials/icons/link-external.html b/layouts/partials/icons/link-external.html new file mode 100644 index 0000000..aa35a98 --- /dev/null +++ b/layouts/partials/icons/link-external.html @@ -0,0 +1,5 @@ +{{- /* Octicons "link-external" (16 px), primer/octicons @primer/octicons-react@19.40.0, copied verbatim, MIT, + (c) GitHub Inc.: the licence is OCTICONS-LICENSE beside this file. + currentColor follows the button in light and dark; aria-hidden, since + the button's text already says where it leads. */ -}} + \ No newline at end of file diff --git a/layouts/partials/icons/mark-github.html b/layouts/partials/icons/mark-github.html new file mode 100644 index 0000000..17fc355 --- /dev/null +++ b/layouts/partials/icons/mark-github.html @@ -0,0 +1,5 @@ +{{- /* Octicons "mark-github" (16 px), primer/octicons @primer/octicons-react@19.40.0, copied verbatim, MIT, + (c) GitHub Inc.: the licence is OCTICONS-LICENSE beside this file. + currentColor follows the button in light and dark; aria-hidden, since + the button's text already says where it leads. */ -}} + \ No newline at end of file diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html index d50c2a8..3499b6a 100644 --- a/layouts/partials/styles.html +++ b/layouts/partials/styles.html @@ -104,6 +104,7 @@ .theme-toggle:hover{border-color:var(--ghost-border-hover)} .btn{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;padding:11px 18px; border-radius:12px;border:1px solid transparent;transition:.15s} + .btn .icon{flex:none} {{/* ⛔ `.btn.btn-primary`, not `.btn-primary`. Further down this file sits `.lm a{color:inherit}`, and `.lm a` is a class AND an element -- (0,1,1) -- which BEATS a single class. So the primary button, which is an ,