Skip to content

Commit

Permalink
Add inschrijflink for start of academic year (#275)
Browse files Browse the repository at this point in the history
* Add inschrijflink for start of academic year

* Rely on autoprefixer
  • Loading branch information
wschella committed Sep 24, 2018
1 parent 75fab28 commit 637e5c1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
17 changes: 12 additions & 5 deletions content/assets/stylesheets/includes/navbar.scss
@@ -1,3 +1,5 @@
@import 'mixins';

#navbar {
align-items: flex-end;
margin-bottom: 10px;
Expand Down Expand Up @@ -42,10 +44,10 @@
}

@include touch {
.navbar-menu {
position: absolute;
width: 100%;
}
.navbar-menu {
position: absolute;
width: 100%;
}
}

.navbar:not(.is-transparent) {
Expand All @@ -61,4 +63,9 @@
}
}
}
}

#ledenformulier {
color: $zeus-orange;
transform: rotate(10deg);
}
}
5 changes: 5 additions & 0 deletions layouts/partials/_navbar.erb
Expand Up @@ -20,6 +20,11 @@
<%= i[:title] %>
</a>
<% end %>
<% if new_member_time? %>
<a class="navbar-item" id="ledenformulier" href="https://zeus.gent/ledenformulier">
Schrijf je in!
</a>
<%end%>
</div>
<!-- TODO: Remove this is-hidden-touch, it's just a convenience for now -->
<div class="navbar-end is-hidden-touch">
Expand Down
5 changes: 5 additions & 0 deletions lib/helpers/time.rb
Expand Up @@ -13,6 +13,11 @@ def studytime?
])
end

def new_member_time?
year = Time.now.year
timehelper([[Time.new(year, 9, 20), Time.new(year, 10, 15)]])
end

def timehelper(ranges)
ranges.any? { |range| periodhelper(*range) }
end
Expand Down

0 comments on commit 637e5c1

Please sign in to comment.