Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/huyb1991/hugo-lamp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuy Ng <huyb.1991@gmail.com>2019-08-18 15:09:07 +0300
committerGitHub <noreply@github.com>2019-08-18 15:09:07 +0300
commit53f45eb6411cc4ee9424f256841f752abc5f461a (patch)
treebbdbbb12434b5e1729a8eeeb7410cc41ce4e244f
parent7613f1dfe8585c7f12608845bedc0d8627806121 (diff)
parent2c73260f06f867570253a5fbc7c0cbe6e0f7a58b (diff)
Merge pull request #47 from huyb1991/feature/implement-layout
Feature/implement layout
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/svg-icons.html7
4 files changed, 3 insertions, 9 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index ec3acd1..3491c3a 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -5,6 +5,7 @@ theme = "hugo-lamp"
googleAnalytics = "UA-XXX-X" # Google Analytics UA number
[params]
+ mainSections = ["posts"]
subtitle = "Light responsive AMP theme"
author = "Huy Nguyen"
logo = "/img/avatar.jpg"
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 0e598aa..7f96a98 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -22,7 +22,7 @@
{{ end }}
{{ end }}
</header>
- {{ $paginator := .Paginate (where .Data.Pages "Type" "post") (index .Site.Params "paginate" | default 10) }}
+ {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") (index .Site.Params "paginate" | default 10) }}
{{ if ne $paginator.TotalPages 0 }}
{{ range $paginator.Pages.ByDate.Reverse }}
{{ .Render "summary" }}
diff --git a/layouts/index.html b/layouts/index.html
index dd83868..8c865ba 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,6 @@
{{ define "main" }}
<section class="main entry-list">
- {{ $paginator := .Paginate (where .Data.Pages "Type" "post") (index .Site.Params "paginate" | default 10) }}
+ {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") (index .Site.Params "paginate" | default 10) }}
{{ if ne $paginator.TotalPages 0 }}
{{ range $paginator.Pages.ByDate.Reverse }}
{{ .Render "summary" }}
diff --git a/layouts/partials/svg-icons.html b/layouts/partials/svg-icons.html
index 4142188..cbba3b6 100644
--- a/layouts/partials/svg-icons.html
+++ b/layouts/partials/svg-icons.html
@@ -62,13 +62,6 @@
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
- <symbol id="icon-googleplus" viewBox="0 0 24 24">
- <title>Google+</title>
- <path d="M7.635 10.909v2.619h4.335c-.173 1.125-1.31 3.295-4.331 3.295-2.604 0-4.731-2.16-4.731-4.823 0-2.662 2.122-4.822 4.728-4.822 1.485 0 2.479.633 3.045 1.178l2.073-1.994c-1.33-1.245-3.056-1.995-5.115-1.995C3.412 4.365 0 7.785 0 12s3.414 7.635 7.635 7.635c4.41 0 7.332-3.098 7.332-7.461 0-.501-.054-.885-.12-1.265H7.635zm16.365 0h-2.183V8.726h-2.183v2.183h-2.182v2.181h2.184v2.184h2.189V13.09H24" />
- </symbol>
-</svg>
-
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon-pinterest" viewBox="0 0 24 24">
<title>Pinterest</title>
<path d="M8.134 18.748c0-1.6.2-3 .8-4.4.5-1.4 1.2-2.6 2.2-3.6.9-1 2-1.9 3.2-2.6 1.2-.8 2.5-1.3 3.9-1.7 1.5-.4 2.9-.5 4.4-.5 2.2 0 4.3.4 6.2 1.4 1.9.9 3.5 2.3 4.7 4.1 1.2 1.9 1.8 3.9 1.8 6.2 0 1.4-.1 2.7-.4 4-.2 1.3-.7 2.6-1.2 3.8-.6 1.2-1.3 2.3-2.2 3.2-.8.9-1.8 1.7-3.1 2.2-1.2.6-2.5.9-4 .9-1 0-1.9-.3-2.9-.7-.9-.5-1.6-1.1-2-1.9-.1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