mirror of
https://github.com/idanoo/m2.nz
synced 2025-07-03 13:52:13 +00:00
Commit theme
This commit is contained in:
parent
1ec1007169
commit
690a3ff983
46 changed files with 2443 additions and 0 deletions
50
themes/m10c/layouts/_default/baseof.html
Normal file
50
themes/m10c/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
|
||||
<head>
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} // {{ .Site.Title }}{{ end }}</title>
|
||||
<link rel="shortcut icon" href="{{ .Site.Params.favicon | default "/favicon.ico" }}" />
|
||||
<meta charset="utf-8" />
|
||||
{{ hugo.Generator }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="author" content="{{ .Site.Params.author | default "John Doe" }}" />
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
|
||||
{{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" />
|
||||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header class="app-header">
|
||||
<a href="{{ .Site.BaseURL }}"><img class="app-header-avatar" src="{{ .Site.Params.avatar | default "avatar.jpg" | relURL }}" alt="{{ .Site.Params.author | default "John Doe" }}" /></a>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
{{- with .Site.Menus.main }}
|
||||
<nav class="app-header-menu">
|
||||
{{- range $key, $item := . }}
|
||||
{{- if ne $key 0 }}
|
||||
{{ $.Site.Params.menu_item_separator | default " - " | safeHTML }}
|
||||
{{ end }}
|
||||
<a class="app-header-menu-item" href="{{ $item.URL }}">{{ $item.Name }}</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
{{- end }}
|
||||
<p>{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}</p>
|
||||
{{- with .Site.Params.social }}
|
||||
<div class="app-header-social">
|
||||
{{ range . }}
|
||||
<a href="{{ .url }}" target="_blank" rel="noreferrer noopener">
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" .icon "title" .name) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</header>
|
||||
<main class="app-container">
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
20
themes/m10c/layouts/_default/list.html
Normal file
20
themes/m10c/layouts/_default/list.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="posts-list">
|
||||
{{ range where .Paginator.Pages "Type" "!=" "page" }}
|
||||
<li class="posts-list-item">
|
||||
<a class="posts-list-item-title" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<span class="posts-list-item-description">
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
|
||||
{{ .PublishDate.Format "Jan 2, 2006" }}
|
||||
-
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
|
||||
{{ .ReadingTime }} min read
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" $ }}
|
||||
</article>
|
||||
{{ end }}
|
35
themes/m10c/layouts/_default/single.html
Normal file
35
themes/m10c/layouts/_default/single.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{ define "main" }}
|
||||
<article class="post">
|
||||
<header class="post-header">
|
||||
<h1 class ="post-title">{{ .Title }}</h1>
|
||||
{{- if ne .Type "page" }}
|
||||
<div class="post-meta">
|
||||
<div>
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
|
||||
{{ .PublishDate.Format "Jan 2, 2006" }}
|
||||
</div>
|
||||
<div>
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
|
||||
{{ .ReadingTime }} min read
|
||||
</div>
|
||||
{{- with .Params.tags }}
|
||||
<div>
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
|
||||
{{- range . -}}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
|
||||
<a class="tag" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</header>
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<div class="post-footer">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
16
themes/m10c/layouts/_default/terms.html
Normal file
16
themes/m10c/layouts/_default/terms.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="tags-list">
|
||||
{{ range .Data.Terms.ByCount }}
|
||||
<li class="tags-list-item">
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
|
||||
<a class="tags-list-item-title" href="{{ .Page.Permalink }}">
|
||||
({{ .Count }})
|
||||
{{ .Page.Title }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</article>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue