From 6e945579e94bfc7d9317cb843a9fb3839ec421f5 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Thu, 4 Aug 2016 19:17:45 +0200 Subject: [PATCH] mailto icons, fixes #35 --- content/about.erb | 38 ++++++++++++++++++++++++++----------- content/cammie.erb | 8 ++++---- layouts/eventpost.erb | 8 ++++---- layouts/generic.erb | 2 +- lib/helpers/font_awesome.rb | 10 ++++++++++ lib/helpers_.rb | 1 + 6 files changed, 47 insertions(+), 20 deletions(-) create mode 100644 lib/helpers/font_awesome.rb diff --git a/content/about.erb b/content/about.erb index f123ba0..341e548 100644 --- a/content/about.erb +++ b/content/about.erb @@ -23,18 +23,34 @@ title: About Het bestuur voor het academiejaar 2016-2017 van Zeus WPI is: - <% data_from(:bestuur).each do |lid| %> - - - + + + + + + <% data_from(:bestuur).each do |lid| %> + + + - - <% end %> + + + + <% end %> +
- <%= lid['rol'] %> - - +
+ Functie + + Naam + + +
+ <%= lid['rol'] %> + <%= lid['naam'] %> - -
+ + <%= fa :envelope %> + +
diff --git a/content/cammie.erb b/content/cammie.erb index e813b05..72125b8 100644 --- a/content/cammie.erb +++ b/content/cammie.erb @@ -6,19 +6,19 @@ title: Cammie
- + <%= fa 'chevron-left', size: '2x' %>
- + <%= fa 'chevron-up', size: '2x' %>
- + <%= fa 'chevron-down', size: '2x' %>
<%= asset :js, :cammie %> diff --git a/layouts/eventpost.erb b/layouts/eventpost.erb index 6f9d1dc..9efe6c3 100644 --- a/layouts/eventpost.erb +++ b/layouts/eventpost.erb @@ -16,8 +16,8 @@

@@ -31,8 +31,8 @@
    -
  • <%= item[:time] %>
  • -
  • <%= item[:location] %>
  • +
  • <%= fa 'clock-o', li: true %><%= item[:time] %>
  • +
  • <%= fa 'globe', li: true %><%= item[:location] %>
diff --git a/layouts/generic.erb b/layouts/generic.erb index 92a3da4..939e300 100644 --- a/layouts/generic.erb +++ b/layouts/generic.erb @@ -10,7 +10,7 @@

- Made with by Zeus WPI + Made with <%= fa :heart, inline: true %> by Zeus WPI

diff --git a/lib/helpers/font_awesome.rb b/lib/helpers/font_awesome.rb new file mode 100644 index 0000000..e293685 --- /dev/null +++ b/lib/helpers/font_awesome.rb @@ -0,0 +1,10 @@ +module FontAwesomeHelper + def fa(icon, size: nil, li: false, inline: false) + classes = ['fa', "fa-#{icon}"] + + classes << "fa-#{size}" if size + classes << 'fa-li' if li + + "" + end +end diff --git a/lib/helpers_.rb b/lib/helpers_.rb index 394ec84..a09791f 100644 --- a/lib/helpers_.rb +++ b/lib/helpers_.rb @@ -9,3 +9,4 @@ include AssetHelper include IcalHelper include NavigationHelper include DataHelper +include FontAwesomeHelper