From cb4081162b75508710f625b5b8dac0c48c813355 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Mon, 23 Jan 2023 09:41:20 -0800 Subject: template: Use a more fluid layout (#67) Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top. --- CHANGELOG.md | 4 +++- templates/index.html | 68 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f74dc58..31295a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -- No changes yet. +### Changed +- Use a fluid layout for the index page. + This renders better on narrow screens. [Unreleased]: https://github.com/uber-go/sally/compare/v1.2.0...HEAD diff --git a/templates/index.html b/templates/index.html index 317d403..3fc210c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,38 +3,48 @@ +
-
- - - - - - - - - - {{ range $key, $value := .Packages }} - {{ $importPath := printf "%v/%v" $.URL $key }} - {{ if ne $value.URL "" }} - {{ $importPath = printf "%v/%v" $value.URL $key }} - {{ end }} - - - - - - {{ end }} - -
PackageSourceDocumentation
{{ $importPath }} - {{ $value.Repo }} - - - Go Reference - -
+
+
Package
+
Source
+
Documentation
+ {{ range $key, $value := .Packages }} + {{ $importPath := printf "%v/%v" $.URL $key }} + {{ if ne $value.URL "" }} + {{ $importPath = printf "%v/%v" $value.URL $key }} + {{ end }} +
+
+
+ Package: + {{ $importPath }} +
+
+ Source: + {{ $value.Repo }} +
+
+ + Go Reference + +
+
+ {{ end }}
-- cgit v1.2.3