Skip to content

Commit 5d156e7

Browse files
committed
Add navigation icons
1 parent afc9581 commit 5d156e7

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

hurumap_ng/profiles.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ def get_profile(geo, profile_name, request):
3939

4040
tabs = []
4141
if not data['demographics'].get('is_missing'):
42-
tabs.append({'name': 'Demographics', 'href': '#demographics'})
42+
tabs.append({'name': 'Demographics', 'href': '#demographics', 'class': 'fa fa-user'})
4343

4444
if not data['health'].get('is_missing'):
45-
tabs.append({'name': 'Health', 'href': '#health'})
45+
tabs.append({'name': 'Health', 'href': '#health', 'class': 'fa fa-medkit'})
4646

4747
if not data['education'].get('is_missing'):
48-
tabs.append({'name': 'Education', 'href': '#education'})
48+
tabs.append({'name': 'Education', 'href': '#education', 'class': 'fa fa-graduation-cap'})
4949

5050
if not data['agriculture'].get('is_missing'):
51-
tabs.append({'name': 'Agriculture', 'href': '#agriculture'})
51+
tabs.append({'name': 'Agriculture', 'href': '#agriculture', 'class': 'fa fa-tree'})
5252

5353
if not data['crime'].get('is_missing'):
54-
tabs.append({'name': 'Corruption & Crime', 'href': '#crime'})
54+
tabs.append({'name': 'Corruption & Crime', 'href': '#crime', 'class': 'fa fa-shield'})
5555

5656
if not data['drugs'].get('is_missing'):
57-
tabs.append({'name': 'Drugs', 'href': '#drugs'})
57+
tabs.append({'name': 'Drugs', 'href': '#drugs', 'class': 'fa fa-ban'})
5858

5959
if not data['finance'].get('is_missing'):
60-
tabs.append({'name': 'Finances', 'href': '#finance'})
60+
tabs.append({'name': 'Finances', 'href': '#finance', 'class': 'fa fa-money'})
6161

6262
if not data['others'].get('is_missing'):
63-
tabs.append({'name': 'Others', 'href': '#others'})
63+
tabs.append({'name': 'Others', 'href': '#others', 'class': 'fa fa-folder'})
6464

6565
data['tabs'] = tabs
6666
return data

hurumap_ng/templates/profile/profile_detail.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
</div>
1212
<ul>
1313
{% for tab in tabs %}
14-
<li><a href={{tab.href}}><span>{{tab.name}}</span></a>
15-
</li>
14+
<li><i class="{{tab.class}}"></i><a href={{tab.href}}><span>{{tab.name}}</span></a></li></li>
1615
{% endfor %}
1716
</ul>
1817
</div>

0 commit comments

Comments
 (0)