mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-28 18:54:11 +01:00
Fix typos
This commit is contained in:
parent
d9db5c5b8e
commit
80b1f0ddeb
@ -5,7 +5,7 @@ paginate = 5
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
# dir name of your blog content (default is `content/posts`)
|
# dir name of your blog content (default is `content/posts`)
|
||||||
contentTypeName = "posts"
|
contentTypeName = "post"
|
||||||
# "light" or "dark"
|
# "light" or "dark"
|
||||||
defaultTheme = "dark"
|
defaultTheme = "dark"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.Language }}">
|
<html lang="{{ $.Site.Language }}">
|
||||||
<head>
|
<head>
|
||||||
{{ block "title" . }}
|
{{ block "title" . }}
|
||||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}</title>
|
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}</title>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="posts">
|
<div class="posts">
|
||||||
{{ $isntDefault := not (or (eq (trim .Site.Params.contentTypeName " ") "posts") (eq (trim .Site.Params.contentTypeName " ") "")) }}
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||||
{{ $contentTypeName := cond $isntDefault (string .Site.Params.contentTypeName) "posts" }}
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||||
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
|
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
|
||||||
|
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
@ -11,19 +11,19 @@
|
|||||||
<span class="post-date">
|
<span class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format "2006-01-02" }}
|
||||||
</span>
|
</span>
|
||||||
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
<span class="post-author">{{ $.Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
<span class="post-tags">
|
<span class="post-tags">
|
||||||
{{ range .Params.tags }}
|
{{ range .Params.tags }}
|
||||||
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}">{{ . }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.Cover }}
|
{{ with .Params.Cover }}
|
||||||
<img src="/img/{{ . }}" class="post-cover" />
|
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
@ -35,7 +35,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div><a class="read-more button" href="{{.RelPermalink}}">{{ .Site.Params.ReadMore }} →</a></div>
|
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a></div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
|
@ -5,19 +5,19 @@
|
|||||||
<span class="post-date">
|
<span class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format "2006-01-02" }}
|
||||||
</span>
|
</span>
|
||||||
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
<span class="post-author">{{ $.Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
<span class="post-tags">
|
<span class="post-tags">
|
||||||
{{ range .Params.tags }}
|
{{ range .Params.tags }}
|
||||||
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}">{{ . }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.Cover }}
|
{{ with .Params.Cover }}
|
||||||
<img src="/img/{{ . }}" class="post-cover" />
|
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
@ -26,7 +26,7 @@
|
|||||||
{{ if or .NextInSection .PrevInSection }}
|
{{ if or .NextInSection .PrevInSection }}
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<div class="pagination__title">
|
<div class="pagination__title">
|
||||||
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
|
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination__buttons">
|
<div class="pagination__buttons">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="footer__inner">
|
<div class="footer__inner">
|
||||||
{{ if .Site.Copyright }}
|
{{ if $.Site.Copyright }}
|
||||||
<div class="copyright copyright--user">{{ .Site.Copyright| safeHTML }}</div>
|
<div class="copyright copyright--user">{{ $.Site.Copyright | safeHTML }}</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ partial "logo.html" . }}
|
{{ partial "logo.html" . }}
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
@ -12,5 +12,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/assets/main.js"></script>
|
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||||
<script src="/assets/prism.js"></script>
|
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||||
<meta name="keywords" content="{{ .Site.Params.keywords }}"/>
|
<meta name="keywords" content="{{ $.Site.Params.keywords }}"/>
|
||||||
<meta name="robots" content="noodp"/>
|
<meta name="robots" content="noodp"/>
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
|
|
||||||
<!-- Theme CSS -->
|
<!-- Theme CSS -->
|
||||||
<link rel="stylesheet" href="{{ $.Site.BaseURL }}/assets/style.css">
|
<link rel="stylesheet" href="{{ "assets/style.css" | absURL }}">
|
||||||
|
|
||||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||||
<link rel="stylesheet" href="{{ $.Site.BaseURL }}/style.css">
|
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||||
|
|
||||||
<!-- Icons -->
|
<!-- Icons -->
|
||||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ $.Site.BaseURL }}/img/apple-touch-icon-144-precomposed.png">
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ "img/apple-touch-icon-144-precomposed.png" | absURL }}">
|
||||||
<link rel="shortcut icon" href="{{ $.Site.BaseURL }}/img/favicon.png">
|
<link rel="shortcut icon" href="{{ "img/favicon.png" | absURL }}">
|
||||||
|
|
||||||
<!-- Twitter Card -->
|
<!-- Twitter Card -->
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}" />
|
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}" />
|
||||||
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||||
<meta name="twitter:site" content="{{ .Site.BaseURL }}" />
|
<meta name="twitter:site" content="{{ $.Site.BaseURL }}" />
|
||||||
<meta name="twitter:creator" content="{{ .Params.Author }}" />
|
<meta name="twitter:creator" content="{{ .Params.Author }}" />
|
||||||
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ end }}">
|
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ printf "img/%s" . | absURL }}{{ end }}">
|
||||||
|
|
||||||
<!-- OG data -->
|
<!-- OG data -->
|
||||||
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||||
<meta property="og:url" content="{{ .Permalink }}" />
|
<meta property="og:url" content="{{ .Permalink }}" />
|
||||||
<meta property="og:site_name" content="{{ .Title }}" />
|
<meta property="og:site_name" content="{{ .Title }}" />
|
||||||
<meta property="og:image" content="{{ with .Params.Cover }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ end }}">
|
<meta property="og:image" content="{{ with .Params.Cover }}{{ printf "img/%s" . | absURL }}{{ end }}">
|
||||||
<meta property="og:image:width" content="2048">
|
<meta property="og:image:width" content="2048">
|
||||||
<meta property="og:image:height" content="1024">
|
<meta property="og:image:height" content="1024">
|
||||||
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
|
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||||
@ -43,5 +43,5 @@
|
|||||||
|
|
||||||
<!-- JSON Feed -->
|
<!-- JSON Feed -->
|
||||||
{{ if .OutputFormats.Get "json" }}
|
{{ if .OutputFormats.Get "json" }}
|
||||||
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
|
<link href="{{ if .OutputFormats.Get "json" }}{{ "feed.json" | absURL }}{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<span class="header__inner">
|
<span class="header__inner">
|
||||||
{{ partial "logo.html" . }}
|
{{ partial "logo.html" . }}
|
||||||
<span class="header__right">
|
<span class="header__right">
|
||||||
{{ if len .Site.Menus }}
|
{{ if len $.Site.Menus }}
|
||||||
{{ partial "menu.html" . }}
|
{{ partial "menu.html" . }}
|
||||||
<span class="menu-trigger">
|
<span class="menu-trigger">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<a href="{{ if .Site.Params.Logo.LogoHomeLink }}{{ .Site.Params.Logo.LogoHomeLink }}{{else}}{{ .Site.BaseURL }}{{ end }}" style="text-decoration: none;">
|
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}" style="text-decoration: none;">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
{{ if .Site.Params.Logo.path }}
|
{{ if $.Site.Params.Logo.path }}
|
||||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
<img src="{{ $.Site.Params.Logo.path }}" alt="{{ $.Site.Params.Logo.alt }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<span class="logo__mark">></span>
|
<span class="logo__mark">></span>
|
||||||
<span class="logo__text">{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello friend{{ end }}</span>
|
<span class="logo__text">{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}hello friend{{ end }}</span>
|
||||||
<span class="logo__cursor"></span>
|
<span class="logo__cursor"></span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<nav class="menu">
|
<nav class="menu">
|
||||||
<ul class="menu__inner">
|
<ul class="menu__inner">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range $.Site.Menus.main }}
|
||||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user