Initial commit

This commit is contained in:
vimux 2016-10-14 23:41:10 +03:00
commit 406c5961cb
15 changed files with 167 additions and 0 deletions

View file

@ -0,0 +1,10 @@
{{ partial "header.html" . }}
<main>
{{ $paginator := .Paginate (where .Site.Pages "Type" "post") }}
{{ range $paginator.Pages }}
{{ partial "summary.html" . }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ partial "sidebar.html" . }}
{{ partial "footer.html" . }}

View file

@ -0,0 +1,22 @@
{{ partial "header.html" . }}
<main>
<article>
<h1>{{ .Title }}</h1>
<time>{{ .Date.Format "02.01.2006 15:04" }}</time>
<div>
{{ .Content }}
</div>
<div>
<ul id="tags">
{{ range .Params.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
</div>
<div>
{{ template "_internal/disqus.html" . }}
</div>
</article>
</main>
{{ partial "sidebar.html" . }}
{{ partial "footer.html" . }}

10
layouts/index.html Normal file
View file

@ -0,0 +1,10 @@
{{ partial "header.html" . }}
<main>
{{ $paginator := .Paginate (where .Site.Pages "Type" "post") }}
{{ range $paginator.Pages }}
{{ partial "summary.html" . }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ partial "sidebar.html" . }}
{{ partial "footer.html" . }}

View file

View file

@ -0,0 +1,5 @@
<footer>
<p>&copy; {{ .Now.Year }} <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></p>
</footer>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ if .RSSlink -}}<link href="{{ .RSSlink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}">{{- end }}
{{ .Hugo.Generator }}
</head>
<body>
<header>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<nav>
<ul>
{{ range .Site.Menus.main }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
</header>

View file

@ -0,0 +1,9 @@
<div>
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}">Previous Page</a>
{{ end }}
{{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}">Next Page</a>
{{ end }}
</div>

View file

@ -0,0 +1,14 @@
<aside>
<div>
<div>
<h3>LATESTS POSTS</h3>
</div>
<div>
<ul>
{{ range first 5 .Site.Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
</div>
</aside>

View file

@ -0,0 +1,13 @@
<article>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<time>{{ .Date.Format "02.01.2006 15:04" }}</time>
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .Permalink }}">Read more...</a>
{{ end }}
</div>
</article>