j1m_nav 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.md +21 -0
- data/README.md +41 -0
- data/_data/modules/default/j1_nav-0.0.1/j1_bootsnav.yml +337 -0
- data/_data/modules/default/j1_nav-0.0.1/j1_bootsnav_mainmenu.yml +266 -0
- data/_data/resources/default/j1_nav-0.0.1/resource.yml +25 -0
- data/_includes/themes/j1/modules/adapter/bootsnav/bootsnav.html +102 -0
- data/_includes/themes/j1/modules/adapter/bootsnav/procedures/mainmenu.proc +268 -0
- data/_includes/themes/j1/modules/adapter/bootsnav/procedures/quicklinks.proc +93 -0
- data/_includes/themes/j1/modules/adapter/bootsnav/procedures/sidebar.proc +123 -0
- data/_includes/themes/j1/modules/adapter/bootsnav/procedures/topsearch.proc +126 -0
- data/assets/themes/j1/bs_bootsnav/LICENSE.md +21 -0
- data/assets/themes/j1/bs_bootsnav/README.md +44 -0
- data/assets/themes/j1/bs_bootsnav/css/bootsnav.css +1570 -0
- data/assets/themes/j1/bs_bootsnav/css/bootsnav.min.css +28 -0
- data/assets/themes/j1/bs_bootsnav/css/skins/j1_template.css +394 -0
- data/assets/themes/j1/bs_bootsnav/css/style.css +503 -0
- data/assets/themes/j1/bs_bootsnav/css/style.min.css +20 -0
- data/assets/themes/j1/bs_bootsnav/images/brand/logo-black.png +0 -0
- data/assets/themes/j1/bs_bootsnav/images/brand/logo-white.png +0 -0
- data/assets/themes/j1/bs_bootsnav/images/thumb/thumb01.jpg +0 -0
- data/assets/themes/j1/bs_bootsnav/images/thumb/thumb02.jpg +0 -0
- data/assets/themes/j1/bs_bootsnav/images/thumb/thumb03.jpg +0 -0
- data/assets/themes/j1/bs_bootsnav/js/bootsnav.js +586 -0
- data/assets/themes/j1/bs_bootsnav/js/bootsnav.min.js +26 -0
- data/exe/console +14 -0
- data/exe/setup +8 -0
- data/lib/j1m_nav.rb +5 -0
- data/lib/j1m_nav/version.rb +3 -0
- metadata +118 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
# -----------------------------------------------------------
|
3
|
+
# BS Bootsnav (NAV Module)
|
4
|
+
#
|
5
|
+
- resource:
|
6
|
+
enabled: true
|
7
|
+
version: 0.0.1
|
8
|
+
id: j1_bootsnav
|
9
|
+
comment: Resources for BS Bootsnav
|
10
|
+
layout: [ home, page, post, app ]
|
11
|
+
region: head
|
12
|
+
required: always
|
13
|
+
script_load: sync
|
14
|
+
data:
|
15
|
+
css: [
|
16
|
+
bs_bootsnav/css/bootsnav
|
17
|
+
]
|
18
|
+
files: [
|
19
|
+
bs_bootsnav/css/skins/j1_template.css,
|
20
|
+
j1/js/adapters/bs_bootsnav.js
|
21
|
+
]
|
22
|
+
js: [
|
23
|
+
bs_bootsnav/js/bootsnav
|
24
|
+
]
|
25
|
+
init_function: J1BsBootsnav.init
|
@@ -0,0 +1,102 @@
|
|
1
|
+
{% comment %}
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# J1: ~/_includes/templates/j1/modules/adapter/bootsnav/bootsnav.html
|
4
|
+
# Liquid HTML template to create the navigation system for J1 Template
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# https://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2017 Juergen Adams
|
10
|
+
#
|
11
|
+
# J1 Template is licensed under the MIT License.
|
12
|
+
# For details, see https://jekyll.one
|
13
|
+
#
|
14
|
+
# -----------------------------------------------------------------------------
|
15
|
+
# Test data:
|
16
|
+
# liquid_var: {{ liquid_var | debug }}
|
17
|
+
#
|
18
|
+
# -----------------------------------------------------------------------------
|
19
|
+
{% endcomment %}
|
20
|
+
|
21
|
+
{% comment %} Liquid procedures (J1 Template) {% endcomment %}
|
22
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
23
|
+
|
24
|
+
{% include themes/{{site.template.name}}/procedures/global/setup.proc %}
|
25
|
+
{% capture select_color %}themes/{{site.template.name}}/procedures/components/select_color.proc{% endcapture %}
|
26
|
+
|
27
|
+
{% comment %} Liquid procedures (HTML Adapter) {% endcomment %}
|
28
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
29
|
+
|
30
|
+
{% capture topsearch_create %}themes/{{site.template.name}}/modules/adapter/bootsnav/procedures/topsearch.proc{% endcapture %}
|
31
|
+
{% capture sidebar_create %}themes/{{site.template.name}}/modules/adapter/bootsnav/procedures/sidebar.proc{% endcapture %}
|
32
|
+
{% capture quicklinks_create %}themes/{{site.template.name}}/modules/adapter/bootsnav/procedures/quicklinks.proc{% endcapture %}
|
33
|
+
{% capture mainmenu_create %}themes/{{site.template.name}}/modules/adapter/bootsnav/procedures/mainmenu.proc{% endcapture %}
|
34
|
+
|
35
|
+
{% comment %} Liquid var initialization {% endcomment %}
|
36
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
37
|
+
|
38
|
+
{% assign bootsnav_config = site.data.modules.j1_bootsnav %}
|
39
|
+
{% assign mainmenu_config = site.data.modules.j1_bootsnav_mainmenu %}
|
40
|
+
{% assign navID = "bootsnav_nav" %}
|
41
|
+
|
42
|
+
<!-- Initialize navigation classes -->
|
43
|
+
{% capture nav_defaults %}navbar navbar-default bootsnav {% endcapture %}
|
44
|
+
{% assign nav_fixed = '' %}
|
45
|
+
{% assign nav_style = 'no-background' %}
|
46
|
+
{% assign nav_color = 'dark' %}
|
47
|
+
|
48
|
+
{% if bootsnav_config.navbar.fixed %}
|
49
|
+
{% assign nav_fixed = 'navbar-fixed' %}
|
50
|
+
{% if bootsnav_config.navbar.style == 'overlay' %}
|
51
|
+
{% assign nav_style = 'navbar-transparent' %}
|
52
|
+
{% endif %}
|
53
|
+
{% endif %}
|
54
|
+
|
55
|
+
{% if bootsnav_config.navbar.color == 'light' %}
|
56
|
+
{% assign nav_color = 'white' %}
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
{% comment %} Main {% endcomment %}
|
60
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
61
|
+
|
62
|
+
<!-- START NavBar -->
|
63
|
+
<nav id="{{navID}}" class="{{nav_defaults}} {{nav_color}} {{nav_fixed}} {{nav_style}}">
|
64
|
+
|
65
|
+
<!-- CHECK if TopSearch is enabled -->
|
66
|
+
{% if bootsnav_config.top_search.enabled %}
|
67
|
+
<!-- Include TopSearch -->
|
68
|
+
{% include {{ topsearch_create }} bootsnav_config=bootsnav_config %}
|
69
|
+
{% endif %}
|
70
|
+
|
71
|
+
<!-- CHECK if Sidebar is enabled -->
|
72
|
+
{% if bootsnav_config.sidebar.enabled %}
|
73
|
+
<!-- Include Sidebar -->
|
74
|
+
{% include {{ sidebar_create }} bootsnav_config=bootsnav_config %}
|
75
|
+
{% endif %}
|
76
|
+
|
77
|
+
<!-- CHECK if Quicklinks are enabled -->
|
78
|
+
{% if bootsnav_config.quicklinks.enabled %}
|
79
|
+
<!-- Include Quicklinks -->
|
80
|
+
{% include {{ quicklinks_create }} bootsnav_config=bootsnav_config %}
|
81
|
+
{% endif %}
|
82
|
+
|
83
|
+
<!-- START Header Navigation -->
|
84
|
+
<div class="navbar-header">
|
85
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu">
|
86
|
+
<i class="mdi mdi-menu mdi-48px" style="color:#FFF"></i>
|
87
|
+
</button>
|
88
|
+
{% if site.brand.image %}
|
89
|
+
<a class="navbar-brand" href="{{ home_path }}"> <img src="{{ site.data.j1_config.image_path }}/{{ site.brand.image }}" height="{{ site.brand.image-height }}" alt="{{ site.brand.text }}"></a>
|
90
|
+
{% else %}
|
91
|
+
<a class="navbar-brand" href="{{ home_path }}"> <b><font color="{{ site.brand.text-color }}">{{ site.brand.text }}</font></b></a>
|
92
|
+
{% endif %}
|
93
|
+
</div>
|
94
|
+
<!-- END Header Navigation -->
|
95
|
+
|
96
|
+
<!-- START the main menue -->
|
97
|
+
{% include {{ mainmenu_create }} bootsnav_config=bootsnav_config mainmenu_config=mainmenu_config %}
|
98
|
+
<!-- END main menue -->
|
99
|
+
|
100
|
+
<!-- End NavBar -->
|
101
|
+
</nav>
|
102
|
+
<!-- End Main Navigation -->
|
@@ -0,0 +1,268 @@
|
|
1
|
+
{% comment %}
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# J1: ~/_includes/themes/j1/modules/adapter/nav_module/mainmenu.proc
|
4
|
+
# Liquid PROCEDURE to create the main menu (within the NavBar)
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# https://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2017 Juergen Adams
|
10
|
+
#
|
11
|
+
# J1 Template is licensed under the MIT License.
|
12
|
+
# For details, see https://jekyll.one
|
13
|
+
#
|
14
|
+
# -----------------------------------------------------------------------------
|
15
|
+
# Test data:
|
16
|
+
# liquid_var: {{ liquid_var | debug }}
|
17
|
+
#
|
18
|
+
# -----------------------------------------------------------------------------
|
19
|
+
{% endcomment %}
|
20
|
+
|
21
|
+
{% comment %} Liquid procedures {% endcomment %}
|
22
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
23
|
+
|
24
|
+
{% capture select_color %}themes/{{site.template.name}}/procedures/components/select_color.proc{% endcapture %}
|
25
|
+
{% capture select_icon_size %}themes/{{site.template.name}}/procedures/components/select_icon_size.proc{% endcapture %}
|
26
|
+
|
27
|
+
{% comment %} Liquid var initialization {% endcomment %}
|
28
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
29
|
+
|
30
|
+
{% assign bootsnav_config = include.bootsnav_config %}
|
31
|
+
{% assign mainmenu_config = include.mainmenu_config %}
|
32
|
+
{% assign theme_switcher_config = site.data.modules.j1_bs_theme_switcher %}
|
33
|
+
{% assign bs_theme_switcher_preview = '/bs_theme_switcher/preview' %}
|
34
|
+
|
35
|
+
{% if bootsnav_config.mainmenu.dropdown_animate != null %}
|
36
|
+
{% assign dropdown_animate = bootsnav_config.mainmenu.dropdown_animate %}
|
37
|
+
{% else %}
|
38
|
+
{% assign dropdown_animate = false %}
|
39
|
+
{% endif %}
|
40
|
+
|
41
|
+
<!-- Initialize menu icon properties -->
|
42
|
+
{% assign icon_family = bootsnav_config.mainmenu.icon_family %}
|
43
|
+
{% assign icon_color = bootsnav_config.mainmenu.icon_color %}
|
44
|
+
{% assign icon_size = bootsnav_config.mainmenu.icon_size %}
|
45
|
+
|
46
|
+
{% if icon_family == 'FontAwesome' %}
|
47
|
+
{% assign icon_family = 'fa' %}
|
48
|
+
{% endif %}
|
49
|
+
|
50
|
+
{% include {{select_color}} color=icon_color fallback="#9E9E9E" %}
|
51
|
+
{% assign icon_color = {{color}} %}
|
52
|
+
|
53
|
+
{% include {{select_icon_size}} family=icon_family size=icon_size %}
|
54
|
+
{% assign icon_size = {{size}} %}
|
55
|
+
|
56
|
+
{% comment %} Main {% endcomment %}
|
57
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
58
|
+
|
59
|
+
<!-- Collect the nav links, forms, and other content for toggling -->
|
60
|
+
<div class="collapse navbar-collapse" id="navbar-menu">
|
61
|
+
{% if dropdown_animate %}
|
62
|
+
<ul class="nav navbar-nav navbar-{{ bootsnav_config.navbar.position }}" data-in="{{dropdown_animate}}" data-out="{{dropdown_animate}}">
|
63
|
+
{% else %}
|
64
|
+
<ul class="nav navbar-nav navbar-{{ bootsnav_config.navbar.position }}" data-in="none" data-out="none">
|
65
|
+
{% endif %}
|
66
|
+
|
67
|
+
{% for menu in mainmenu_config %}
|
68
|
+
<!-- check if item has a sub-menu -->
|
69
|
+
{% if menu.sublevel != null %}
|
70
|
+
<!-- submenu level 1 detected -->
|
71
|
+
<li class="dropdown">
|
72
|
+
{% if menu.icon == null %}
|
73
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">{{ menu.item }} </a>
|
74
|
+
{% else %}
|
75
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"> <i class="{{icon_family}} {{icon_family}}-{{menu.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ menu.item }} </a>
|
76
|
+
{% endif %}
|
77
|
+
|
78
|
+
<ul class="dropdown-menu">
|
79
|
+
{% for level_1 in menu.sublevel %}
|
80
|
+
{% if level_1.dropdown == null %}
|
81
|
+
{% if level_1.icon == null %}
|
82
|
+
{% if level_1.target == null %}
|
83
|
+
<li><a href="{{ level_1.href }}">{{ level_1.title }}</a></li>
|
84
|
+
{% else %}
|
85
|
+
<li><a href="{{ level_1.href }}" target="{{ level_1.target }}">{{ level_1.title }}</a></li>
|
86
|
+
{% endif %}
|
87
|
+
{% else %}
|
88
|
+
{% if level_1.target == null %}
|
89
|
+
<li><a href="{{ level_1.href }}"><i class="{{icon_family}} {{icon_family}}-{{level_1.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_1.title }}</a></li>
|
90
|
+
{% else %}
|
91
|
+
<li><a href="{{ level_1.href }}" target="{{ level_1.target }}"><i class="{{icon_family}} {{icon_family}}-{{level_1.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_1.title }}</a></li>
|
92
|
+
{% endif %}
|
93
|
+
{% endif %}
|
94
|
+
{% endif %}
|
95
|
+
{% if level_1.divider %} <li class="divider"></li> {% endif %}
|
96
|
+
{% if level_1.dropdown != null %}
|
97
|
+
<!-- submenu level 2 (dropdown) detected -->
|
98
|
+
<li class="dropdown">
|
99
|
+
{% if level_1.icon == null %}
|
100
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ level_1.title }}</a>
|
101
|
+
{% else %}
|
102
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="{{icon_family}} {{icon_family}}-{{level_1.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_1.title }}</a>
|
103
|
+
{% endif %}
|
104
|
+
<ul class="dropdown-menu">
|
105
|
+
{% for level_2 in level_1.dropdown %}
|
106
|
+
{% if level_2.dropdown == null %}
|
107
|
+
{% if level_2.icon == null %}
|
108
|
+
{% if level_2.target == null %}
|
109
|
+
<li><a href="{{ level_2.href }}">{{ level_2.title }}</a></li>
|
110
|
+
{% else %}
|
111
|
+
<li><a href="{{ level_2.href }}" target="{{ level_2.target }}">{{ level_2.title }}</a></li>
|
112
|
+
{% endif %}
|
113
|
+
{% else %}
|
114
|
+
{% if level_2.target == null %}
|
115
|
+
<li><a href="{{ level_2.href }}"><i class="{{icon_family}} {{icon_family}}-{{level_2.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_2.title }}</a></li>
|
116
|
+
{% else %}
|
117
|
+
<li><a href="{{ level_2.href }}" target="{{ level_2.target }}"><i class="{{icon_family}} {{icon_family}}-{{level_2.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_2.title }}</a></li>
|
118
|
+
{% endif %}
|
119
|
+
{% endif %}
|
120
|
+
{% endif %}
|
121
|
+
{% if level_2.divider %} <li class="divider"></li> {% endif %}
|
122
|
+
{% if level_2.dropdown != null %}
|
123
|
+
<!-- submenu level 3 detected (last level supported) -->
|
124
|
+
<li class="dropdown">
|
125
|
+
{% if level_2.icon == null %}
|
126
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ level_2.title }}</a>
|
127
|
+
{% else %}
|
128
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="{{icon_family}} {{icon_family}}-{{level_2.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_2.title }}</a>
|
129
|
+
{% endif %}
|
130
|
+
<ul class="dropdown-menu">
|
131
|
+
{% for level_3 in level_2.dropdown %}
|
132
|
+
{% if level_2.icon == null %}
|
133
|
+
{% if level_3.target == null %}
|
134
|
+
<li><a href="{{ level_3.href }}">{{ level_3.title }}</a></li>
|
135
|
+
{% else %}
|
136
|
+
<li><a href="{{ level_3.href }}" target="{{ level_3.target }}">{{ level_3.title }}</a></li>
|
137
|
+
{% endif %}
|
138
|
+
{% else %}
|
139
|
+
{% if level_3.target == null %}
|
140
|
+
<li><a href="{{ level_3.href }}"><i class="{{icon_family}} {{icon_family}}-{{level_3.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_3.title }}</a></li>
|
141
|
+
{% else %}
|
142
|
+
<li><a href="{{ level_3.href }}" target="{{ level_3.target }}"><i class="{{icon_family}} {{icon_family}}-{{level_3.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ level_3.title }}</a></li>
|
143
|
+
{% endif %}
|
144
|
+
{% endif %}
|
145
|
+
{% if level_3.divider %} <li class="divider"></li> {% endif %}
|
146
|
+
{% endfor %} <!-- endfor level_3 -->
|
147
|
+
</ul>
|
148
|
+
</li>
|
149
|
+
{% endif %} <!-- endif level_2.dropdown -->
|
150
|
+
{% endfor %} <!-- endfor level_2 -->
|
151
|
+
</ul>
|
152
|
+
</li>
|
153
|
+
{% endif %} <!-- endif level_1.dropdown -->
|
154
|
+
{% endfor %} <!-- endfor level_1 -->
|
155
|
+
</ul>
|
156
|
+
</li>
|
157
|
+
{% else %}
|
158
|
+
<!-- check if top-level item is a megamenu -->
|
159
|
+
{% if menu.megamenu != null %}
|
160
|
+
<!-- Calculate size of mm_columns -->
|
161
|
+
{% assign columns = menu.megamenu | size %}
|
162
|
+
{% assign columns_width_md = 12 | divided_by:columns %}
|
163
|
+
{% comment %} {{ columns_width_md | debug }} {% endcomment %}
|
164
|
+
{% comment %} {{ menu.megamenu | debug }} {% endcomment %}
|
165
|
+
|
166
|
+
<li class="dropdown megamenu-fw">
|
167
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{menu.item}} </a>
|
168
|
+
<ul class="dropdown-menu megamenu-content" role="menu">
|
169
|
+
<li>
|
170
|
+
<div class="row">
|
171
|
+
{% for megabox in menu.megamenu %}
|
172
|
+
<div class="col-menu col-md-{{columns_width_md}} col-sm-6">
|
173
|
+
{% if megabox.icon == null %}
|
174
|
+
<h4 class="title">{{megabox.title}}</h4>
|
175
|
+
{% else %}
|
176
|
+
<h4 class="title"><i class="{{icon_family}} {{icon_family}}-{{megabox.icon}}" style="color:{{icon_color}}"></i> {{megabox.title}}</h4>
|
177
|
+
{% endif %}
|
178
|
+
<div class="content">
|
179
|
+
<ul class="menu-col">
|
180
|
+
{% for links in megabox.column %}
|
181
|
+
{% if links.icon == null %}
|
182
|
+
<li><a href="{{links.href}}" target="{{ links.target }}">{{links.title}}</a></li>
|
183
|
+
{% else %}
|
184
|
+
<li><a href="{{links.href}}" target="{{ links.target }}"><i class="{{icon_family}} {{icon_family}}-{{links.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{links.title}}</a></li>
|
185
|
+
{% endif %}
|
186
|
+
{% endfor %}
|
187
|
+
</ul>
|
188
|
+
</div>
|
189
|
+
</div> <!-- end megabox -->
|
190
|
+
{% endfor %}
|
191
|
+
</div> <!-- end row -->
|
192
|
+
</li>
|
193
|
+
</ul>
|
194
|
+
</li> <!-- end MegaMenu -->
|
195
|
+
{% endif %}
|
196
|
+
|
197
|
+
<!-- check if top-level item is the BS Theme Switcher -->
|
198
|
+
{% if menu.theme_select != null and theme_switcher_config.enabled %}
|
199
|
+
<li class="dropdown">
|
200
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">{{menu.item}} </a>
|
201
|
+
{% if dropdown_animate %}
|
202
|
+
<ul class="dropdown-menu">
|
203
|
+
<!-- ul class="dropdown-menu data-in="{{dropdown_animate}}" data-out="{{dropdown_animate}}" -->
|
204
|
+
{% else %}
|
205
|
+
<ul class="dropdown-menu">
|
206
|
+
{% endif %}
|
207
|
+
{% assign item_found = 'false' %}
|
208
|
+
{% for item in menu.theme_select %}
|
209
|
+
<!-- check for J1 Theme selector -->
|
210
|
+
{% if item.local_themes and item.local_themes == 'enabled' %}
|
211
|
+
<li class="dropdown">
|
212
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="{{icon_family}} {{icon_family}}-{{item.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{item.title}}</a>
|
213
|
+
<ul class="dropdown-menu" id="ThemeSelect"> </ul>
|
214
|
+
</li>
|
215
|
+
{% assign item_found = 'true' %}
|
216
|
+
{% endif %} <!-- end J1 theme selector -->
|
217
|
+
<!-- check for BootSwatch theme selector -->
|
218
|
+
{% if item.bootswatch_themes and item.bootswatch_themes == 'enabled' %}
|
219
|
+
<li class="dropdown">
|
220
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="{{icon_family}} {{icon_family}}-{{item.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{item.title}}</a>
|
221
|
+
<ul class="dropdown-menu" id="ThemeList"> </ul>
|
222
|
+
</li>
|
223
|
+
{% assign item_found = 'true' %}
|
224
|
+
{% endif %} <!-- end BootSwatch theme selector -->
|
225
|
+
{% if item.preview and item.preview == 'enabled' %}
|
226
|
+
<li>
|
227
|
+
<a href="{{ bs_theme_switcher_preview }}" ><i class="{{icon_family}} {{icon_family}}-{{item.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{item.title}}</a>
|
228
|
+
</li>
|
229
|
+
{% assign item_found = 'true' %}
|
230
|
+
{% endif %} <!-- end theme preview -->
|
231
|
+
<!-- fallback if no valid config found -->
|
232
|
+
{% if item_found == 'false' %}
|
233
|
+
<li>
|
234
|
+
{% if item.title %}
|
235
|
+
<a href="#" >Invalid: {{item.title}}</a>
|
236
|
+
{% else %}
|
237
|
+
<a href="#" >Item invalid</a>
|
238
|
+
{% endif %}
|
239
|
+
</li>
|
240
|
+
{% endif %} <!-- end fallback -->
|
241
|
+
{% endfor %}
|
242
|
+
</ul>
|
243
|
+
</li>
|
244
|
+
{% endif %}<!-- end ThemeSwitcher -->
|
245
|
+
|
246
|
+
<!-- display the top-level items (level 0 has no submenu) -->
|
247
|
+
{% if menu.icon == null and menu.megamenu == null and menu.theme_select == null %}
|
248
|
+
{% if menu.target == null %}
|
249
|
+
<li> <a href="{{ menu.href }}">{{ menu.item }}</a> </li>
|
250
|
+
{% else %}
|
251
|
+
<li> <a href="{{ menu.href }}" target="{{ menu.target }}">{{ menu.item }}</a> </li>
|
252
|
+
{% endif %}
|
253
|
+
{% endif %}
|
254
|
+
|
255
|
+
{% if menu.icon != null and menu.megamenu == null and menu.theme_select == null %}
|
256
|
+
{% if menu.target == null %}
|
257
|
+
<li> <a href="{{ menu.href }}"><i class="{{icon_family}} {{icon_family}}-{{menu.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ menu.item }}</a> </li>
|
258
|
+
{% else %}
|
259
|
+
<li> <a href="{{ menu.href }}" target="{{ menu.target }}"><i class="{{icon_family}} {{icon_family}}-{{menu.icon}}{{icon_size}}" style="color:{{icon_color}}"></i> {{ menu.item }}</a> </li>
|
260
|
+
{% endif %}
|
261
|
+
{% endif %}
|
262
|
+
|
263
|
+
{% endif %}
|
264
|
+
{% endfor %} <!-- endfor nav in site.data.j1_nav -->
|
265
|
+
|
266
|
+
</ul> <!-- end NavBar -->
|
267
|
+
</div> <!-- end collection for nav links, forms etc. -->
|
268
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
{% comment %}
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# J1: ~/_includes/templates/j1/modules/nav_module/quicklinks.html
|
4
|
+
# Liquid PROCEDURE template to create the QuickLinks Bar for J1 Template
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# https://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2017 Juergen Adams
|
10
|
+
#
|
11
|
+
# J1 Template is licensed under the MIT License.
|
12
|
+
# For details, see https://jekyll.one
|
13
|
+
#
|
14
|
+
# -----------------------------------------------------------------------------
|
15
|
+
# Test data:
|
16
|
+
# liquid_var: {{ liquid_var | debug }}
|
17
|
+
#
|
18
|
+
# -----------------------------------------------------------------------------
|
19
|
+
{% endcomment %}
|
20
|
+
|
21
|
+
{% assign bootsnav_config = include.bootsnav_config %}
|
22
|
+
|
23
|
+
{% comment %} Liquid procedures {% endcomment %}
|
24
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
25
|
+
|
26
|
+
{% capture select_color %}themes/{{site.template.name}}/procedures/components/select_color.proc{% endcapture %}
|
27
|
+
{% capture select_icon_size %}themes/{{site.template.name}}/procedures/components/select_icon_size.proc{% endcapture %}
|
28
|
+
|
29
|
+
|
30
|
+
{% comment %} Liquid var initialization {% endcomment %}
|
31
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
32
|
+
|
33
|
+
{% assign top_search_enabled = bootsnav_config.top_search.enabled %}
|
34
|
+
{% assign sidebar_enabled = bootsnav_config.sidebar.enabled %}
|
35
|
+
|
36
|
+
{% comment %} Set sidebar ressources {% endcomment %}
|
37
|
+
{% assign search_icon = bootsnav_config.quicklinks.top_search_icon %}
|
38
|
+
{% assign sidebar_icon = bootsnav_config.quicklinks.sidebar_icon %}
|
39
|
+
{% assign facebook_icon = bootsnav_config.quicklinks.facebook_icon %}
|
40
|
+
{% assign twitter_icon = bootsnav_config.quicklinks.twitter_icon %}
|
41
|
+
{% assign google_plus_icon = bootsnav_config.quicklinks.google_plus_icon %}
|
42
|
+
|
43
|
+
{% assign facebook_url = bootsnav_config.quicklinks.facebook_url %}
|
44
|
+
{% assign twitter_url = bootsnav_config.quicklinks.twitter_url %}
|
45
|
+
{% assign google_plus_url = bootsnav_config.quicklinks.google_plus_url %}
|
46
|
+
|
47
|
+
{% if bootsnav_config.icon_family == 'FontAwesome' %}
|
48
|
+
{% assign icon_family = 'fa' %}
|
49
|
+
{% endif %}
|
50
|
+
|
51
|
+
{% if bootsnav_config.quicklinks.icon_color != null %}
|
52
|
+
{% include {{select_color}} color=bootsnav_config.quicklinks.icon_color fallback="#9E9E9E" %}
|
53
|
+
{% assign my_icon_color = {{color}} %}
|
54
|
+
{% capture icon_color %}style="color:{{my_icon_color}}"{% endcapture %}
|
55
|
+
{% else %}
|
56
|
+
{% assign icon_color = '' %}
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
{% include {{select_icon_size}} family=bootsnav_config.icon_family size=bootsnav_config.quicklinks.icon_size %}
|
60
|
+
{% assign icon_size = {{size}} %}
|
61
|
+
|
62
|
+
|
63
|
+
{% comment %} Fallback configs {% endcomment %}
|
64
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
65
|
+
|
66
|
+
{% unless icon_family %}
|
67
|
+
{% assign icon_family = 'mdi' %}
|
68
|
+
{% assign icon_size = 'mdi-18px' %}
|
69
|
+
{% endunless %}
|
70
|
+
|
71
|
+
{% unless search_icon %}
|
72
|
+
{% assign search_icon = 'magnify' %}
|
73
|
+
{% endunless %}
|
74
|
+
|
75
|
+
{% unless sidebar_icon %}
|
76
|
+
{% assign sidebar_icon = 'menu' %}
|
77
|
+
{% endunless %}
|
78
|
+
|
79
|
+
|
80
|
+
{% comment %} Main {% endcomment %}
|
81
|
+
{% comment %} ------------------------------------------------- {% endcomment %}
|
82
|
+
|
83
|
+
<!-- Start QuickLink Navigation -->
|
84
|
+
<div class="attr-nav">
|
85
|
+
<ul>
|
86
|
+
{% if facebook_url %}<li><a href="{{facebook_url}}"><i class="{{icon_family}} {{icon_family}}-{{facebook_icon}} {{icon_size}}" {{icon_color}}></i></a></li>{% endif %}
|
87
|
+
{% if twitter_url %}<li><a href="{{twitter_url}}"><i class="{{icon_family}} {{icon_family}}-{{twitter_icon}} {{icon_size}}" {{icon_color}}></i></a></li>{% endif %}
|
88
|
+
{% if google_plus_url %}<li><a href="{{google_plus_url}}"><i class="{{icon_family}} {{icon_family}}-{{google_plus_icon}} {{icon_size}}" {{icon_color}}></i></a></li>{% endif %}
|
89
|
+
{% if top_search_enabled %}<li class="search"><a href="#"><i class="{{icon_family}} {{icon_family}}-{{search_icon}} {{icon_size}}" {{icon_color}}></i></a></li>{% endif %}
|
90
|
+
{% if sidebar_enabled %}<li class="side-menu"><a href="#"><i class="{{icon_family}} {{icon_family}}-{{sidebar_icon}} {{icon_size}}" {{icon_color}}></i></a></li>{% endif %}
|
91
|
+
</ul>
|
92
|
+
</div>
|
93
|
+
<!-- End QuickLink Navigation -->
|