1
Fork 0

Lower spacing on gist titles

This commit is contained in:
Jake Howard 2018-05-06 17:54:56 +01:00
parent bb973da8f3
commit e1a4b51ede
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 18 additions and 12 deletions

View file

@ -1,15 +1,17 @@
{{ $id := default (.Get 0) .Page.Params.gist }}
{{ $data := getJSON "https://api.github.com/gists/" $id }}
{{ range $i, $e := $data.files }}
<h5>
<a href="{{ $data.html_url }}#file-{{ $i }}">
<code class="font-weight-bold">{{ $i }}</code>
</a>
&nbsp;&nbsp;
<a href="{{ $e.raw_url }}">
<small class="font-italic">View Raw</small>
</a>
</h5>
{{ highlight $e.content $e.language "linenos=inline" }}
{{ end }}
<div class="gist">
{{ range $i, $e := $data.files }}
<h5 class="mb-0">
<a href="{{ $data.html_url }}#file-{{ $i }}">
<code class="font-weight-bold pl-2">{{ $i }}</code>
</a>
&nbsp;&nbsp;
<a href="{{ $e.raw_url }}">
<small class="font-italic">View Raw</small>
</a>
</h5>
{{ highlight $e.content $e.language "linenos=inline" }}
{{ end }}
</div>

View file

@ -188,6 +188,10 @@ ul ul, ol ol {
pre.chroma {
margin: $spacer 0;
padding: $spacer;
.highlight & {
margin-top: 0;
}
}
.content {