diff options
| author | Frederick Mixell <frederick.mixell@leftfieldlabs.com> | 2022-10-10 11:28:04 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-12-28 16:21:58 +0000 |
| commit | 7a2ed92457263fe7224b16741580ace014e9bacf (patch) | |
| tree | 9b6042c528ce36f49c619af5177b6d7526e077e2 /_content/site.tmpl | |
| parent | e686abea874ce867c9a5229aa5e81e81c111aa96 (diff) | |
| download | go-x-website-7a2ed92457263fe7224b16741580ace014e9bacf.tar.xz | |
_content: Sidebar template prop
- Adds desktop only sidebar options
- Turn on any doc template with "Sidebar" prop
- currently 2 sidebar choices "faq" or "bug"
Added to the following pages
- /doc/install
- /doc/faq
- /help
Video: https://drive.google.com/file/d/1MmZSvdqcmREeB5ZU0YXwuilFDsusmne1/view?usp=sharing
Change-Id: Ie106fdfeac464752789319aa87ffe0144dbc5c88
Reviewed-on: https://go-review.googlesource.com/c/website/+/441857
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to '_content/site.tmpl')
| -rw-r--r-- | _content/site.tmpl | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/_content/site.tmpl b/_content/site.tmpl index a0b63808..24c51657 100644 --- a/_content/site.tmpl +++ b/_content/site.tmpl @@ -413,7 +413,10 @@ {{define "doclayout"}} {{/* used from various subdirectory default.tmpl */}} <article class="Doc Article"> - +{{if .sidebar }} +<div class="Article-columns"> +<div class="Article-content"> +{{end}} {{if .title}} <h1>{{.title}}</h1> {{else if eq .layout "error"}} @@ -436,8 +439,62 @@ <div id="nav" class="TOC"></div> {{end}} + {{.Content}} +{{if .sidebar }} +</div> +{{if eq .sidebar "faq"}} +{{ faqsidebar .}} +{{else if eq .sidebar "bug"}} +{{ bugsidebar .}} +{{end}} +</div> +{{end}} </article> {{end}} + +{{define "bugsidebar"}} +<aside class="Sidebar"> + <h4>Report Issues</h4> + <p>If you spot bugs, mistakes, or inconsistencies in the Go project's code or documentation, please let us know by filing a ticket on our <a href="https://github.com/golang/go/issues">issue tracker.</a> Of course, you should check it's not an existing issue before creating a new one.</p> + <a class="btn" href="https://github.com/golang/go/issues">Filing a ticket</a> +</aside> +{{end}} + +{{define "faqsidebar"}} +<aside class="Sidebar Sidebar-faq"> + <h4>Release Notes</h4> + <p>Learn about what's new in each Go release.</p> + <a class="link" href="/doc/devel/release">View release notes</a> + + <h4>Code of Conduct</h4> + <p>Guidelines for participating in Go community spaces and reporting process for handing issues.</p> + <a class="link" href="/conduct">View more</a> + + <h4>Brand Guidelines</h4> + <p>Guidance about reusing the Go logo, gopher mascot, etc.</p> + <a class="link" href="/blog/go-brand">View guidelines</a> + + <h4>Contribute Guide</h4> + <p>Learn how to file bugs, pull requests, or otherwise contribute to the Go ecosystem.</p> + <a class="link" href="/doc/contribute">View guide</a> + + <h4>Get connected</h4> + <div class="Sidebar-socialLinks"> + <a href="https://twitter.com/golang" rel="noopener noreferrer" target="_blank"> + <img width="15" height="12" src="/images/icons/twitter.svg" aria-hidden="true" /> + </a> + <a href="https://www.reddit.com/r/golang/" rel="noopener noreferrer" target="_blank"> + <img width="16" height="16" src="/images/icons/reddit.svg" aria-hidden="true" /> + </a> + <a href="https://github.com/golang" rel="noopener noreferrer" target="_blank"> + <img width="16" height="16" src="/images/icons/github.svg" aria-hidden="true" /> + </a> + <a href="https://gophers.slack.com/" rel="noopener noreferrer" target="_blank"> + <img width="16" height="16" src="/images/icons/slack.svg" aria-hidden="true" /> + </a> + </div> +</aside> +{{end}} |
