mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
Initial files
This commit is contained in:
7
layouts/partials/404.html
Normal file
7
layouts/partials/404.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<section class="container centered">
|
||||
<div class="error">
|
||||
<h1>404</h1>
|
||||
<h2>Page Not Found</h2>
|
||||
<p>Sorry, this page does not exist.<br />You can head back to <a href="{{ .Site.BaseURL }}">homepage</a>.</p>
|
||||
</div>
|
||||
</section>
|
||||
5
layouts/partials/footer.html
Normal file
5
layouts/partials/footer.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<footer class="footer">
|
||||
<section class="container">
|
||||
© {{ .Site.LastChange.Format "2006" }} · Powered by <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/luizdepra/hugo-coder/">Coder</a>.
|
||||
</section>
|
||||
</footer>
|
||||
14
layouts/partials/header.html
Normal file
14
layouts/partials/header.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<nav class="navigation">
|
||||
<section class="container">
|
||||
<a class="navigation-title" href="{{ "/" | absURL }}">
|
||||
{{ .Site.Title }}
|
||||
</a>
|
||||
<ul class="navigation-list float-right">
|
||||
{{ range sort .Site.Menus.main }}
|
||||
<li class="navigation-item">
|
||||
<a class="navigation-link" href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
||||
11
layouts/partials/home.html
Normal file
11
layouts/partials/home.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<section class="container centered">
|
||||
<div class="about">
|
||||
<h1>{{ .Site.Params.author }}</h1>
|
||||
<h2>{{ .Site.Params.info }}</h2>
|
||||
<ul>
|
||||
{{ range sort .Site.Params.social }}
|
||||
<li><a href="{{ .url }}">{{ .name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
11
layouts/partials/list.html
Normal file
11
layouts/partials/list.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<section class="container list">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
<span>{{ .Date.Format "January 2, 2006" }}</span><a href="{{ .URL }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</section>
|
||||
9
layouts/partials/page.html
Normal file
9
layouts/partials/page.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<section class="container page">
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
48
layouts/partials/pagination.html
Normal file
48
layouts/partials/pagination.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{{ $paginator := .Paginator }}
|
||||
{{ $adjacent_links := 2 }}
|
||||
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
|
||||
{{ $lower_limit := (add $adjacent_links 1) }}
|
||||
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
{{ if $paginator.HasPrev }}
|
||||
{{ if ne $paginator.PageNumber 1 }}
|
||||
<li><a href="{{ $paginator.First.URL }}">«</a></li>
|
||||
{{ end }}
|
||||
<li class="hidden"><a href="{{ $paginator.Prev.URL }}">‹</a></li>
|
||||
{{ end }}
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ $.Scratch.Set "page_number_flag" false }}
|
||||
{{ if gt $paginator.TotalPages $max_links }}
|
||||
{{ if le $paginator.PageNumber $lower_limit }}
|
||||
{{ if le .PageNumber $max_links }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ else if ge $paginator.PageNumber $upper_limit }}
|
||||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ if eq ($.Scratch.Get "page_number_flag") true }}
|
||||
{{ if eq . $paginator }}
|
||||
<li>{{ .PageNumber }}</li>
|
||||
{{ else }}
|
||||
<li><a href="{{ .URL }}">{{ .PageNumber }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $paginator.HasNext }}
|
||||
<li class="hidden"><a href="{{ $paginator.Next.URL }}">›</a></li>
|
||||
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
|
||||
<li><a href="{{ $paginator.Last.URL }}">»</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
10
layouts/partials/post.html
Normal file
10
layouts/partials/post.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<section class="container post">
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<h2 class="date">{{ .Date.Format "January 2, 2006" }}</h2>
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
Reference in New Issue
Block a user