🎉 Hello World
This commit is contained in:
16
layouts/_default/_markup/render-image.html
Normal file
16
layouts/_default/_markup/render-image.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- $url := .Destination | safeURL -}}
|
||||
{{- $block := gt (len .Title) 0 -}}
|
||||
|
||||
{{- if $block -}}
|
||||
<span class="image-container"><span class="link">
|
||||
{{- end -}}
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="{{- $url -}}"><img {{ if $block }}class="img"{{ end }} src="{{- $url -}}"
|
||||
alt{{- with .Text -}}="{{- . -}}" {{- end -}} /></a>
|
||||
{{- if $block -}}
|
||||
</span>
|
||||
{{- if ne .Title " " -}}
|
||||
<span class="caption"><span class="title">{{- .Title | safeHTML -}}</span></span>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
5
layouts/_default/_markup/render-link.html
Normal file
5
layouts/_default/_markup/render-link.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- $url := .Destination | safeURL -}}
|
||||
{{- $text := .Text | safeHTML -}}
|
||||
<a href="{{- $url -}}"
|
||||
{{- with .Title -}}title="{{- . -}}"{{- end -}}
|
||||
{{- if strings.HasPrefix $url "http" -}}target="_blank"{{- end -}}>{{- $text -}}</a>
|
15
layouts/_default/baseof.html
Normal file
15
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.Language.Lang }}">
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
{{ partial "header.html" . }}
|
||||
<div class="base-body">
|
||||
<div id="content">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
22
layouts/_default/list.html
Normal file
22
layouts/_default/list.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- define "main" -}}
|
||||
{{- $paginator := .Paginator -}}
|
||||
|
||||
{{- $title := T .Title -}}
|
||||
{{- if not $title -}}
|
||||
{{- $title = .Title -}}
|
||||
{{- end -}}
|
||||
{{ if false }}
|
||||
<section class="article header"><h1>{{- $title -}}</h1></section>
|
||||
{{- if .Content -}}
|
||||
<article class="article markdown-body">
|
||||
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<!-- Ranges through content/posts/*.md -->
|
||||
|
||||
{{- partial "note-list.html" $paginator -}}
|
||||
{{- partial "pagination.html" $paginator -}}
|
||||
|
||||
{{- end -}}
|
27
layouts/_default/rss.xml
Normal file
27
layouts/_default/rss.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .RelPermalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .RelPermalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range .Pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .RelPermalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .RelPermalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
11
layouts/_default/section.html
Normal file
11
layouts/_default/section.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{- define "main" -}}
|
||||
{{- $paginator := .Paginator -}}
|
||||
|
||||
<section class="article header"><h1>{{- .Title -}}</h1></section>
|
||||
{{- partial "section-body.html" . -}}
|
||||
<!-- Ranges through content/posts/*.md -->
|
||||
|
||||
{{- partial "note-list.html" $paginator -}}
|
||||
{{- partial "pagination.html" $paginator -}}
|
||||
|
||||
{{- end -}}
|
24
layouts/_default/single.html
Normal file
24
layouts/_default/single.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{- $justify := false -}}
|
||||
{{- if eq .Params.justify true -}} {{- $justify = true -}} {{- end -}}
|
||||
<div id="white">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
{{- partial "article-header.html" . -}}
|
||||
<h4>{{ .Title }}</h4>
|
||||
{{- with .Params.cover -}}<p><img class="img-responsive" src="{{- . | safeURL -}}" alt="{{ .Title }}"></p>{{- end -}}
|
||||
<div {{- if $justify -}}style="text-align: justify;" {{- end -}}>
|
||||
{{- .Content -}}
|
||||
</div>
|
||||
{{- partial "article-labels.html" . -}}
|
||||
{{- partial "article-license.html" . -}}
|
||||
{{- partial "article-author.html" . -}}
|
||||
</div>
|
||||
{{- partial "article-bottom-navigation.html" . -}}
|
||||
{{- partial "article-comments.html" . -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
Reference in New Issue
Block a user