bulma 0.4 n shit

This commit is contained in:
Lorin Werthen 2017-03-20 15:15:14 +01:00
parent da8b87e695
commit 63377b6d1c
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
3 changed files with 9 additions and 3 deletions

View file

@ -93,7 +93,7 @@ footer.footer {
transition: all 0.30s ease-in-out; transition: all 0.30s ease-in-out;
&.is-active { &.is-active {
max-height: 250px; max-height: 275px;
} }
} }

View file

@ -1,8 +1,11 @@
# frozen_string_literal: true
# Helpers for navbar partial
module NavigationHelper module NavigationHelper
def nav_items def nav_items
navigables.each do |item| navigables.each do |item|
# Kind of hacky way to check if page is child of another page # Kind of hacky way to check if page is child of another page
root = %r{/[^\/]*/}.match(item.path)[0] root = %r{/.+?/}.match(item.path)[0]
is_active = @item_rep && @item_rep.path.start_with?(root) is_active = @item_rep && @item_rep.path.start_with?(root)
@ -10,6 +13,9 @@ module NavigationHelper
end end
end end
# Returns every navigable item
# A navigable item contains the :navigable attribute
# Optionally contains an order attribute, determining the order in the navbar
def navigables def navigables
items.select { |i| i[:navigable] }.sort_by { |x| x[:order] || 10_000 } items.select { |i| i[:navigable] }.sort_by { |x| x[:order] || 10_000 }
end end

View file

@ -7,6 +7,6 @@
"license": "MIT", "license": "MIT",
"repository": "https://github.com/ZeusWPI/zeus.ugent.be", "repository": "https://github.com/ZeusWPI/zeus.ugent.be",
"dependencies": { "dependencies": {
"bulma": "0.3.2" "bulma": "0.4.0"
} }
} }