From b256efd86c0cd990acb49d8be4b19f7a36c1659c Mon Sep 17 00:00:00 2001 From: Niko Strijbol Date: Wed, 2 Nov 2016 15:25:36 +0100 Subject: [PATCH] Inline svg is not longer necessary --- content/assets/stylesheets/includes/projects.scss | 8 ++++++++ content/projects.erb | 13 +++++++++---- lib/helpers/projects.rb | 6 ------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/content/assets/stylesheets/includes/projects.scss b/content/assets/stylesheets/includes/projects.scss index bc45664..47fd916 100644 --- a/content/assets/stylesheets/includes/projects.scss +++ b/content/assets/stylesheets/includes/projects.scss @@ -7,6 +7,14 @@ div { margin: 10px; } + + img { + width: 200px; + } +} + +.clear { + clear: both; } @media (max-width: #{$tablet}) { diff --git a/content/projects.erb b/content/projects.erb index 92c9e10..ab5517b 100644 --- a/content/projects.erb +++ b/content/projects.erb @@ -7,7 +7,7 @@ order: 30
- + <%= asset :img, 'hydra.png' %>
@@ -19,18 +19,23 @@ order: 30 diff --git a/lib/helpers/projects.rb b/lib/helpers/projects.rb index e743ec6..cbebd53 100644 --- a/lib/helpers/projects.rb +++ b/lib/helpers/projects.rb @@ -3,10 +3,4 @@ module ProjectsHelper def all_projects @items.find_all('/projects/*') end - # Inline a svg file. - def svg(name) - File.open("content/assets/images/#{name}.svg", "rb") do |file| - "
" + file.read + "
" - end - end end