mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-16 16:15:12 +00:00
widgets: Add active option to activate/deactivate widgets
This commit is contained in:
1 parent
7b4bdd22bd
commit
29ba4f7ada
11 files changed
+23
-32
No files matched your search
@@ -1,10 +1,8 @@
|
|||||||
+++
|
+++
|
||||||
# About/Biography widget.
|
# About/Biography widget.
|
||||||
|
|
||||||
date = "2016-04-20T00:00:00"
|
|
||||||
draft = false
|
|
||||||
|
|
||||||
widget = "about"
|
widget = "about"
|
||||||
|
active = true
|
||||||
|
date = "2016-04-20T00:00:00"
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 5
|
weight = 5
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
+++
|
+++
|
||||||
# Contact widget.
|
# Contact widget.
|
||||||
|
widget = "contact"
|
||||||
|
active = true
|
||||||
date = "2016-04-20T00:00:00"
|
date = "2016-04-20T00:00:00"
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Contact"
|
title = "Contact"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "contact"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 70
|
weight = 70
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
+++
|
+++
|
||||||
# Hero widget.
|
# Hero widget.
|
||||||
|
widget = "hero"
|
||||||
|
active = true
|
||||||
date = 2017-10-15
|
date = 2017-10-15
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Academic"
|
title = "Academic"
|
||||||
widget = "hero"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 3
|
weight = 3
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
+++
|
+++
|
||||||
# Recent Posts widget.
|
# Recent Posts widget.
|
||||||
# This widget displays recent posts from `content/post/`.
|
# This widget displays recent posts from `content/post/`.
|
||||||
|
widget = "posts"
|
||||||
|
active = true
|
||||||
date = "2016-04-20T00:00:00"
|
date = "2016-04-20T00:00:00"
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Recent Posts"
|
title = "Recent Posts"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "posts"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 40
|
weight = 40
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
+++
|
+++
|
||||||
# Projects widget.
|
# Projects widget.
|
||||||
# This widget displays all projects from `content/project/`.
|
# This widget displays all projects from `content/project/`.
|
||||||
|
widget = "projects"
|
||||||
|
active = true
|
||||||
date = "2016-04-20T00:00:00"
|
date = "2016-04-20T00:00:00"
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Projects"
|
title = "Projects"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "projects"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 50
|
weight = 50
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
+++
|
+++
|
||||||
# Recent Publications widget.
|
# Recent Publications widget.
|
||||||
# This widget displays recent publications from `content/publication/`.
|
# This widget displays recent publications from `content/publication/`.
|
||||||
|
widget = "publications"
|
||||||
|
active = true
|
||||||
date = 2016-04-20
|
date = 2016-04-20
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Recent Publications"
|
title = "Recent Publications"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "publications"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 20
|
weight = 20
|
||||||
|
|||||||
@@ -2,13 +2,12 @@
|
|||||||
# Selected Publications widget.
|
# Selected Publications widget.
|
||||||
# This widget displays publications from `content/publication/` which have
|
# This widget displays publications from `content/publication/` which have
|
||||||
# `selected = true` in their `+++` front matter.
|
# `selected = true` in their `+++` front matter.
|
||||||
|
widget = "publications_selected"
|
||||||
|
active = true
|
||||||
date = 2016-04-20
|
date = 2016-04-20
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Selected Publications"
|
title = "Selected Publications"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "publications_selected"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
+++
|
+++
|
||||||
# Tag Cloud widget.
|
# Tag Cloud widget.
|
||||||
|
widget = "tag_cloud"
|
||||||
|
active = true
|
||||||
date = 2017-09-20
|
date = 2017-09-20
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Tags"
|
title = "Tags"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "tag_cloud"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 65
|
weight = 65
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
+++
|
+++
|
||||||
# Recent and Upcoming Talks widget.
|
# Recent and Upcoming Talks widget.
|
||||||
|
widget = "talks"
|
||||||
|
active = true
|
||||||
date = "2016-04-20T00:00:00"
|
date = "2016-04-20T00:00:00"
|
||||||
draft = false
|
|
||||||
|
|
||||||
title = "Recent & Upcoming Talks"
|
title = "Recent & Upcoming Talks"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "talks"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 30
|
weight = 30
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
+++
|
+++
|
||||||
|
# Custom widget.
|
||||||
# An example of using the custom widget to create your own homepage section.
|
# An example of using the custom widget to create your own homepage section.
|
||||||
# To create more sections, duplicate this file and edit the values below as desired.
|
# To create more sections, duplicate this file and edit the values below as desired.
|
||||||
|
widget = "custom"
|
||||||
|
active = true
|
||||||
date = "2016-04-20T00:00:00"
|
date = "2016-04-20T00:00:00"
|
||||||
draft = false
|
|
||||||
|
|
||||||
|
# Note: a full width section format can be enabled by commenting out the `title` and `subtitle` with a `#`.
|
||||||
title = "Teaching"
|
title = "Teaching"
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
widget = "custom"
|
|
||||||
|
|
||||||
# Order that this section will appear in.
|
# Order that this section will appear in.
|
||||||
weight = 60
|
weight = 60
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
{{ $section := .Scratch.Get "section" }}
|
{{ $section := .Scratch.Get "section" }}
|
||||||
|
|
||||||
<!-- Widgets -->
|
<!-- Widgets -->
|
||||||
{{ range $index, $page := where .Data.Pages "Section" $section }}
|
{{ range $index, $page := where (where .Data.Pages "Section" $section) ".Params.active" "!=" false }}
|
||||||
{{ $params := dict "root" $ "page" $page }}
|
{{ $params := dict "root" $ "page" $page }}
|
||||||
{{ $widget := printf "widgets/%s.html" ( or $page.Params.widget "custom" ) }}
|
{{ $widget := printf "widgets/%s.html" ( or $page.Params.widget "custom" ) }}
|
||||||
{{ if eq $page.Params.widget "hero" }}
|
{{ if eq $page.Params.widget "hero" }}
|
||||||
|
|||||||
Reference in new issue
Block a user