style: improve consistency if Hugo --minify used

This commit is contained in:
George Cushen committed 2019-06-02 23:19:57 +01:00
1 parent 07d94380f2
commit 63953ab3d4
3 files changed
+10 -17

No files matched your search

+5 -4
View File
@@ -280,7 +280,7 @@
function printLatestRelease(selector, repo) {
$.getJSON('https://api.github.com/repos/' + repo + '/tags').done(function (json) {
let release = json[0];
$(selector).append(release.name);
$(selector).append(' '+release.name);
}).fail(function( jqxhr, textStatus, error ) {
let err = textStatus + ", " + error;
console.log( "Request Failed: " + err );
@@ -520,9 +520,10 @@
// Initialise Google Maps if necessary.
initMap();
// Print latest Academic version if necessary.
if ($('#academic-release').length > 0)
printLatestRelease('#academic-release', $('#academic-release').data('repo'));
// Print latest version of GitHub projects.
let githubReleaseSelector = '.js-github-release';
if ($(githubReleaseSelector).length > 0)
printLatestRelease(githubReleaseSelector, $(githubReleaseSelector).data('repo'));
// On search icon click toggle search dialog.
$('.js-search').click(function(e) {
+4 -12
View File
@@ -28,18 +28,14 @@
{{ if .HasChildren }}
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true">
{{ .Pre }}
<span>{{ .Name | safeHTML }}</span>
{{ .Post }}
{{- .Pre -}}<span>{{ .Name | safeHTML }}</span>{{- .Post -}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{{ range .Children }}
<li class="dropdown-item my-0 py-0 mx-0 px-0">
<a href="{{ .URL | relLangURL }}"{{ if $.IsHome }} data-target="{{ .URL }}"{{ end }}>
{{ .Pre }}
<span>{{ .Name | safeHTML }}</span>
{{ .Post }}
{{- .Pre -}}<span>{{ .Name | safeHTML }}</span>{{- .Post -}}
</a>
</li>
{{ end }}
@@ -72,9 +68,7 @@
<li class="nav-item">
<a class="nav-link {{if $is_link_in_current_path }} active{{end}}" href="{{.URL | relLangURL}}"{{ if and $is_widget_page $is_same_page }} data-target="{{$hash}}"{{ end }}{{ ($.Scratch.Get "target") | safeHTMLAttr }}>
{{ .Pre }}
<span>{{ .Name | safeHTML }}</span>
{{ .Post }}
{{- .Pre -}}<span>{{ .Name | safeHTML }}</span>{{- .Post -}}
</a>
</li>
@@ -98,9 +92,7 @@
<li class="nav-item">
<a class="nav-link" href="{{ .URL | relLangURL }}"{{ if $.IsHome }} data-target="{{ .URL }}"{{ end }}{{ ($.Scratch.Get "target") | safeHTMLAttr }}>
{{ .Pre }}
<span>{{ .Name | safeHTML }}</span>
{{ .Post }}
{{- .Pre -}}<span>{{ .Name | safeHTML }}</span>{{- .Post -}}
</a>
</li>
+1 -1
View File
@@ -31,7 +31,7 @@
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
{{ end }}
<p class="cta-btns">
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }} class="btn {{if $bg.text_color_light}}btn-light{{else}}btn-primary{{end}} btn-lg">{{ if $page.Params.cta.icon }}<i class="{{ $pack }} {{ $pack_prefix }}-{{ $page.Params.cta.icon }}" aria-hidden="true"></i> {{end}}{{ $page.Params.cta.label | markdownify | emojify | safeHTML }}</a>
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }} class="btn {{if $bg.text_color_light}}btn-light{{else}}btn-primary{{end}} btn-lg">{{ if $page.Params.cta.icon }}<i class="{{ $pack }} {{ $pack_prefix }}-{{ $page.Params.cta.icon }} pr-1" aria-hidden="true"></i>{{end}}{{ $page.Params.cta.label | markdownify | emojify | safeHTML }}</a>
{{/* Alternative Call-to-action link */}}
{{ if $page.Params.cta_alt.url }}