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

View file

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