mirror of
https://github.com/naoufalzerai/zerai.xyz.git
synced 2025-12-24 22:43:58 +00:00
change theme again :D
This commit is contained in:
15
themes/notepadium/layouts/_default/_markup/render-image.html
Normal file
15
themes/notepadium/layouts/_default/_markup/render-image.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{- $url := .Destination | safeURL -}}
|
||||
{{- $block := gt (len .Title) 0 -}}
|
||||
|
||||
{{- if $block -}}
|
||||
<span class="image-container"><span class="link">
|
||||
{{- end -}}
|
||||
<img {{ if $block }}class="img"{{ end }} src="{{- $url -}}"
|
||||
alt{{- with .Text -}}="{{- . -}}" {{- end -}} />
|
||||
{{- if $block -}}
|
||||
</span>
|
||||
{{- if ne .Title " " -}}
|
||||
<span class="caption"><span class="title">{{- .Title | safeHTML -}}</span></span>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{- $url := .Destination | safeURL -}}
|
||||
{{- $text := .Text | safeHTML -}}
|
||||
<a href="{{- $url -}}"
|
||||
{{- with .Title -}}title="{{- . -}}"{{- end -}}
|
||||
{{- if strings.HasPrefix $url "http" -}}target="_blank" rel="noopener noreferrer"{{- end -}}>{{- $text -}}</a>
|
||||
13
themes/notepadium/layouts/_default/baseof.html
Normal file
13
themes/notepadium/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{- site.Language.Lang -}}">
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<section id="content">
|
||||
{{- block "main" . -}}{{- end -}}
|
||||
</section>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
20
themes/notepadium/layouts/_default/list.html
Normal file
20
themes/notepadium/layouts/_default/list.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- define "main" -}}
|
||||
{{- $paginator := .Paginator -}}
|
||||
|
||||
{{- $title := T .Title -}}
|
||||
{{- if not $title -}}
|
||||
{{- $title = .Title -}}
|
||||
{{- end -}}
|
||||
<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 -}}
|
||||
<!-- Ranges through content/posts/*.md -->
|
||||
|
||||
{{- partial "note-list.html" $paginator -}}
|
||||
{{- partial "pagination.html" $paginator -}}
|
||||
|
||||
{{- end -}}
|
||||
26
themes/notepadium/layouts/_default/rss.xml
Normal file
26
themes/notepadium/layouts/_default/rss.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<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>{{ .Permalink }}</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 />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range first 10 .Site.RegularPages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</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>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
||||
11
themes/notepadium/layouts/_default/section.html
Normal file
11
themes/notepadium/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 -}}
|
||||
22
themes/notepadium/layouts/_default/single.html
Normal file
22
themes/notepadium/layouts/_default/single.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
{{- $justify := false -}}
|
||||
{{- if eq .Params.justify true -}} {{- $justify = true -}} {{- end -}}
|
||||
<div class="article-container">
|
||||
{{- partial "article-header.html" . -}}
|
||||
<article class="article markdown-body" {{- if $justify -}}style="text-align: justify;" {{- end -}}>
|
||||
{{- with .Params.cover -}}<p><img class="cover" src="{{- . | safeURL -}}" alt></p>{{- end -}}
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
|
||||
{{- partial "article-labels.html" . -}}
|
||||
{{- partial "article-share.html" . -}}
|
||||
{{- partial "article-license.html" . -}}
|
||||
{{- partial "article-author.html" . -}}
|
||||
{{- partial "article-extra.html" . -}}
|
||||
</div>
|
||||
<div class="article bottom">
|
||||
{{- partial "article-bottom-navigation.html" . -}}
|
||||
{{- partial "article-comments.html" . -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user