refactor: add baseof.html page

feature/cover-image
nodejh 4 years ago
parent 8754fb7202
commit 61bcd2848e

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "navigation.html" . }}
<section id="wrapper" class="home">
<article class="post">

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode | default "en" }}">
<head>
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
{{ partialCached "site-head.html" . }}
</head>
<body>
{{ partial "navigation.html" . }}
{{ block "header" . }}{{ end }}
{{ block "main" . }}{{ end }}
{{ block "footer" . }}{{ end }}
</body>
</html>

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "navigation.html" . }}
<section id="wrapper" class="post">
<article>

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}

@ -0,0 +1,15 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ partial "post-list.html" . }}
{{ partial "pagination.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>

@ -1,15 +1,27 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ define "main" }}
{{ partial "profile.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ partial "post-list.html" . }}
{{ partial "pagination.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>
<section id="wrapper" class="home">
<ul id="post-list">
{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if ne $url "about/" }}
<li>
<aside class="dates">{{ .Date.Format "Jan 2" }}</aside>
<a href='{{ .Permalink }}'>
{{ .Title }}
{{ if .Site.Params.enableSummary }}
{{ if .Site.Params.useDescriptionReplaceSummary }}
<h2>{{ .Description | plainify }}</h2>
{{ else }}
<h2>{{ .Summary | plainify | htmlUnescape }}</h2>
{{ end }}
{{ end }}
</a>
</li>
{{ end }}
{{ end }}
</ul>
</section>
{{ end }}

@ -4,7 +4,6 @@
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
{{ end }}
<a href='{{ .Site.BaseURL }}posts'>{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
<a href='{{ .Site.BaseURL }}tags'>{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
<a href='{{ .Site.BaseURL }}about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
{{ range $key, $val := .Site.Params.Links }}

@ -1,11 +1,13 @@
<div class="profile">
<section id="wrapper">
<header id="header">
<a href='{{ with .Site.Params.avatarLink }}{{ . }}{{ else }}{{ .Site.BaseURL }}about{{ end }}'>
<img id="avatar" class="2x" src="{{ .Site.BaseURL }}images/avatar.png"/>
</a>
<h1>{{ .Site.Title }}</h1>
{{ with .Site.Params.bio }}<h2>{{ . | markdownify }}</h2>{{ end }}
</header>
</section>
</div>
<section id="wrapper">
<header id="header">
<a href="{{ with .Site.Params.avatarLink }}{{ . }}{{ else }}{{ .Site.BaseURL }}about{{ end }}">
<img id="avatar" class="2x" src="{{ .Site.BaseURL }}images/avatar.png" />
</a>
<h1>{{ .Site.Title }}</h1>
{{ with .Site.Params.bio }}
<h2>{{ . | markdownify }}</h2>
{{ end }}
</header>
</section>
</div>

@ -0,0 +1,31 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
<link rel="stylesheet" href={{ "css/style.css" | relURL }}>
<link rel="shortcut icon" href={{ "/images/favicon.ico" | relURL }} type="image/x-icon" />
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">

Loading…
Cancel
Save