Merge pull request #40 from pepijng/master
Add fontawesome icons to navbar (you need to modify configuration file!)
This commit is contained in:
commit
0b322dc131
13
example.conf
13
example.conf
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue