Skip to content

Commit

Permalink
Update layout to improve things a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo authored and XhmikosR committed Mar 18, 2021
1 parent 41ce90e commit 86b52ab
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions site/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{{ define "main" }}
<header class="py-5 border-bottom">
<div class="container pt-md-1 pb-md-4">
<h1 class="bd-title mt-0">{{ .Title | markdownify }}</h1>
<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
{{ if eq .Title "Examples" }}
<div class="d-flex flex-column flex-sm-row">
<a href="{{ .Site.Params.download.dist_examples }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download Examples');">Download examples</a>
<a href="{{ .Site.Params.download.source }}" class="btn btn-lg btn-outline-secondary mt-3 mt-sm-0 ms-sm-3" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
<div class="row g-5">
<div class="col-xl-8">
<h1 class="bd-title mt-0">{{ .Title | markdownify }}</h1>
<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
{{ if eq .Title "Examples" }}
<div class="d-flex flex-column flex-sm-row">
<a href="{{ .Site.Params.download.dist_examples }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download Examples');">Download examples</a>
<a href="{{ .Site.Params.download.source }}" class="btn btn-lg btn-outline-secondary mt-3 mt-sm-0 ms-sm-3" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
</div>
{{ end }}
</div>
<div class="col-xl-4 d-lg-flex justify-content-xl-end">
{{ partial "ads" . }}
</div>
</div>
{{ end }}
{{ partial "ads" . }}
</div>
</header>

Expand Down

0 comments on commit 86b52ab

Please sign in to comment.