Manually check in the theme
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
<article class="blog-post-summary">
|
||||
<h3 class="blog-post-title"><a href="{{ .Permalink }}">{{.Title}}</a></h3>
|
||||
|
||||
<p class="blog-post-info">Posted: <time>{{ .Date.Format "2006-01-02"}}</time>
|
||||
{{ partial "blog-taxonomy-info" . }}</p>
|
||||
<p>
|
||||
{{- .Summary -}}
|
||||
<span> <a href="{{ .Permalink }}">Read more...</a></span>
|
||||
</p>
|
||||
</article>
|
@ -0,0 +1,17 @@
|
||||
{{ with .Params.Categories }}
|
||||
<span class="blog-taxonomy-info"> | Categories:
|
||||
{{ $sort := sort . }}
|
||||
{{ $links := apply $sort "partial" "post-category-link" "." }}
|
||||
{{ $clean := apply $links "chomp" "." }}
|
||||
{{ delimit $clean ", " }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Tags }}
|
||||
<span class="blog-taxonomy-info"> | Tags:
|
||||
{{ $sort := sort . }}
|
||||
{{ $links := apply $sort "partial" "post-tag-link" "." }}
|
||||
{{ $clean := apply $links "chomp" "." }}
|
||||
{{ delimit $clean ", " }}
|
||||
</span>
|
||||
{{ end }}
|
3
themes/hugo-theme-notrack/layouts/partials/footer.html
Normal file
3
themes/hugo-theme-notrack/layouts/partials/footer.html
Normal file
@ -0,0 +1,3 @@
|
||||
<footer>
|
||||
<span>{{ .Site.Params.Footer }}</span>
|
||||
</footer>
|
19
themes/hugo-theme-notrack/layouts/partials/head.html
Normal file
19
themes/hugo-theme-notrack/layouts/partials/head.html
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
<head>
|
||||
<title>{{ .Site.Title }} {{ with .Title }}- {{ . }} {{ end }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/fonts.css" | absURL }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/fontawesome.css" | absURL }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/styles.css" | absURL }}">
|
||||
{{ with resources.Get "css/userstyles.css" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="icon" href="{{ . | absURL }}">
|
||||
{{ end }}
|
||||
<meta charset="UTF-8">
|
||||
<meta name="author" content="{{ .Site.Params.Author }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
</head>
|
70
themes/hugo-theme-notrack/layouts/partials/header.html
Normal file
70
themes/hugo-theme-notrack/layouts/partials/header.html
Normal file
@ -0,0 +1,70 @@
|
||||
|
||||
<header class="page-header">
|
||||
<div class="myname">
|
||||
<h2><a href="{{ default .Site.Home .Site.BaseURL }}">{{ default .Site.Params.Author .Site.Params.siteHeading }}</a></h2>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="navbar">
|
||||
{{- /* info about current page */ -}}
|
||||
{{- $currentPage := . -}}
|
||||
{{- $currentPagesParent := $currentPage.Parent -}}
|
||||
{{- $currentPageInTags := eq $currentPage.Section "tags" -}}
|
||||
{{- $currentPageInCategories := eq $currentPage.Section "categories" -}}
|
||||
{{- $currentPageNotHome := ne $currentPage.IsHome true -}}
|
||||
|
||||
{{- range .Site.Menus.main -}}
|
||||
{{- if .HasChildren -}}
|
||||
|
||||
{{- /* info about current menu */ -}}
|
||||
{{- $currentMenusPage := .Page -}}
|
||||
|
||||
{{- $currentMenuHasTags := false -}}
|
||||
{{- $currentMenuHasCategories := false -}}
|
||||
{{- range .Children -}}
|
||||
{{- $childMenuSection := .Page.Section -}}
|
||||
{{- if eq $childMenuSection "categories" -}}{{- $currentMenuHasCategories = true -}}{{- end -}}
|
||||
{{- if eq $childMenuSection "tags" -}}{{- $currentMenuHasTags = true -}}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* comparison of current menu and current page */ -}}
|
||||
{{- $active := eq $currentMenusPage $currentPagesParent -}}
|
||||
{{- $active = and $active $currentPageNotHome -}}
|
||||
{{- $active = or $active (and $currentMenuHasTags $currentPageInTags) -}}
|
||||
{{- $active = or $active (and $currentMenuHasCategories $currentPageInCategories) }}
|
||||
<li class="dropdown {{ if or $active ($currentPage.IsMenuCurrent "main" . ) ($currentPage.HasMenuCurrent "main" .)}}activetab{{ end }}">
|
||||
<a href ="{{ .URL }}">
|
||||
{{- .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
<div class=sub-menu>
|
||||
{{- range .Children }}
|
||||
{{- $currentMenuSection := .Page.Section }}
|
||||
{{- $active := and $currentPageInTags (eq $currentMenuSection "tags") }}
|
||||
{{- $active = or $active (and $currentPageInCategories (eq $currentMenuSection "categories") ) }}
|
||||
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
|
||||
<a class="{{- if $active -}}activetab{{- end -}}" href="{{- .URL -}}">{{ .Name }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</li>
|
||||
{{- else -}}
|
||||
{{- $currentMenusPage := .Page }}
|
||||
{{- $currentMenuInMainSections := false }}
|
||||
{{- with $currentMenusPage }}
|
||||
{{- $currentMenuInMainSections = in site.Params.mainSections .Type }}
|
||||
{{- end }}
|
||||
|
||||
{{- $active := eq $currentMenusPage $currentPagesParent }}
|
||||
{{- $active = and $active (eq $currentPage.RelPermalink .URL ) }}
|
||||
{{- $active = or $active (eq $currentPage.Title .Name ) }}
|
||||
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
|
||||
<li class="{{- if $active -}} activetab {{- end -}}">
|
||||
<a href="{{ .URL }}">
|
||||
{{- .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
43
themes/hugo-theme-notrack/layouts/partials/pagination.html
Normal file
43
themes/hugo-theme-notrack/layouts/partials/pagination.html
Normal file
@ -0,0 +1,43 @@
|
||||
{{ $pag := $.Paginator }}
|
||||
{{ if gt $pag.TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
{{ with $pag.First }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" class="page-link" aria-label="First"><span
|
||||
aria-hidden="true">«</span></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="page-item{{ if not $pag.HasPrev }} disabled{{ end }}">
|
||||
<a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }}
|
||||
class="page-link" aria-label="Previous"><span aria-hidden="true">‹</span></a>
|
||||
</li>
|
||||
{{ $ellipsed := false }}
|
||||
{{ $shouldEllipse := false }}
|
||||
{{ range $pag.Pagers }}
|
||||
{{ $right := sub .TotalPages .PageNumber }}
|
||||
{{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
|
||||
{{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
|
||||
{{ if $showNumber }}
|
||||
{{ $ellipsed = false }}
|
||||
{{ $shouldEllipse = false }}
|
||||
{{ else }}
|
||||
{{ $shouldEllipse = not $ellipsed }}
|
||||
{{ $ellipsed = true }}
|
||||
{{ end }}
|
||||
{{ if $showNumber }}
|
||||
<li class="page-item{{ if eq . $pag }} active{{ end }}"><a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a></li>
|
||||
{{ else if $shouldEllipse }}
|
||||
<li class="page-item disabled"><span aria-hidden="true"> … </span></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<li class="page-item{{ if not $pag.HasNext }} disabled{{ end }}">
|
||||
<a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }}
|
||||
class="page-link" aria-label="Next"><span aria-hidden="true">›</span></a>
|
||||
</li>
|
||||
{{ with $pag.Last }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" class="page-link" aria-label="Last"><span aria-hidden="true">»</span></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
@ -0,0 +1 @@
|
||||
<a class="blog-taxonomy-info" href="/categories/{{ . | urlize }}">{{ . }}</a>
|
@ -0,0 +1 @@
|
||||
<a class="blog-taxonomy-info" href="/tags/{{ . | urlize }}">{{ . }}</a>
|
Reference in New Issue
Block a user