mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-24 16:55:07 +01:00
Fix typos
This commit is contained in:
parent
d9db5c5b8e
commit
80b1f0ddeb
@ -5,7 +5,7 @@ paginate = 5
|
||||
|
||||
[params]
|
||||
# dir name of your blog content (default is `content/posts`)
|
||||
contentTypeName = "posts"
|
||||
contentTypeName = "post"
|
||||
# "light" or "dark"
|
||||
defaultTheme = "dark"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
<html lang="{{ $.Site.Language }}">
|
||||
<head>
|
||||
{{ block "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" }}
|
||||
<div class="posts">
|
||||
{{ $isntDefault := not (or (eq (trim .Site.Params.contentTypeName " ") "posts") (eq (trim .Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string .Site.Params.contentTypeName) "posts" }}
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
@ -11,19 +11,19 @@
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
||||
<span class="post-author">{{ $.Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
||||
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="/img/{{ . }}" class="post-cover" />
|
||||
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
@ -35,7 +35,7 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</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>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
@ -5,19 +5,19 @@
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
||||
<span class="post-author">{{ $.Site.Params.WrittenBy }} {{ .Params.Author }}</span>
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
||||
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="/img/{{ . }}" class="post-cover" />
|
||||
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
@ -26,7 +26,7 @@
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if .Site.Copyright }}
|
||||
<div class="copyright copyright--user">{{ .Site.Copyright| safeHTML }}</div>
|
||||
{{ if $.Site.Copyright }}
|
||||
<div class="copyright copyright--user">{{ $.Site.Copyright | safeHTML }}</div>
|
||||
{{else}}
|
||||
{{ partial "logo.html" . }}
|
||||
<div class="copyright">
|
||||
@ -12,5 +12,5 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/main.js"></script>
|
||||
<script src="/assets/prism.js"></script>
|
||||
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||
|
@ -1,27 +1,27 @@
|
||||
<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="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||
<meta name="keywords" content="{{ .Site.Params.keywords }}"/>
|
||||
<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||
<meta name="keywords" content="{{ $.Site.Params.keywords }}"/>
|
||||
<meta name="robots" content="noodp"/>
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<!-- 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) -->
|
||||
<link rel="stylesheet" href="{{ $.Site.BaseURL }}/style.css">
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ $.Site.BaseURL }}/img/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="shortcut icon" href="{{ $.Site.BaseURL }}/img/favicon.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ "img/apple-touch-icon-144-precomposed.png" | absURL }}">
|
||||
<link rel="shortcut icon" href="{{ "img/favicon.png" | absURL }}">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<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: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: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 -->
|
||||
<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:url" content="{{ .Permalink }}" />
|
||||
<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:height" content="1024">
|
||||
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||
@ -43,5 +43,5 @@
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ 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 }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<span class="header__inner">
|
||||
{{ partial "logo.html" . }}
|
||||
<span class="header__right">
|
||||
{{ if len .Site.Menus }}
|
||||
{{ if len $.Site.Menus }}
|
||||
{{ partial "menu.html" . }}
|
||||
<span class="menu-trigger">
|
||||
<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">
|
||||
{{ if .Site.Params.Logo.path }}
|
||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
||||
{{ if $.Site.Params.Logo.path }}
|
||||
<img src="{{ $.Site.Params.Logo.path }}" alt="{{ $.Site.Params.Logo.alt }}" />
|
||||
{{ else }}
|
||||
<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>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ range $.Site.Menus.main }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user