homepage iniT
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{{ $emojis := dict
|
||||
"tip" ":bulb:"
|
||||
"note" ":page_with_curl:"
|
||||
"info" ":information_source:"
|
||||
"warning" ":warning:"
|
||||
"caution" ":exclamation:"
|
||||
"danger" ":bangbang:"
|
||||
}}
|
||||
|
||||
{{ if eq .Type "alert" }}
|
||||
<blockquote class="alert alert-{{ .AlertType }}">
|
||||
<div class="alert-heading">
|
||||
<p class="alert-heading-emoji">
|
||||
{{ transform.Emojify (index $emojis .AlertType) }}
|
||||
</p>
|
||||
<p class="alert-heading-text">
|
||||
{{ with .AlertTitle }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
{{ or (i18n .AlertType) (title .AlertType) }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
{{ .Text }}
|
||||
</blockquote>
|
||||
{{ else }}
|
||||
<blockquote>
|
||||
{{ .Text }}
|
||||
</blockquote>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,6 @@
|
||||
<a
|
||||
href="{{ .Destination }}"
|
||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
||||
{{ if strings.HasPrefix .Destination "http" }}target="_blank" rel="noopener"{{ end }}
|
||||
>{{ .Text | safeHTML }}</a
|
||||
>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
{{ with site.Params.author }}<meta name="author" content="{{ . }}" />{{ end }}
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ with .Params.metadescription }}<meta name="description" content="{{ . }}" />{{ end }}
|
||||
{{ with .Params.metakeywords }}<meta name="keywords" content="{{ . }}" />{{ end }}
|
||||
{{ else }}
|
||||
{{ with site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }}
|
||||
{{ with site.Params.keywords }}<meta name="keywords" content="{{ . }}" />{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<base href="{{ .Permalink }}" />
|
||||
<title>{{ block "title" . }}{{ site.Title }}{{ end }}</title>
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+Mono:400,600,700" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Anonymous+Pro:400,500,700" />
|
||||
|
||||
<link rel="stylesheet" href="{{ "css/styles.css" | absURL }}" />
|
||||
|
||||
<link rel="icon" type="image/png" href="{{ "/images/favicon.png" | absURL }}" sizes="32x32" />
|
||||
|
||||
{{ 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 }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="wrapper">
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
|
||||
<div class="content">
|
||||
{{ block "content" . }}{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }} ·
|
||||
{{ .Site.Title }}
|
||||
{{ end }}
|
||||
{{ define "content" }}
|
||||
{{ partial "list.html" . }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }} ·
|
||||
{{ .Site.Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ partial "post.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "page.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user