summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_includes/header.html5
-rw-r--r--assets/css/style.css8
-rw-r--r--assets/js/irssi.js13
3 files changed, 11 insertions, 15 deletions
diff --git a/_includes/header.html b/_includes/header.html
index 57299f1..0cef3a7 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -1,12 +1,13 @@
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
+ <input type="checkbox" id="navbar-toggle-cbox">
<div class="navbar-header">
- <button type="button" class="navbar-toggle" id="navbar-toggle">
+ <label for="navbar-toggle-cbox" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
- </button>
+ </label>
<a class="{% if page.url == "/index.html" or page.url == "/" %}active {% endif %} navbar-brand" href="{{ site.baseurl }}/">
<img alt="Irssi Logo" class="navbar-irssi-logo" src="{{ site.baseurl }}/assets/logo.png">
{% comment %}{{ site.title }}{% endcomment %}
diff --git a/assets/css/style.css b/assets/css/style.css
index 7076744..6630f58 100644
--- a/assets/css/style.css
+++ b/assets/css/style.css
@@ -44,6 +44,14 @@ p.center {
text-align: center;
}
+/* collapsible navbar css */
+#navbar-toggle-cbox {
+ display: none;
+}
+#navbar-toggle-cbox:checked ~ .collapse {
+ display: block;
+}
+
/* center buttons in xs view */
@media (max-width: 767px) {
.jumbotron .col-xs-11 p {
diff --git a/assets/js/irssi.js b/assets/js/irssi.js
index 429774c..18a82c5 100644
--- a/assets/js/irssi.js
+++ b/assets/js/irssi.js
@@ -1,16 +1,3 @@
-function initMenu() {
- 'use strict';
- var toggle = document.getElementById("navbar-toggle"),
- menu = document.getElementById("navbar");
- toggle.addEventListener('click', function (event) {
- menu.classList.toggle("in");
- });
-}
-
-document.addEventListener("DOMContentLoaded", function(event) {
- initMenu();
-});
-
// http://stackoverflow.com/a/34003331
if (Element.prototype.scrollIntoView && !Element.prototype.scrollIntoViewIfNeeded) {
Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) {