Begin fleshing out docs template

Signed-off-by: lucperkins <lucperkins@gmail.com>
This commit is contained in:
lucperkins 2020-03-06 12:05:24 -08:00
parent 106c647e5e
commit 081f724b02
6 changed files with 38 additions and 10 deletions

View File

@ -154,4 +154,15 @@ $colors: mergeColorMaps(("secondary": ($secondary, $white)), $colors)
.section
&.has-extra-padding
padding: 6rem 2rem
padding: 6rem 2rem
=sticky
position: sticky
position: -webkit-sticky
.is-sticky
+sticky
top: $navbar-height + 2rem
.is-constrained
max-width: 80ch

View File

@ -6,6 +6,9 @@ pygmentsCodeFences = true
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
style = "manni"
[params]
grpc_release_tag = "v1.27.0"
grpc_release_tag_no_v = "1.27.0"

View File

@ -4,4 +4,6 @@
{{ define "main" }}
{{ partial "hero.html" . }}
{{ partial "nav.html" . }}
{{ partial "article.html" . }}
{{ end }}

View File

@ -0,0 +1,14 @@
<div class="container">
<div class="columns is-variable is-8">
<div class="column is-one-quarter">
<div class="is-sticky">
TOC
</div>
</div>
<div class="column">
{{ partial "content.html" (dict "content" .Content "constrained" true) }}
</div>
</div>
</div>

View File

@ -1,8 +1,5 @@
{{ $size := .size | default "normal" }}
<section class="section">
<div class="container">
<div class="content is-{{ $size }} has-bottom-padding">
{{ .content | markdownify }}
</div>
</div>
</section>
{{ $size := .size | default "normal" }}
{{ $constrained := .constrained | default false }}
<div class="content is-{{ $size }} has-bottom-padding{{ if $constrained }} is-constrained{{ end }}">
{{ .content }}
</div>

View File

@ -4,10 +4,11 @@
<div class="tabs is-medium is-toggle-rounded is-centered">
<ul>
{{ range $docsSections }}
{{ $title := .Title | upper }}
{{ $isCurrentSection := eq $currentSection .CurrentSection }}
<li{{ if $isCurrentSection }} class="is-active"{{ end }}>
<a href="{{ .RelPermalink }}">
{{ .Title }}
{{ $title }}
</a>
</li>
{{ end }}