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

View File

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