Initial files

This commit is contained in:
Luiz F. A. de Prá
2018-02-28 22:38:59 -03:00
commit 4db982bb01
35 changed files with 2525 additions and 0 deletions

3
layouts/404.html Normal file
View File

@@ -0,0 +1,3 @@
{{ define "content" }}
{{ partial "404.html" . }}
{{ end }}

View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
<base href="{{ .Site.BaseURL }}">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<link rel="canonical" href="{{ .Permalink }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono:400,700">
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
<link rel="stylesheet" href="{{ "css/style.min.css" | absURL }}">
<link rel="icon" type="image/png" href="{{ "/images/favicon-32x32.png" | absURL }}" sizes="32x32">
<link rel="icon" type="image/png" href="{{ "/images/favicon-16x16.png" | absURL }}" sizes="16x16">
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ .Hugo.Generator }}
</head>
<body>
<main class="wrapper">
{{ partial "header.html" . }}
<div class="content">
{{ block "content" . }}{{ end }}
</div>
{{ partial "footer.html" . }}
</main>
</body>
</html>

View File

@@ -0,0 +1,6 @@
{{ define "title" }}
{{ .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
{{ partial "list.html" . }}
{{ end }}

View File

@@ -0,0 +1,6 @@
{{ define "title" }}
{{ .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
{{ partial "page.html" . }}
{{ end }}

3
layouts/index.html Normal file
View File

@@ -0,0 +1,3 @@
{{ define "content" }}
{{ partial "home.html" . }}
{{ end }}

View 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>

View 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>

View 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>

View 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>

View 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>

View File

@@ -0,0 +1,9 @@
<section class="container page">
<article>
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
</article>
</section>

View 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 }}">&laquo;</a></li>
{{ end }}
<li class="hidden"><a href="{{ $paginator.Prev.URL }}">&lsaquo;</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 }}">&rsaquo;</a></li>
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
<li><a href="{{ $paginator.Last.URL }}">&raquo;</a></li>
{{ end }}
{{ end }}
</ul>
{{ end }}

View 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>

View File

@@ -0,0 +1,6 @@
{{ define "title" }}
{{ .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
{{ partial "post.html" . }}
{{ end }}