From bd4bf0912bebf3f15336221736770f30ec079f03 Mon Sep 17 00:00:00 2001
From: Niko Strijbol
Date: Sat, 29 Oct 2016 21:49:58 +0200
Subject: [PATCH] Inline svg to fix IE & Edge
---
.gitignore | 1 +
.../assets/stylesheets/includes/projects.scss | 19 +++++++-------
content/projects.erb | 25 +++++++++++--------
lib/helpers/projects.rb | 6 +++++
4 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/.gitignore b/.gitignore
index 82e6258..acf03ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ crash.log*
.sass-cache/
node_modules/
+*.iml
diff --git a/content/assets/stylesheets/includes/projects.scss b/content/assets/stylesheets/includes/projects.scss
index b3ebf2a..bc45664 100644
--- a/content/assets/stylesheets/includes/projects.scss
+++ b/content/assets/stylesheets/includes/projects.scss
@@ -3,6 +3,16 @@
align-self: flex-end;
align-items: flex-end;
padding-right: 20px;
+
+ div {
+ margin: 10px;
+ }
+}
+
+@media (max-width: #{$tablet}) {
+ .links {
+ align-self: center;
+ }
}
.rows {
@@ -10,15 +20,6 @@
flex-direction: column;
}
-.links > .column {
- max-width: 200px;
- align-items: center;
-}
-
-.links .column a img {
- width: 100%;
-}
-
.project {
background-color: $body-background;
margin-top: 30px;
diff --git a/content/projects.erb b/content/projects.erb
index d4274fd..92c9e10 100644
--- a/content/projects.erb
+++ b/content/projects.erb
@@ -17,17 +17,21 @@ order: 30
For an overview of the features, visit the project's website.
-
-
-
iOS
+
-
-
-
Android
+
-
@@ -37,5 +41,4 @@ order: 30
<% all_projects.each do |project| %>
<%= render '/partials/_project.erb', project: project%>
-<% end %>
-
+<% end %>
\ No newline at end of file
diff --git a/lib/helpers/projects.rb b/lib/helpers/projects.rb
index cbebd53..e743ec6 100644
--- a/lib/helpers/projects.rb
+++ b/lib/helpers/projects.rb
@@ -3,4 +3,10 @@ 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