🎉 Hello World
This commit is contained in:
3
layouts/partials/article-author.html
Normal file
3
layouts/partials/article-author.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--
|
||||
for user-side override
|
||||
-->
|
11
layouts/partials/article-bottom-navigation.html
Normal file
11
layouts/partials/article-bottom-navigation.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{- if and (not (eq .Params.single true)) (or .PrevInSection .NextInSection) -}}
|
||||
<hr>
|
||||
<section class="article navigation">
|
||||
{{- with .NextInSection -}}
|
||||
<p><a class="link" href="{{- .RelPermalink -}}"><span class="li">←</span>{{- .Title | safeHTML -}}</a></p>
|
||||
{{- end -}}
|
||||
{{- with .PrevInSection -}}
|
||||
<p><a class="link" href="{{- .RelPermalink -}}"><span class="li">→</span>{{- .Title | safeHTML -}}</a></p>
|
||||
{{- end -}}
|
||||
</section>
|
||||
{{- end -}}
|
7
layouts/partials/article-comments.html
Normal file
7
layouts/partials/article-comments.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{- if gt (len site.DisqusShortname) 0 -}}
|
||||
{{- if or (eq .Params.comments true) (and (ne .Params.comments false) (eq site.Params.comments.enable true)) -}}
|
||||
<section class="article discussion">
|
||||
{{- template "_internal/disqus.html" . -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
30
layouts/partials/article-header.html
Normal file
30
layouts/partials/article-header.html
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
<!--<p><img src="img/user.png" width="50px" height="50px">
|
||||
<ba>Stanley Stinson</ba>
|
||||
</p>-->
|
||||
{{- $dateFormat := site.Params.dateFormat -}}
|
||||
{{- if not $dateFormat -}}{{- $dateFormat = "2006-01-02" -}}{{- end -}}
|
||||
{{- $lastmodFormat := "" -}}
|
||||
{{- $lastmod := .Lastmod -}}
|
||||
{{- if $lastmod -}}
|
||||
{{- $lastmodFormat = $lastmod.Format $dateFormat -}}
|
||||
{{- end -}}
|
||||
{{- if .Date -}}
|
||||
{{- $dateFormat := .Date.Format $dateFormat -}}
|
||||
<p class="article date">
|
||||
<bd>{{- $dateFormat -}}</bd>
|
||||
{{- if and ($lastmod.After .Date) (ne $lastmodFormat $dateFormat) -}}
|
||||
<span class="lastmod">{{- printf (T "edited") $lastmodFormat -}}</span>
|
||||
{{- end -}}
|
||||
{{- if or (eq .Params.readingTime true) (and (not (eq .Params.readingTime false)) (eq site.Params.readingTime true)) -}}
|
||||
<span class="reading-time">{{ T "readingTime" .ReadingTime }}</span>
|
||||
{{- end -}}
|
||||
{{- if .IsTranslated -}}
|
||||
<span class="langs">
|
||||
{{- range .Translations -}}
|
||||
<span class="lang"><a href="{{- .RelPermalink -}}">{{- .Lang -}}</a></span>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</p>
|
||||
{{- end -}}
|
16
layouts/partials/article-labels.html
Normal file
16
layouts/partials/article-labels.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- if or .Params.categories .Params.tags -}}
|
||||
<p>
|
||||
<bt>CATÉGORIES :
|
||||
{{- range .Params.categories -}}
|
||||
{{- $url := print "/categories/" (. | urlize) "/" -}}
|
||||
<a class="category" href={{- $url | relLangURL -}}>{{- . -}}</a> -
|
||||
{{- end -}}
|
||||
</bt>
|
||||
<bt>TAGS :
|
||||
{{- range .Params.tags -}}
|
||||
{{- $url := print "/tags/" (. | urlize) "/" -}}
|
||||
<a class="tag" href={{- $url | relLangURL -}}>{{- . -}}</a>
|
||||
{{- end -}}
|
||||
</bt>
|
||||
</p>
|
||||
{{- end -}}
|
12
layouts/partials/article-license.html
Normal file
12
layouts/partials/article-license.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- $license := "" -}}
|
||||
{{- if and (isset .Params "license") (ne .Params.license "") -}}
|
||||
{{- $license = .Params.license -}}
|
||||
{{- else if and (isset site.Params "license") (ne site.Params.license "") -}}
|
||||
{{- $license = site.Params.license -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ne $license "" -}}
|
||||
<section class="article license">
|
||||
LICENSE : {{- $license | safeHTML -}}
|
||||
</section>
|
||||
{{- end -}}
|
13
layouts/partials/copyright.html
Normal file
13
layouts/partials/copyright.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- $copyright := . -}}
|
||||
<div class="footer-wrap">
|
||||
<p class="copyright">{{- $copyright -}}</p>
|
||||
<div class="credits">
|
||||
<!--
|
||||
You are NOT allowed to delete the credit link to TemplateMag with free version.
|
||||
You can delete the credit link only if you bought the pro version.
|
||||
Buy the pro version with working PHP/AJAX contact form: https://templatemag.com/stanley-bootstrap-freelancer-template/
|
||||
Licensing information: https://templatemag.com/license/
|
||||
-->
|
||||
Created with Stanley template by <a href="https://templatemag.com/" rel="nofollow">TemplateMag</a>
|
||||
</div>
|
||||
</div>
|
16
layouts/partials/custom-css.html
Normal file
16
layouts/partials/custom-css.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- $css := "" -}}
|
||||
{{- range site.Params.assets.css -}}
|
||||
{{- $customCSS := resources.Get . -}}
|
||||
{{- if $customCSS -}}
|
||||
{{- $scss := false -}}
|
||||
{{- $filePath := . | lower -}}
|
||||
{{- if or (strings.HasSuffix $filePath ".scss") (strings.HasSuffix $filePath ".sass") -}}{{- $scss = true -}}{{- end -}}
|
||||
{{- if $scss -}}{{- $customCSS = $customCSS | resources.ToCSS -}}{{- end -}}
|
||||
{{- if eq $css "" -}}
|
||||
{{- $css = $customCSS -}}
|
||||
{{- else -}}
|
||||
{{- $css = slice $css $customCSS | resources.Concat (printf "%s.tmp_custom.css" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- return $css -}}
|
19
layouts/partials/custom-js.html
Normal file
19
layouts/partials/custom-js.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $js := "" -}}
|
||||
{{- range site.Params.assets.js -}}
|
||||
{{- $customJS := resources.Get . -}}
|
||||
{{- if $customJS -}}
|
||||
{{- if eq $js "" -}}
|
||||
{{- $js = $customJS -}}
|
||||
{{- else -}}
|
||||
{{- $js = slice $js $customJS | resources.Concat (printf "%s.tmp_custom.js" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ne $js "" -}}
|
||||
{{- $coreJS := slice $js ("" | resources.FromString "js/_core.js") | resources.Concat "js/core.js" -}}
|
||||
{{- $coreJS = $coreJS | resources.Minify | resources.Fingerprint "sha384" -}}
|
||||
<script src="{{- $coreJS.RelPermalink -}}" integrity="{{- $coreJS.Data.Integrity -}}"></script>
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "js.html" . -}}
|
40
layouts/partials/footer.html
Normal file
40
layouts/partials/footer.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<h4>My Bunker</h4>
|
||||
<p>
|
||||
Some Address 987,<br/> +34 9054 5455, <br/> Madrid, Spain.
|
||||
</p>
|
||||
</div>
|
||||
<!-- /col-lg-4 -->
|
||||
|
||||
<div class="col-lg-4">
|
||||
<h4>My Links</h4>
|
||||
<p>
|
||||
<a href="#">Dribbble</a><br/>
|
||||
<a href="#">Twitter</a><br/>
|
||||
<a href="#">Facebook</a>
|
||||
</p>
|
||||
</div>
|
||||
<!-- /col-lg-4 -->
|
||||
|
||||
<div class="col-lg-4">
|
||||
<h4>À propos de pow pow pw</h4>
|
||||
<p>Un résumé à écrire ici</p>
|
||||
</div>
|
||||
<!-- /col-lg-4 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="copyrights">
|
||||
<div class="container">
|
||||
{{- $copyright := site.Copyright -}}
|
||||
{{- if not $copyright -}}
|
||||
{{- $copyright = site.Title | safeHTML -}}
|
||||
{{- end -}}
|
||||
{{- partial "copyright.html" ($copyright | safeHTML) -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- partial "syntax.html" . -}}
|
3
layouts/partials/head-extra.html
Normal file
3
layouts/partials/head-extra.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--
|
||||
for user-side override
|
||||
-->
|
22
layouts/partials/head.html
Normal file
22
layouts/partials/head.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<meta charset="utf-8">
|
||||
{{- hugo.Generator -}}
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="supported-color-schemes" content="light dark">
|
||||
|
||||
{{- define "title" -}}
|
||||
{{- $title := .Title -}}
|
||||
{{- if and (ne $title "") (ne $title site.Title) -}}
|
||||
<title>{{- $title | safeHTML -}} – {{- site.Title | safeHTML -}}</title>
|
||||
{{- else -}}
|
||||
{{- $slogan := site.Params.slogan -}}
|
||||
<title>{{- site.Title | safeHTML -}}{{- if and (isset site.Params "slogan") (ne $slogan "") -}} –
|
||||
{{- $slogan | safeHTML -}}{{- end -}}</title>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- block "title" . -}}{{- end -}}
|
||||
|
||||
{{- partial "style.html" . -}}
|
||||
{{- partial "rss-feed.html" . -}}
|
||||
{{- partial "head-extra.html" . -}}
|
31
layouts/partials/header.html
Normal file
31
layouts/partials/header.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- $nav := site.Params.nav -}}
|
||||
{{- if or $nav.showCategories $nav.showTags $nav.custom -}}
|
||||
<div class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{- .Site.BaseURL -}}">{{- .Site.Title -}}</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{- if $nav.showCategories -}}
|
||||
<li><a class="nav item" href="{{- `/categories/` | relLangURL -}}">{{- T "Categories" -}}</a></li>
|
||||
{{- end -}}
|
||||
{{- if $nav.showTags -}}
|
||||
<li><a class="nav item" href="{{- `/tags/` | relLangURL -}}">{{- T "Tags" -}}</a></li>
|
||||
{{- end -}}
|
||||
{{- range $nav.custom -}}
|
||||
{{- $url := .url | safeURL -}}
|
||||
{{- if strings.HasPrefix $url "/" -}}{{- $url = $url | relLangURL -}}{{- end -}}
|
||||
<li><a class="nav item" href="{{- $url -}}"{{- if strings.HasPrefix $url "http" -}} target="_blank"{{- end -}}>{{- .title -}}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
5
layouts/partials/homepage-body.html
Normal file
5
layouts/partials/homepage-body.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- if .Content -}}
|
||||
<article class="article markdown-body">
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{- end -}}
|
8
layouts/partials/note-labels.html
Normal file
8
layouts/partials/note-labels.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{- if or .Params.categories .Params.tags -}}
|
||||
<p class="note labels">
|
||||
{{- range .Params.tags -}}
|
||||
{{- $url := print "/tags/" (. | urlize) "/" -}}
|
||||
<a class="tag" href="{{- $url | relLangURL -}}">{{- . -}}</a>
|
||||
{{- end -}}
|
||||
</p>
|
||||
{{- end -}}
|
40
layouts/partials/note-list.html
Normal file
40
layouts/partials/note-list.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{{- $paginator := . -}}
|
||||
|
||||
{{- if gt $paginator.TotalPages 0 -}}
|
||||
{{- $dateFormat := site.Params.dateFormat -}}
|
||||
{{- if not $dateFormat -}}{{- $dateFormat = "2006-01-02" -}}{{- end -}}
|
||||
{{- range $index, $page := $paginator.Pages -}}
|
||||
<div id="{{ if eq (mod $index 2) 0}}grey{{ else }}white{{ end }}">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<!-- <p><img src="img/user.png" width="50px" height="50px">
|
||||
<ba>Stanley Stinson</ba>
|
||||
</p>-->
|
||||
{{- if $page.Date -}}
|
||||
<bd>{{- $page.Date.Format $dateFormat -}}</bd>
|
||||
{{- end -}}
|
||||
<h4>{{- $page.Title | safeHTML -}}</h4>
|
||||
{{- if $page.Summary -}}<p class="note content">{{- $page.Summary | plainify | safeHTML -}}{{- if $page.Truncated -}}<span class="mldr">…{{- T "more" -}}</span>{{- end -}}</p>{{- end -}}
|
||||
{{- $relURL := $page.RelPermalink -}}
|
||||
{{- $imgs := $page.Params.imgs -}}
|
||||
{{- with $page.Params.imgs -}}
|
||||
<span class="note imgs">
|
||||
{{- $imgCount := len $imgs -}}
|
||||
{{- range $imgs -}}
|
||||
{{- $imgurl := lower $page -}}
|
||||
{{- if and (not (hasPrefix $imgurl "http://")) (not (hasPrefix $imgurl "https://")) -}}
|
||||
{{- $imgurl = path.Join $relURL $page -}}
|
||||
{{- end -}}
|
||||
<img class="img" src="{{- $imgurl -}}" alt />
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
<p><a href="{{- $page.RelPermalink -}}">Continue Reading...</a></p>
|
||||
{{- partial "note-labels.html" $page -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
34
layouts/partials/pagination.html
Normal file
34
layouts/partials/pagination.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{{- $paginator := . -}}
|
||||
|
||||
{{- if gt $paginator.TotalPages 1 -}}
|
||||
|
||||
{{- $pageIndex := $paginator.PageNumber -}}
|
||||
{{- $totalPages := $paginator.TotalPages -}}
|
||||
{{- $cols := 5.0 -}}
|
||||
{{- $rows := math.Ceil (div $totalPages $cols) -}}
|
||||
{{- $row := math.Ceil (div $pageIndex $cols) -}}
|
||||
{{- $startPage := sub (mul $row $cols) $cols -}}
|
||||
{{- $endPage := add $startPage $cols -}}
|
||||
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
{{- if gt $row 1 -}}
|
||||
<li><a href="{{- $paginator.Prev.URL -}}" class="previous_page">«</a></li>
|
||||
{{- end -}}
|
||||
|
||||
{{- range $paginator.Pagers -}}
|
||||
{{- if and (gt .PageNumber $startPage) (le .PageNumber $endPage) -}}
|
||||
{{- $active := "" -}}
|
||||
{{- if eq .PageNumber $paginator.PageNumber -}}
|
||||
{{- $active = "active" -}}
|
||||
{{- end -}}
|
||||
<li><a class="{{- $active -}}" href="{{- .URL -}}">{{- .PageNumber -}}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if lt $row $rows -}}
|
||||
<li><a href="{{- $paginator.Next.URL -}}" class="next_page">»</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end -}}
|
3
layouts/partials/rss-feed.html
Normal file
3
layouts/partials/rss-feed.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||
{{- end -}}
|
5
layouts/partials/section-body.html
Normal file
5
layouts/partials/section-body.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- if .Content -}}
|
||||
<article class="article markdown-body">
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{- end -}}
|
6
layouts/partials/style.html
Normal file
6
layouts/partials/style.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{- $bootstrapCSS := resources.Get "css/bootstrap.min.css" -}}
|
||||
{{- $styleCSS := resources.Get "css/style.css" -}}
|
||||
{{- $finalCSS := slice $bootstrapCSS $styleCSS | resources.Concat "css/style.min.css" -}}
|
||||
{{- $finalCSS = $finalCSS | resources.Minify | resources.Fingerprint "sha384" -}}
|
||||
|
||||
<link rel="stylesheet" href="{{- $finalCSS.RelPermalink -}}" integrity="{{- $finalCSS.Data.Integrity -}}">
|
21
layouts/partials/syntax.html
Normal file
21
layouts/partials/syntax.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- with site.Params.syntax -}}
|
||||
{{- $use := "none" -}}
|
||||
{{- if and (isset . "use") (ne .use "") -}}
|
||||
{{- $use = .use | lower -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $syntaxJS := "" -}}
|
||||
{{- if eq $use "hljs" -}}
|
||||
{{- $syntaxJS = "js/hljs.js" -}}
|
||||
{{- else if eq $use "prismjs" -}}
|
||||
{{- $syntaxJS = "js/prism.js" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ne $syntaxJS "" -}}
|
||||
{{- $js := resources.Get $syntaxJS | resources.Minify | resources.Fingerprint "sha384" -}}
|
||||
<script src="{{- $js.RelPermalink -}}" integrity="{{- $js.Data.Integrity -}}"></script>
|
||||
{{- if eq $use "hljs" -}}
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
Reference in New Issue
Block a user