-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1169 from chainguard-dev/improve-images-listing
Improving images listing in reference docs
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{ define "main" }} | ||
<div class="row flex-md-nowrap"> | ||
<div class="leftnav-container"> | ||
<div class="board-background leftnav"> | ||
<nav id="sidebar-default" aria-label="Main navigation"> | ||
{{ partial "sidebar/docs-menu.html" . }} | ||
</nav> | ||
{{ partial "sidebar/nav-bottom.html" }} | ||
</div> | ||
</div> | ||
<div class="row justify-content-center topic-container flex-shrink-1"> | ||
<article> | ||
<h1 class="text-center mb-5">{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}</h1> | ||
{{ if eq .Params.type "article" }} | ||
<div class="container"> | ||
<div class="row g-5 mb-5"> | ||
{{ $currentSection := .CurrentSection }} | ||
{{ range and | ||
(where .Site.RegularPages.ByTitle "Section" .Section) | ||
(where .Pages ".Params.unlisted" "!=" "true")}} | ||
{{ if in (.RelPermalink | string) $currentSection.RelPermalink }} | ||
<div class="col d-flex"> | ||
<div class="card flex-fill"> | ||
<div class="card-body d-flex flex-column"> | ||
<img src="https://storage.googleapis.com/chainguard-academy/logos/{{ .Params.linktitle }}/logo.svg"> | ||
<h5 class="card-title mt-0"> | ||
<a href="{{ .RelPermalink }}">{{ .Params.linktitle }}</a> | ||
</h5> | ||
<p class="card-text">{{ .Params.description }}</p> | ||
<div class="d-flex flex-fill align-items-end justify-content-between"> | ||
<a href="{{ .RelPermalink }}image_specs/" class="card-link">Variants</a> | ||
<a href="{{ .RelPermalink }}tags_history/" class="card-link">Tags</a> | ||
<a href="{{ .RelPermalink }}tags_history/" class="card-link">Provenance</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
</div> | ||
{{ else }} | ||
{{ range .Paginator.Pages }} | ||
<a class="docs-navigation-button docs-navigation-button-next" href="{{ .RelPermalink }}"> | ||
<span class="next-title">{{ .Title }}</span> | ||
<div class="chevron-rotator"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="15" viewBox="0 0 10 6" fill="none"> | ||
<path d="M1.06199 5.729L0.291992 4.938L4.99999 0.229004L9.70799 4.938L8.93799 5.729L4.99999 1.792L1.06199 5.729Z" fill="currentColor"/> | ||
</svg> | ||
</div> | ||
</a> | ||
{{ if .Description }} | ||
<div class="button-description">{{ .Description }}</div> | ||
{{ end }} | ||
{{ end }} | ||
{{ template "_internal/pagination.html" . }} | ||
{{ end }} | ||
</div> | ||
</article> | ||
</div> | ||
</div> | ||
{{ end }} |