Inline svg is not longer necessary

This commit is contained in:
Niko Strijbol 2016-11-02 15:25:36 +01:00
parent 442f69eae9
commit b256efd86c
3 changed files with 17 additions and 10 deletions

View file

@ -7,6 +7,14 @@
div { div {
margin: 10px; margin: 10px;
} }
img {
width: 200px;
}
}
.clear {
clear: both;
} }
@media (max-width: #{$tablet}) { @media (max-width: #{$tablet}) {

View file

@ -7,7 +7,7 @@ order: 30
<article id="hydra" class="columns"> <article id="hydra" class="columns">
<div class="column is-one-quarter" id="logo-column"> <div class="column is-one-quarter" id="logo-column">
<div class="hydra-scrot"> <div class="hydra-scrot">
<img src="/assets/images/hydra.png"> <%= asset :img, 'hydra.png' %>
</div> </div>
</div> </div>
<div class="column rows"> <div class="column rows">
@ -19,18 +19,23 @@ order: 30
<div class="columns links"> <div class="columns links">
<div class="has-text-centered"> <div class="has-text-centered">
<a href="https://itunes.apple.com/be/app/hydra/id602640924"> <a href="https://itunes.apple.com/be/app/hydra/id602640924">
<%= svg 'apple' %> <%= asset :img, 'apple.svg' %>
</a> </a>
<div class="clear"></div>
<a href="https://github.com/ZeusWPI/hydra-iOS">iOS <span class="icon"><%= fa('github') %></span></a> <a href="https://github.com/ZeusWPI/hydra-iOS">iOS <span class="icon"><%= fa('github') %></span></a>
</div> </div>
<div class="has-text-centered"> <div class="has-text-centered">
<a href="http://play.google.com/store/apps/details?id=be.ugent.zeus.hydra"> <a href="http://play.google.com/store/apps/details?id=be.ugent.zeus.hydra">
<%= svg 'google' %> <%= asset :img, 'google.svg' %>
</a> </a>
<div class="clear"></div>
<a href="https://github.com/ZeusWPI/hydra-android">Android <span class="icon"><%= fa('github') %></span></a> <a href="https://github.com/ZeusWPI/hydra-android">Android <span class="icon"><%= fa('github') %></span></a>
</div> </div>
<div class="has-text-centered"> <div class="has-text-centered">
<a href="http://www.windowsphone.com/s?appId=08d3268e-aad6-48fa-ae83-5ccd1663e73a"><%= svg 'windows' %></a> <a href="http://www.windowsphone.com/s?appId=08d3268e-aad6-48fa-ae83-5ccd1663e73a">
<%= asset :img, 'windows.svg' %>
</a>
<div class="clear"></div>
<a href="https://github.com/ZeusWPI/hydra-windows">Windows 10 <span class="icon"><%= fa('github') %></span></a> <a href="https://github.com/ZeusWPI/hydra-windows">Windows 10 <span class="icon"><%= fa('github') %></span></a>
</div> </div>
</div> </div>

View file

@ -3,10 +3,4 @@ module ProjectsHelper
def all_projects def all_projects
@items.find_all('/projects/*') @items.find_all('/projects/*')
end end
# Inline a svg file.
def svg(name)
File.open("content/assets/images/#{name}.svg", "rb") do |file|
"<div>" + file.read + "</div>"
end
end
end end