Skip to content

Commit 02d79ce

Browse files
authored
feat: included navigation items to header (#700)
1 parent c7d6de7 commit 02d79ce

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

_layouts/_includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 class="site-title"><a class="logo-text" href="/index.html"><img src="{{ 'ass
1414
{% set nav_lang = lang %}
1515
{% endif %}
1616
<li class="menu-item {{ current }}" role="menuitem">
17-
<a class="{{ current }}" href="{{ nav_lang }}{{ item.url }}"> <i class="{{ item.fa }}" aria-hidden="true"></i>&nbsp;{{ t.nav[forloop.index0] }} </a>
17+
<a class="{{ current }}" href="{{ nav_lang }}{{ item.url }}"> <i class="{{ item.fa }}" aria-hidden="true"></i>&nbsp;{{ item.text }} </a>
1818
</li>
1919
{% endfor %}
2020
{% if locales | length > 1 %}

app.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
from render_engine import Site, Page
22

3+
navigation = [
4+
{"text": "Home", "url": "/", "fa": "fa fa-home fa-fw"},
5+
{"text": "Blog", "url": "/blog/", "fa": "fa fa-newspaper fa-fw"},
6+
{"text": "About Us", "url": "/about/", "fa": "fa fa-info-circle fa-fw"},
7+
{"text": "Events", "url": "/events/", "fa": "fa fa-calendar fa-fw"},
8+
{"text": "Community", "url": "/community/", "fa": "fa fa-users fa-fw"},
9+
{"text": "Support Us", "url": "/support/", "fa": "fa-solid fa-money-check-dollar"},
10+
]
11+
312
app = Site()
413
app.template_path = "_layouts"
514
app.static_paths.add("assets")
615
app.site_vars["locales"] = ["en"]
7-
16+
app.site_vars["navigation"] = navigation
817

918
@app.page
1019
class Index(Page):
1120
template = "index.html"
21+
current = "nav-current"
1222
content_path = "index.html"

0 commit comments

Comments
 (0)