Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
The landing page for [go-widgets](https://github.com/go-widgets), built with
Hugo and deployed by GitHub Actions to <https://go-widgets.github.io/>.

It is laid out like the [go-fileshare](https://go-fileshare.github.io/) and
[go-authn](https://go-authn.github.io/) landings. `layouts/partials/styles.html`
is the same file as theirs, byte for byte: it takes its colours from
It is laid out like the [go-fileshare](https://go-fileshare.github.io/) landing,
with the "Fork me on GitHub" ribbon of [go-ndarray](https://go-ndarray.github.io/)
in place of the GitHub buttons. `layouts/partials/styles.html` and
`layouts/partials/fork-ribbon.html` are go-ndarray's files, byte for byte (its
stylesheet is go-fileshare's plus the ribbon): it takes its colours from
`[params.brand]` in `hugo.toml`, and only those values differ (go-widgets'
teal, from [go-widgets/brand](https://github.com/go-widgets/brand)). Fix the
stylesheet in one org, copy it to the others unchanged.
Expand All @@ -25,6 +27,7 @@ Hugo output while the workflow reports success.
|---|---|
| `layouts/index.html` | the page |
| `layouts/partials/styles.html` | the shared stylesheet and theme toggle script |
| `layouts/partials/fork-ribbon.html` | the corner ribbon, linking `go-widgets/toolkit` |
| `layouts/partials/icons/` | Octicons (MIT, `OCTICONS-LICENSE`), copied verbatim |
| `hugo.toml` | `[params.brand]`, one `[[params.modules]]` per module, one `[[params.surfaces]]` per surface |

Expand Down
3 changes: 1 addition & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<a class="brand" href="/"><img class="glyph" src="/img/logo.svg" width="32" height="32" alt="go-widgets logo"> go-widgets</a>
<nav><a href="#why">Why</a><a href="#surfaces">Surfaces</a><a href="#eco">Modules</a></nav>
{{ partial "theme-toggle.html" . }}
<a class="btn btn-ghost" href="https://github.com/go-widgets">{{ partial "icons/github.html" . }}GitHub</a>
</div></header>
{{ partial "fork-ribbon.html" "https://github.com/go-widgets/toolkit" }}

<div class="hero"><div class="wrap">
<div>
Expand All @@ -23,7 +23,6 @@ <h1 class="head">One widget tree,<br><span class="accent">every surface.</span><
<div class="cta">
<a class="btn btn-primary" href="https://go-widgets.github.io/docs/">{{ partial "icons/book.html" . }}Read the documentation →</a>
<a class="btn btn-ghost" href="https://go-widgets.github.io/gallery/">{{ partial "icons/play.html" . }}Try the live gallery</a>
<a class="btn btn-ghost" href="https://github.com/go-widgets/toolkit">{{ partial "icons/github.html" . }}Browse the source</a>
</div>
<div class="trust"><span><b>160</b> widget types</span><span><b>7</b> window back-ends, one <code>Open</code></span><span><b>CGO=0</b> on every target</span></div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/fork-ribbon.html
Original file line number Diff line number Diff line change
@@ -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" }} */}}
<div class="fork-ribbon"><a href="{{ . }}" aria-label="Fork me on GitHub">Fork me on GitHub</a></div>
11 changes: 11 additions & 0 deletions layouts/partials/styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -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%),
Expand Down
Loading