Numerous improvements and bug fixes.
- Refactored themes to always load with just a single file. This avoids a round trip on each request. - Locally load font when available on the system, then try to load the woff2 file, then fall back to regular woff. - Update markup to use relative urls where it is safe. RSS feeds still use absolute URLs. - Only set og:image:(height/width) when using the standard color icon. - Fixed styles on the pagination buttons. - Added ability to switch font to Source Code Pro (useSourceCodePro). - Added yellow theme. - Added grey theme. - Bold and remove underline for active page in header. - Removed markdownify on summary. - Only display date if present.
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner menu__inner--desktop">
|
||||
{{ $currentPage := . }}
|
||||
{{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
|
||||
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
|
||||
{{ $menu_item_url := .URL | relLangURL }}
|
||||
{{ $page_url := $currentPage.RelPermalink | relLangURL }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
<li><a{{ if eq $menu_item_url $page_url }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
||||
@@ -13,7 +16,9 @@
|
||||
<ul class="menu__sub-inner-more hidden">
|
||||
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ $menu_item_url := .URL | relLangURL }}
|
||||
{{ $page_url := $currentPage.RelPermalink | relLangURL }}
|
||||
<li><a{{ if eq $menu_item_url $page_url }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
@@ -21,8 +26,10 @@
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ $menu_item_url := .URL | relLangURL }}
|
||||
{{ $page_url := $currentPage.RelPermalink | relLangURL }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
<li><a{{ if eq $menu_item_url $page_url }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -35,7 +42,7 @@
|
||||
</ul>
|
||||
<ul class="language-selector__more hidden">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
<li><a{{ if eq .Language $.Language }} class="active"{{ end }} href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</ul>
|
||||
@@ -44,15 +51,17 @@
|
||||
|
||||
<ul class="menu__inner menu__inner--mobile">
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ $menu_item_url := .URL | relLangURL }}
|
||||
{{ $page_url := $currentPage.RelPermalink | relLangURL }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
<li><a{{ if eq $menu_item_url $page_url }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
||||
<hr />
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
<a{{ if eq .Language $.Language }} class="active"{{ end }} href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user