we're getting there
This commit is contained in:
parent
6b5cfa3916
commit
367b2a6a17
10 changed files with 29 additions and 10 deletions
7
Rules
7
Rules
|
@ -37,7 +37,10 @@ preprocess do
|
|||
)
|
||||
end
|
||||
|
||||
academic_years_items[academic_years.max][:navigable] = true
|
||||
academic_years_items[academic_years.max].update_attributes(
|
||||
navigable: true,
|
||||
order: 10
|
||||
)
|
||||
|
||||
all_events.each do |event|
|
||||
event[:time] = Date.parse(event[:time])
|
||||
|
@ -54,6 +57,8 @@ compile '/feed.xml' do
|
|||
write '/feed.xml'
|
||||
end
|
||||
|
||||
passthrough '/quotes.json'
|
||||
|
||||
#
|
||||
# ARCHIVES
|
||||
#
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
navigable: true
|
||||
title: About
|
||||
order: 0
|
||||
---
|
||||
<div class="content">
|
||||
<h1>Over Zeus WPI</h1>
|
||||
|
|
4
content/assets/scripts/quote.coffee
Normal file
4
content/assets/scripts/quote.coffee
Normal file
|
@ -0,0 +1,4 @@
|
|||
$ ->
|
||||
$.getJSON 'http://localhost:3000/quotes.json', (data) ->
|
||||
quote = data[Math.floor(Math.random()*data.length)]
|
||||
$('#quote').append("<h3>#{quote.title}</h3><p>#{quote.description}</p>")
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
navigable: true
|
||||
title: Events
|
||||
order: 20
|
||||
---
|
||||
|
||||
<div>
|
||||
|
|
|
@ -5,7 +5,7 @@ description: Zeus bezoekt het datacenter en de supercomputer in S10!
|
|||
created_at: 3-10-2016
|
||||
time: 10-10-2016
|
||||
location: hpc gent
|
||||
locationlink: Sterre,Ghent Belgium
|
||||
locationlink: 51.023650, 3.712018
|
||||
---
|
||||
|
||||
Zeus WPI organiseert in samenwerking met de medewerkers van de HPC een rondleiding in de S10.
|
||||
|
|
|
@ -14,21 +14,26 @@
|
|||
<%= render '/partials/_tile.*', article: all_events[1], small_text: "Upcoming event" %>
|
||||
</div>
|
||||
<div class="tile is-parent is-4">
|
||||
<div class="tile is-child box highlighted centering">
|
||||
<img src="//thecatapi.com/api/images/get?format=src&type=gif&size=small">
|
||||
<div class="tile is-child box highlighted">
|
||||
<!-- <img src="//thecatapi.com/api/images/get?format=src&type=gif&size=small"> -->
|
||||
<div class="content has-text-centered">
|
||||
<blockquote id="quote" >
|
||||
<!-- INTENTIONALLY LEFT BLANK -->
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-vertical is-2">
|
||||
<a class="tile" href="https://zeus.ugent.be/wiki">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-text-centered" >
|
||||
<div class="tile is-child box imgcenter" >
|
||||
<%= fa 'wikipedia-w' %>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="tile" href="/cammie">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-text-centered">
|
||||
<div class="tile is-child box imgcenter">
|
||||
<%= fa 'video-camera' %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,14 +42,14 @@
|
|||
<div class="tile is-vertical is-2">
|
||||
<a class="tile" href="https://github.com/ZeusWPI">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-text-centered">
|
||||
<div class="tile is-child box imgcenter">
|
||||
<%= fa 'github' %>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="tile" href="https://www.facebook.com/zeus.wpi/?fref=ts">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-text-centered">
|
||||
<div class="tile is-child box imgcenter">
|
||||
<%= fa 'facebook-official' %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -71,3 +76,4 @@
|
|||
</div>
|
||||
</div>
|
||||
<%= asset :js, :gamification %>
|
||||
<%= asset :js, :quote %>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
navigable: true
|
||||
title: Projecten
|
||||
order: 30
|
||||
---
|
||||
<div class="content">
|
||||
<div class="container">
|
||||
|
|
1
content/quotes.json
Normal file
1
content/quotes.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
|||
<p class="subtitle is-3">
|
||||
<ul class="fa-ul">
|
||||
<li><%= fa 'clock-o', li: true %><%= item[:time].strftime '%A %d %B %Y' %></li>
|
||||
<li><%= fa 'globe', li: true %><%= item[:location] %></li>
|
||||
<li><%= fa 'map-marker', li: true %><%= item[:location] %></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module NavigationHelper
|
||||
def nav_items
|
||||
navigables = items.select { |i| i[:navigable] }
|
||||
navigables = items.select { |i| i[:navigable] }.sort_by { |x| x[:order] || 10000 }
|
||||
|
||||
navigables.each do |item|
|
||||
is_active = @item_rep && @item_rep.path == item.path
|
||||
|
|
Loading…
Reference in a new issue