Upload files to 'layouts/partials'

master
Edwin Lyon 3 years ago
parent 7db70454e2
commit 9eb07e3fc5
  1. 46
      layouts/partials/blog-sidebar.html
  2. 39
      layouts/partials/head.html
  3. 15
      layouts/partials/preloader.html

@ -0,0 +1,46 @@
{{ "<!-- sidebar -->" | safeHTML }}
<aside class="col-lg-4 order-1 order-lg-2">
{{ "<!-- categories -->" | safeHTML }}
<div class="bg-white mb-5">
<h4 class="mb-4">{{ i18n "categories" }}</h4>
{{- if isset site.Taxonomies "categories" }}
{{- if not (eq (len site.Taxonomies.categories) 0) }}
<ul class="list-unstyled">
{{- range $name, $items := site.Taxonomies.categories }}
<li class="border-bottom"><a href="{{ `categories/` | relLangURL }}{{ $name | urlize | lower }}" class="d-block pb-3 mt-3">{{ $name | title | humanize }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- end }}
</div>
{{ "<!-- tags -->" | safeHTML }}
<div class="bg-white mb-5">
<h4 class="mb-4">{{ i18n "tags" }}</h4>
{{- if isset site.Taxonomies "tags" }}
{{- if not (eq (len site.Taxonomies.tags) 0) }}
<ul class="list-inline">
{{- range $name, $items := site.Taxonomies.tags }}
<li class="list-inline-item mb-2"><a class="px-3 py-2 d-block bg-light" href="{{ `tags/` | relLangURL }}{{ $name | urlize | lower }}">{{ $name | humanize }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- end }}
</div>
{{ "<!-- latest post -->" | safeHTML }}
<div class="bg-white">
<h4 class="mb-4">{{ i18n "latest_article" }}</h4>
{{ "<!-- post-item -->" | safeHTML }}
{{ range first 3 ( where site.Pages "Type" "post" )}}
<div class="media border-bottom border-color pb-3 mb-3">
<a href="{{ .Permalink }}"><img loading="lazy" class="mr-3 post-thumb-sm" src="{{ .Params.Image | absURL }}"></a>
<div class="media-body">
<a href="{{ .Permalink }}">
<h5 class="mt-0">{{ .Title }}</h5>
</a>
{{ .PublishDate.Format "02 Jan 2006" }}
</div>
</div>
{{ end }}
</div>
</aside>
{{ "<!-- /sidebar -->" | safeHTML }}

@ -0,0 +1,39 @@
<!--
PROJECT: Copper Hugo
VERSION: 1.1.0
AUTHOR: Themefisher
AUTHOR WEBSITE: https://themefisher.com
-->
<head>
<meta charset="utf-8">
<title>{{ .Title }}</title>
{{ "<!-- mobile responsive meta -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ hugo.Generator }}
{{ "<!-- plugins -->" | safeHTML }}
{{ range site.Params.plugins.css }}
<link rel="stylesheet" href="{{ .link | absURL }}">
{{ end }}
{{ "<!-- Main Stylesheet -->" | safeHTML }}
{{ $styles := resources.Get "scss/style.scss" | toCSS }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
{{ "<!--Favicon-->" | safeHTML }}
<link rel="shortcut icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">
<link rel="icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">
{{ with .Params.Image }}
<meta property="og:image" content="{{ . | absURL }}" />
{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_analytics.html" . }}
</head>

@ -0,0 +1,15 @@
{{ if site.Params.preloader.enable }}
{{ "<!-- preloader start -->" | safeHTML }}
<div class="preloader position-fixed d-flex align-items-center justify-content-center">
<div class="block">
<div class="loader-image mb-20">
<img loading="lazy" src="images/preloader.png" alt="">
</div>
<h2 class="loader-text text-uppercase">
<span class="h3 font-weight-light mb-1">Welcome to</span>
<span class="font-weight-bold">Copper</span>
</h2>
</div>
</div>
{{ "<!-- preloader end -->" | safeHTML }}
{{ end }}
Loading…
Cancel
Save