-
Notifications
You must be signed in to change notification settings - Fork 61
Hides corresponding labels when author or tags are empty #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/about/">{{ i18n "about" }}</a> | ||
{{ $currentPage := . }} | ||
{{ range .Site.Menus.main }} | ||
<a class="nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{.URL}}">{{ .Name }}</a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add i18n support for naming of menu items |
||
{{ end }} | ||
|
||
{{ if .Site.Taxonomies.tags }} | ||
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/tags/">{{ i18n "tags" }}</a> | ||
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/contact/">{{ i18n "contact" }}</a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why that was removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess, About and Contacts may be set through the main menu. |
||
{{ end }} | ||
{{- if .Site.IsMultiLingual -}} | ||
{{- range $lang := .Site.Languages -}} | ||
{{- if ne $.Site.Language $lang -}} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
<div class="post"> | ||
<a class="post-link" href="{{ .Permalink }}"> | ||
<p class="post-meta left">{{ .Date.Format "Jan 2, 2006" }}</p> | ||
<p class="post-author right">{{ i18n "written" }} {{ .Params.author }}</p> | ||
<p class="post-meta left">{{ .Date.Format (i18n "post_date_format") }}</p> | ||
<p class="post-author right">{{ with .Params.author }}{{ i18n "written" }} {{ . }}{{end}}</p> | ||
<div class="clearfix"></div> | ||
<h3 class="h2 post-title">{{ .Title }} {{ if .Draft }}(draft){{end}}</h3> | ||
<p class="post-summary">{{ .Summary }}</p> | ||
</a> | ||
{{ $baseurl := .Site.BaseURL }} | ||
<p class="post-meta">{{ i18n "tags" }}: | ||
{{ range $i, $e := .Params.tags }} | ||
{{if $i}}, {{end}} | ||
<a href="{{ $baseurl }}{{ $.Site.LanguagePrefix }}/tags/{{ . }}">{{ . }}</a> | ||
{{ end }}</p> | ||
{{ with .Params.tags }} | ||
<p class="post-meta">{{ i18n "tags" }}: | ||
{{ range $i, $e := . }} | ||
{{if $i}}, {{end}} | ||
<a href="{{ $baseurl }}{{ $.Site.LanguagePrefix }}/tags/{{ . }}">{{ . }}</a> | ||
{{ end }}</p> | ||
{{ end }} | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add this menu to exampleSite configuration as well to show the support for menu items