Fix the single template to use the authors avatar correctly (#107)
* Fix the single template to use the authors avatar correctly * Replace absURL with relURL and .Site.X with site.X Co-authored-by: Emruz Hossain <emruz@appscode.com>
This commit is contained in:
parent
4d19b2f8d1
commit
d0c32c5d08
22 changed files with 86 additions and 80 deletions
|
@ -1,12 +1,12 @@
|
|||
{{ $pageURL:= .RelPermalink }}
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
|
||||
{{ end }}
|
||||
|
||||
<div class="dropdown languageSelector">
|
||||
<a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
|
||||
{{ .Site.Language.LanguageName }}
|
||||
{{ site.Language.LanguageName }}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range .Translations }}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{{ $pageURL:= .RelPermalink }}
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
|
||||
{{ end }}
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
|
||||
{{ .Site.Language.LanguageName }}
|
||||
{{ site.Language.LanguageName }}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range .Translations }}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
|
||||
{{ .Site.Language.LanguageName }}
|
||||
{{ site.Language.LanguageName }}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
{{ range site.Home.AllTranslations }}
|
||||
<a class="dropdown-item nav-link languages-item" href="{{ .Permalink }}">
|
||||
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png">
|
||||
{{ .Language.LanguageName }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ $mainLogo:="assets/images/main-logo.png" }}
|
||||
{{ $invertedLogo:="assets/images/inverted-logo.png" }}
|
||||
{{ $mainLogo:="/assets/images/main-logo.png" }}
|
||||
{{ $invertedLogo:="/assets/images/inverted-logo.png" }}
|
||||
{{ if site.Params.logo.main }}
|
||||
{{ $mainLogo = site.Params.logo.main }}
|
||||
{{ end }}
|
||||
|
@ -13,7 +13,7 @@
|
|||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
|
||||
<img src="{{ $mainLogo | absURL }}">
|
||||
<img src="{{ $mainLogo | relURL }}">
|
||||
{{- site.Title -}}
|
||||
</a>
|
||||
<button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()">
|
||||
|
@ -29,6 +29,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Store the logo information in a hidden img for the JS -->
|
||||
<img src="{{ $mainLogo | absURL }}" class="d-none" id="main-logo">
|
||||
<img src="{{ $invertedLogo | absURL }}" class="d-none" id="inverted-logo">
|
||||
<img src="{{ $mainLogo | relURL }}" class="d-none" id="main-logo">
|
||||
<img src="{{ $invertedLogo | relURL }}" class="d-none" id="inverted-logo">
|
||||
</nav>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{{ $mainLogo:="assets/images/main-logo.png" }}
|
||||
{{ $invertedLogo:="assets/images/inverted-logo.png" }}
|
||||
{{ if .Site.Params.logo.main }}
|
||||
{{ $mainLogo = .Site.Params.logo.main }}
|
||||
{{ $mainLogo:="/assets/images/main-logo.png" }}
|
||||
{{ $invertedLogo:="/assets/images/inverted-logo.png" }}
|
||||
{{ if site.Params.logo.main }}
|
||||
{{ $mainLogo = site.Params.logo.main }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.logo.inverted }}
|
||||
{{ $invertedLogo = .Site.Params.logo.inverted }}
|
||||
{{ if site.Params.logo.inverted }}
|
||||
{{ $invertedLogo = site.Params.logo.inverted }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sections:= .Site.Data.sections }}
|
||||
{{ if (index .Site.Data .Site.Language.Lang).sections }}
|
||||
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
|
||||
{{ $sections:= site.Data.sections }}
|
||||
{{ if (index site.Data site.Language.Lang).sections }}
|
||||
{{ $sections = (index site.Data site.Language.Lang).sections }}
|
||||
{{ end }}
|
||||
|
||||
<nav class="navbar navbar-expand-xl top-navbar initial-navbar" id="top-navbar">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}">
|
||||
<img src="{{ $invertedLogo | absURL }}" id="logo">
|
||||
{{- .Site.Title -}}
|
||||
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
|
||||
<img src="{{ $invertedLogo | relURL }}" id="logo">
|
||||
{{- site.Title -}}
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler navbar-dark"
|
||||
|
@ -77,7 +77,7 @@
|
|||
<a class="nav-link" id="blog-link" href="{{ "/posts" | relLangURL }}">{{ i18n "posts" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ range (index .Site.Data .Site.Language.Lang).site.customMenus }}
|
||||
{{ range (index site.Data site.Language.Lang).site.customMenus }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ .url }}">{{ .name }}</a>
|
||||
</li>
|
||||
|
@ -89,6 +89,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Store the logo information in a hidden img for the JS -->
|
||||
<img src="{{ $mainLogo | absURL }}" class="d-none" id="main-logo">
|
||||
<img src="{{ $invertedLogo | absURL }}" class="d-none" id="inverted-logo">
|
||||
<img src="{{ $mainLogo | relURL }}" class="d-none" id="main-logo">
|
||||
<img src="{{ $invertedLogo | relURL }}" class="d-none" id="inverted-logo">
|
||||
</nav>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue