From 53bccdd9efeced4da604bf5324425cc035df3ae2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 9 Oct 2026 15:20:55 +0200 Subject: [PATCH] A "Fork me on GitHub" ribbon instead of the nav bar's GitHub button; drop the hero's Browse the source From the landing kit (logos/landing-kit, go-fileshare's sheet): the ribbon links to github.com/go-ndarray/ndarray. The playground page keeps its nav bar button, since a corner ribbon would cover the canvas. Co-Authored-By: Claude Opus 5.5 (1M context) --- layouts/index.html | 3 +-- layouts/partials/fork-ribbon.html | 5 +++++ layouts/partials/styles.html | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/fork-ribbon.html diff --git a/layouts/index.html b/layouts/index.html index ecdf8ed..ba34514 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,8 +13,8 @@ go-ndarray logo go-ndarray {{ partial "theme-toggle.html" . }} - {{ partial "icons/github.html" . }}GitHub + {{ partial "fork-ribbon.html" "https://github.com/go-ndarray/ndarray" }}
@@ -22,7 +22,6 @@

NumPy-style n-dimensional arrays in pure Go.
go-ndarray is the numpy equivalent for Go: a float64 n-dimensional array with creation routines, strided views that share data, broadcasting elementwise ops and ufuncs, reductions (incl. arg / cumulative / clip / where), manipulation, and linear algebra (a panel-packed, cache-blocked GEMM) — all in pure Go, with cgo disabled.

{{ len .Site.Params.families }} API families, NumPy's names6 SIMD targetsCGO=0 no BLAS shim

diff --git a/layouts/partials/fork-ribbon.html b/layouts/partials/fork-ribbon.html new file mode 100644 index 0000000..3ef81c6 --- /dev/null +++ b/layouts/partials/fork-ribbon.html @@ -0,0 +1,5 @@ +{{/* The "Fork me on GitHub" corner ribbon (github.blog, 2008), drawn in CSS + with the brand gradient instead of the original PNGs, so it follows the + theme. It replaces the nav bar's GitHub button. Called with the + repository URL: {{ partial "fork-ribbon.html" "https://github.com/o/r" }} */}} + diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html index 3499b6a..becc672 100644 --- a/layouts/partials/styles.html +++ b/layouts/partials/styles.html @@ -115,6 +115,17 @@ .btn-primary:hover{transform:translateY(-1px)} .btn.btn-ghost{border-color:var(--line);color:var(--ink);background:var(--surface-2)} .btn-ghost:hover{border-color:var(--ghost-border-hover)} + {{/* The fork ribbon sits over the page's top-right corner and scrolls away + with the page; the nav bar keeps clear of it until the window is wide + enough for the 1120px column to stop short of the corner. */}} + .fork-ribbon{position:absolute;top:0;right:0;width:150px;height:150px;overflow:hidden;z-index:30;pointer-events:none} + .fork-ribbon a{position:absolute;top:48px;right:-36px;width:200px;padding:7px 0;transform:rotate(45deg); + background:var(--grad);color:#fff;text-align:center;font-weight:700;font-size:13px;letter-spacing:.02em; + box-shadow:0 4px 12px -4px rgba(0,0,0,.45);outline:1px dashed rgba(255,255,255,.55);outline-offset:-4px;pointer-events:auto} + .fork-ribbon a:hover{filter:brightness(1.08)} + .fork-ribbon a:focus-visible{outline:2px solid #fff;outline-offset:-4px} + @media(max-width:1420px){.nav .wrap{padding-right:112px}} + @media(max-width:600px){.fork-ribbon{width:112px;height:112px}.fork-ribbon a{top:34px;right:-52px;font-size:11px;padding:5px 0}.nav .wrap{padding-right:84px}} /* hero */ .hero{padding:74px 0 30px;background: radial-gradient(900px 380px at 78% -8%,{{ $wash | safeCSS }},transparent 60%),