Splited the data of navigation tabs.

This commit is contained in:
Cotes Chung 2020-02-17 03:36:54 +08:00
parent 32d838fede
commit a82d3647da
3 changed files with 31 additions and 7 deletions

View file

@ -4,12 +4,6 @@
# © 2017-2019 Cotes Chung # © 2017-2019 Cotes Chung
# MIT Licensed # MIT Licensed
tabs:
- { name: "Home", icon: 'fas fa-home' }
- { name: "Categories", path: tabs, url: categories, icon: 'fas fa-stream' }
- { name: "Tags", path: tabs, url: tags, icon: 'fas fa-tags' }
- { name: "Archives", path: tabs, url: archives, icon: 'fas fa-archive'}
- { name: "About", path: tabs, url: about, icon: 'fas fa-info'}
panel: panel:
lastmod: "Recent Update" lastmod: "Recent Update"

30
_data/tabs.yaml Normal file
View file

@ -0,0 +1,30 @@
# The tab data.
# v2.1
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2020 Cotes Chung
# MIT Licensed
-
name: Home
icon: "fas fa-home"
-
name: Categories
icon: "fas fa-stream"
path: tabs
url: categories
-
name: "Tags"
icon: "fas fa-tags"
path: tabs
url: tags
-
name: "Archives"
path: tabs
url: archives
icon: "fas fa-archive"
-
name: "About"
icon: "fas fa-info"
path: tabs
url: about

View file

@ -30,7 +30,7 @@
<ul class="nav flex-column"> <ul class="nav flex-column">
{% assign page_urls = page.url | split: "/" %} {% assign page_urls = page.url | split: "/" %}
{% for item in site.data.label.tabs %} {% for item in site.data.tabs %}
{% assign ref = site.baseurl | append: "/" %} {% assign ref = site.baseurl | append: "/" %}
{% if item.path %} {% if item.path %}