Reclaim doc-page hero section real estate (#420)

Closes #418
This commit is contained in:
Patrice Chalin 2020-09-25 15:16:26 -04:00 committed by GitHub
parent 0ba07a5c61
commit 5ea080749d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 23 deletions

View File

@ -33,7 +33,7 @@ $secondary-dark: darken($secondary, 15%)
$link: $secondary-dark
$code: $primary
$code-background: $white-bis
$section-padding: 3rem 1.5rem
$section-padding: 1.5rem
//$input-color: $white
//$input-background-color: lighten($primary, 10%)
//$input-border-color: lighten($primary, 10%)
@ -323,3 +323,6 @@ a > .fa-external-link-alt::before
.hero__author, .hero__blurb
a
@extend .has-text-secondary
.page-github-buttons
float: right

View File

@ -1,4 +1,3 @@
{{ $title := .Title }}
{{ $desc := .Params.description }}
{{ $source := printf "https://github.com/grpc/grpc.io/tree/%s/content/%s" $.Site.Params.branch .File.Path }}
<section class="section">
@ -13,32 +12,23 @@
<div class="hero-body">
<div class="container">
<p class="title is-size-2 is-size-3-mobile has-text-primary has-text-weight-bold{{ if $desc }} is-spaced{{ end }}">
{{ .Title }}
</p>
{{ with $desc }}
<p class="subtitle is-size-4 is-size-5-mobile has-text-grey has-text-weight-medium">
{{ . }}
</p>
{{ end }}
<br />
<div class="buttons are-small">
<a class="button is-outlined" href="{{ $source }}" target="_blank">
<span class="icon">
{{- .Title -}}
<span class="buttons page-github-buttons">
<a class="button is-white" href="{{$source}}" title="View page source" target="_blank">
<i class="fab fa-github"></i>
</span>
<span>
Source
</span>
</a>
</div>
</a>
</span>
</p>
{{ with $desc -}}
<p class="subtitle is-size-4 is-size-5-mobile has-text-grey">
{{- . -}}
</p>
{{ end -}}
</div>
</div>
</section>
<section class="section">
<div class="container">
{{ partial "content.html" (dict "content" .Content "constrained" true) }}