Add fontawesome icons to navbar (you need to modify configuration file!)

This commit is contained in:
Pepijn Goossens 2017-01-05 11:45:32 +01:00
parent 21fe337b60
commit 84f3fa72ae
3 changed files with 15 additions and 1 deletions

View File

@ -26,6 +26,19 @@
Statistics = statistics
Server = server
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.
[dashboard]

View File

@ -32,6 +32,7 @@ def generatePage():
blockArray = []
configValues = {}
configValues["navbar"] = config["navbar"]["menu"]
configValues["navbar_icons"] = config["navbar"]["icons"]
configValues["server_location"] = config["general_settings"]["server"].get("url")
configValues["flask_server_location"] = config["general_settings"]["server"].get("flask_url")
configValues["domoboard"] = config["general_settings"]["domoboard"]

View File

@ -20,7 +20,7 @@
<div class="menu_section">
<ul class="nav side-menu">
{% 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 %}
</ul>