WIP: start page with header
This commit is contained in:
parent
9d834470a6
commit
06b0b4d643
18 changed files with 1683 additions and 9 deletions
13
layouts/partials/components/button.html
Normal file
13
layouts/partials/components/button.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!--
|
||||
type: string - default filled
|
||||
text: string
|
||||
icon: string (optional)
|
||||
url: string
|
||||
-->
|
||||
{{ $outlined := "outlined"}}
|
||||
<a class="{{if eq .type $outlined}} button-outlined {{else}} button-filled {{end}}" href="{{ .url }}">
|
||||
{{ with .icon }}
|
||||
<i class="icon-{{ . }}"></i>
|
||||
{{ end }}
|
||||
{{ .text }}
|
||||
</a>
|
7
layouts/partials/components/image.html
Normal file
7
layouts/partials/components/image.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!--
|
||||
type: string - default
|
||||
url: string
|
||||
alt: string
|
||||
-->
|
||||
{{ $avatar := "avatar"}}
|
||||
<img class="{{if eq .type $avatar}} avatar {{end}}" alt="{{ .alt }}" src="{{ .url }}">
|
|
@ -0,0 +1 @@
|
|||
<div>test</div>
|
|
@ -0,0 +1,44 @@
|
|||
<head>
|
||||
<meta name="description"
|
||||
content="{{ if .Params.summary }}{{ .Params.summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ else }}Hardcoded description; the author should update :){{ end }}" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title>
|
||||
{{ block "opengraph" . }}
|
||||
<meta property="og:type" content="website" />
|
||||
{{ with .Site.LanguageCode }}
|
||||
<meta property="og:locale" content='{{ replace . "-" "_" }}' />
|
||||
{{ end }}
|
||||
<meta property="og:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
{{ if .Params.image }}
|
||||
<meta property="og:image" content="{{ .Params.image | absURL }}" />
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ .Site.Params.logo | absURL }}" />
|
||||
{{ end }}
|
||||
{{ if .Params.summary }}
|
||||
<meta property="og:description" content="{{ .Params.summary }}" />
|
||||
{{ else if .Content }}
|
||||
<meta property="og:description" content="{{ .Content | safeHTML | truncate 100 }}" />
|
||||
{{ else }}
|
||||
<meta property="og:description" content="{{ .Site.Params.Description }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- $favIcon := .Site.Params.favIcon }}
|
||||
<link rel="icon" type="image/png" sizes="16x16"
|
||||
href="{{ if $favIcon.small }}{{ $favIcon.small }}{{ else }}/favIcon16x16.png{{ end }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32"
|
||||
href="{{ if $favIcon.big }}{{ $favIcon.big }}{{ else }}/favIcon32x32.png{{ end }}">
|
||||
{{ with .Site.Params.tracking }}
|
||||
<script src="{{ . }}"></script>
|
||||
{{ end }}
|
||||
{{ $template := resources.Get "scss/index.scss" }}
|
||||
{{ if $template }}
|
||||
{{ $index := $template | resources.ExecuteAsTemplate "css/index.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $index.RelPermalink }}">
|
||||
{{ end }}
|
||||
<link id="dark-mode-theme" rel="stylesheet" href="/css/dark.css">
|
||||
<link rel="stylesheet" type="text/css" href="/icons/fontawesome.css">
|
||||
</head>
|
|
@ -0,0 +1 @@
|
|||
<div>test</div>
|
31
layouts/partials/hero.html
Normal file
31
layouts/partials/hero.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!--
|
||||
id: string
|
||||
odd: 0 or 1
|
||||
hero:
|
||||
avatar: image
|
||||
greeting: string
|
||||
social: array
|
||||
type: string
|
||||
url: string
|
||||
content: string
|
||||
-->
|
||||
<div id="{{ .id }}" class="section {{if eq .odd 0}} section-even {{end}} row">
|
||||
<div class="section-content hero">
|
||||
{{ with .hero }}
|
||||
<div class="hero-content">
|
||||
{{ if .avatar }}
|
||||
{{ partial "components/image.html" .avatar }}
|
||||
{{ end }}
|
||||
<div>
|
||||
<h1>{{ .greeting }}</h1>
|
||||
<h3>{{ .introduction }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .content }}
|
||||
<div class="description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue