summaryrefslogtreecommitdiffstats
path: root/blog/_includes
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-09-11 19:29:00 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-09-11 19:29:00 +0200
commit78c50bf4993790a8a19f676f1ffc6099cf16978e (patch)
tree392910708c15816e99a20d7d73e6e3f39f973cb2 /blog/_includes
parentf2f64c97b673904728fd3e63585d5b2619ddf3f2 (diff)
downloadnorsk-urskog-main-78c50bf4993790a8a19f676f1ffc6099cf16978e.tar.gz
norsk-urskog-main-78c50bf4993790a8a19f676f1ffc6099cf16978e.tar.bz2
norsk-urskog-main-78c50bf4993790a8a19f676f1ffc6099cf16978e.zip
Add language switcher to menu bar.
Diffstat (limited to 'blog/_includes')
-rw-r--r--blog/_includes/language-switcher.html7
-rw-r--r--blog/_includes/menubar.html3
2 files changed, 9 insertions, 1 deletions
diff --git a/blog/_includes/language-switcher.html b/blog/_includes/language-switcher.html
new file mode 100644
index 0000000..22f2e05
--- /dev/null
+++ b/blog/_includes/language-switcher.html
@@ -0,0 +1,7 @@
+<span class="language-switcher">
+ {% if site.lang == "nb" %}
+ <a href="{{ site.baseurl_root | append: "en" }}">{% t global.english %}</a>
+ {% else if site.lang == "en" %}
+ <a href="{{ site.baseurl_root }}">{% t global.norwegian %}</a>
+ {% endif %}
+</span> \ No newline at end of file
diff --git a/blog/_includes/menubar.html b/blog/_includes/menubar.html
index 76d49cc..cc7de78 100644
--- a/blog/_includes/menubar.html
+++ b/blog/_includes/menubar.html
@@ -1,8 +1,9 @@
<nav class="site-nav">
- <a class="page-link" href="{{ site.baseurl | append: "/" }}">{% t titles.home %}</a>
+ <a class="page-link" href="{{ site.baseurl }}">{% t titles.home %}</a>
{% for page in site.pages %}
{% if page.title %}
<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{% page_title page.title %}</a>
{% endif %}
{% endfor %}
+ {% include language-switcher.html %}
</nav>