helpers
This commit is contained in:
parent
42a6e6d071
commit
de36420195
7 changed files with 30 additions and 33 deletions
4
Rules
4
Rules
|
@ -134,10 +134,6 @@ end
|
||||||
#
|
#
|
||||||
# HOMEPAGE
|
# HOMEPAGE
|
||||||
#
|
#
|
||||||
route '/index.*' do
|
|
||||||
'/index.html'
|
|
||||||
end
|
|
||||||
|
|
||||||
route '/tipuesearch_content.js.erb' do
|
route '/tipuesearch_content.js.erb' do
|
||||||
'/tipuesearch_content.js'
|
'/tipuesearch_content.js'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
img {
|
|
||||||
max-width: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-ul {
|
.fa-ul {
|
||||||
list-style: none !important;
|
list-style: none !important;
|
||||||
|
|
||||||
|
|
|
@ -2,24 +2,23 @@
|
||||||
navigable: true
|
navigable: true
|
||||||
title: Cammie
|
title: Cammie
|
||||||
---
|
---
|
||||||
<div class="fullpage">
|
|
||||||
<img
|
<img id="cammie" src="https://kelder.zeus.ugent.be/webcam/video/mjpg.cgi?profileid=2" alt="" />
|
||||||
id="cammie"
|
|
||||||
src="https://kelder.zeus.ugent.be/webcam/video/mjpg.cgi?profileid=2"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
<div id="left" class="ctrl">
|
<div id="left" class="ctrl">
|
||||||
<i class="fa fa-chevron-left fa-2x"></i>
|
<i class="fa fa-chevron-left fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="right" class="ctrl">
|
<div id="right" class="ctrl">
|
||||||
<i class="fa fa-chevron-right fa-2x"></i>
|
<i class="fa fa-chevron-right fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="up" class="ctrl">
|
<div id="up" class="ctrl">
|
||||||
<i class="fa fa-chevron-up fa-2x"></i>
|
<i class="fa fa-chevron-up fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="down" class="ctrl">
|
<div id="down" class="ctrl">
|
||||||
<i class="fa fa-chevron-down fa-2x"></i>
|
<i class="fa fa-chevron-down fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="/assets/scripts/cammie.js"></script>
|
<%= asset :js, :cammie %>
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
Zeus WPI | <%= item[:title] || 'Werkgroep Informatica van de Universiteit Gent' %>
|
Zeus WPI | <%= item[:title] || 'Werkgroep Informatica van de Universiteit Gent' %>
|
||||||
</title>
|
</title>
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="/assets/stylesheets/main.css">
|
|
||||||
|
<%= asset :css, :main %>
|
||||||
|
|
||||||
<link rel="icon" href="/assets/images/favicon32.png" type="image/x-icon" />
|
<link rel="icon" href="/assets/images/favicon32.png" type="image/x-icon" />
|
||||||
|
|
||||||
|
|
8
lib/helpers/assets.rb
Normal file
8
lib/helpers/assets.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
module AssetHelper
|
||||||
|
def asset(type, identifier)
|
||||||
|
{
|
||||||
|
js: "<script src='/assets/scripts/#{identifier}.js'></script>",
|
||||||
|
css: "<link rel='stylesheet' type='text/css' href='/assets/stylesheets/#{identifier}.css'>"
|
||||||
|
}[type]
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,9 +1,5 @@
|
||||||
module DataHelper
|
module DataHelper
|
||||||
def data_from(identifier)
|
def data_from(identifier)
|
||||||
data = YAML.load_file("data/#{identifier}.yaml")
|
YAML.load_file("data/#{identifier}.yaml")
|
||||||
data.each do |d|
|
|
||||||
p d
|
|
||||||
end
|
|
||||||
data
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,7 @@ include Nanoc::Helpers::Rendering
|
||||||
include Nanoc::Helpers::Text
|
include Nanoc::Helpers::Text
|
||||||
|
|
||||||
include ArchiveHelper
|
include ArchiveHelper
|
||||||
|
include AssetHelper
|
||||||
include IcalHelper
|
include IcalHelper
|
||||||
include NavigationHelper
|
include NavigationHelper
|
||||||
include DataHelper
|
include DataHelper
|
||||||
|
|
Loading…
Reference in a new issue