Add fontawesome icons to navbar (you need to modify configuration file!)
This commit is contained in:
parent
21fe337b60
commit
84f3fa72ae
13
example.conf
13
example.conf
|
|
@ -26,6 +26,19 @@
|
||||||
Statistics = statistics
|
Statistics = statistics
|
||||||
Server = server
|
Server = server
|
||||||
Instellingen = instellingen
|
Instellingen = instellingen
|
||||||
|
[[icons]]
|
||||||
|
dashboard = dashboard
|
||||||
|
woonkamer = home
|
||||||
|
slaapkamer = bed
|
||||||
|
badkamer = bath
|
||||||
|
auto = automobile
|
||||||
|
tuin = bug
|
||||||
|
security = shield
|
||||||
|
verkeer = road
|
||||||
|
flitsers = camera
|
||||||
|
statistics = line-chart
|
||||||
|
server = desktop
|
||||||
|
instellingen = wrench
|
||||||
|
|
||||||
# Each navbar item needs a section. Components specify which components are displayed on the page. Other subsections contain names, Domoticz IDX's and options of the components displayed.
|
# Each navbar item needs a section. Components specify which components are displayed on the page. Other subsections contain names, Domoticz IDX's and options of the components displayed.
|
||||||
[dashboard]
|
[dashboard]
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ def generatePage():
|
||||||
blockArray = []
|
blockArray = []
|
||||||
configValues = {}
|
configValues = {}
|
||||||
configValues["navbar"] = config["navbar"]["menu"]
|
configValues["navbar"] = config["navbar"]["menu"]
|
||||||
|
configValues["navbar_icons"] = config["navbar"]["icons"]
|
||||||
configValues["server_location"] = config["general_settings"]["server"].get("url")
|
configValues["server_location"] = config["general_settings"]["server"].get("url")
|
||||||
configValues["flask_server_location"] = config["general_settings"]["server"].get("flask_url")
|
configValues["flask_server_location"] = config["general_settings"]["server"].get("flask_url")
|
||||||
configValues["domoboard"] = config["general_settings"]["domoboard"]
|
configValues["domoboard"] = config["general_settings"]["domoboard"]
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<div class="menu_section">
|
<div class="menu_section">
|
||||||
<ul class="nav side-menu">
|
<ul class="nav side-menu">
|
||||||
{% for k, v in configValues["navbar"].iteritems() %}
|
{% for k, v in configValues["navbar"].iteritems() %}
|
||||||
<li><a href="{{v}}">{{k}}</a></li>
|
<li><a href="{{v}}"><i class="fa fa-{{configValues["navbar_icons"][v]}} fa-fw" aria-hidden="true"></i>{{k}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue