Skip to content

Commit edc70bc

Browse files
committed
Temporary fix for SVGs
Groking the code I noticed that Hugo theme is just injecting the svg code in HTML. I copied their pattern for now since it works. Also appears this is how pol.is is handling their SVGs. I will read up some more on this benefit over the others. For now, it works.
1 parent 054da3a commit edc70bc

14 files changed

+25
-14
lines changed

data/HomeOverview.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Overview:
22
-
3-
Icon: "/icons/icon-crowdsourcing.svg"
3+
Icon: "icons/icon-crowdsourcing.svg"
44
Text: "Crowdsourcing to inform NYC governance"
55
-
6-
Icon: /icons/icon-participating.svg
6+
Icon: icons/icon-participating.svg
77
Text: "Reducing the burden of participation and increasing effectiveness"
88
-
9-
Icon: /icons/icon-connecting.svg
9+
Icon: icons/icon-connecting.svg
1010
Text: "Connecting organizations and districts around shared concerns."
1111
-
12-
Icon: /icons/icon-open-data.svg
12+
Icon: icons/icon-open-data.svg
1313
Text: "Open knowledge, data, and tools."

layouts/index.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ <h1 class="f1-l lh-title">Understanding the people in order to make more effecti
5757

5858
<div class="flex flex-row flex-wrap">
5959
<section class="bt w-50-ns false b--black-10 flex flex-column items-stretch justify-stretch">
60-
<div class="bg-gold flex items-center justify-center pa5-l pa4 false">
61-
<img src="/icons/icon-participating.svg">
60+
<div class="make-icon bg-gold flex items-center justify-center pa5-l pa4 false">
61+
{{ partial "icons/icon-survey.svg" }}
6262
</div>
6363
<div class="bg-white flex flex-column content-start justify-center-ns justify-start order-1-l pa4">
6464
<h3>Get started on making your own survey</h3>
@@ -67,8 +67,8 @@ <h3>Get started on making your own survey</h3>
6767
</section>
6868

6969
<section class="bt w-50-ns false b--black-10 flex flex-column items-stretch justify-stretch">
70-
<div class="bg-hot-pink flex items-center justify-center pa5-l pa4 false">
71-
<img src="/icons/icon-participating.svg">
70+
<div class="make-icon bg-hot-pink flex items-center justify-center pa5-l pa4 false">
71+
{{ partial "icons/icon-messaging.svg" }}
7272
</div>
7373
<div class="bg-white flex flex-column content-start justify-center-ns justify-start order-1-l pa4">
7474
<h3>Effective messaging to structure your survey</h3>
@@ -77,8 +77,8 @@ <h3>Effective messaging to structure your survey</h3>
7777
</section>
7878

7979
<section class="bt w-50-ns false b--black-10 flex flex-column items-stretch justify-stretch">
80-
<div class="bg-light-purple flex items-center justify-center pa5-l pa4 false">
81-
<img src="/icons/icon-participating.svg">
80+
<div class="make-icon bg-light-purple flex items-center justify-center pa5-l pa4 false">
81+
{{ partial "icons/icon-community.svg" }}
8282
</div>
8383
<div class="bg-white flex flex-column content-start justify-center-ns justify-start order-1-l pa4">
8484
<h3>Surveys to find out the issues concen your community</h3>
@@ -87,8 +87,8 @@ <h3>Surveys to find out the issues concen your community</h3>
8787
</section>
8888

8989
<section class="bt w-50-ns false b--black-10 flex flex-column items-stretch justify-stretch">
90-
<div class="bg-gold flex items-center justify-center pa5-l pa4 false">
91-
<img src="/icons/icon-participating.svg">
90+
<div class="make-icon bg-gold flex items-center justify-center pa5-l pa4 false">
91+
{{ partial "icons/polis.svg" }}
9292
</div>
9393
<div class="bg-white flex flex-column content-start justify-center-ns justify-start order-1-l pa4">
9494
<h3>AI Powered Surveying Tool</h3>
Loading
File renamed without changes.
Loading
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
Loading

layouts/partials/icons/polis.svg

+1
Loading

layouts/partials/site-header.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ <h2 class="fw1 f5 f3-l white-80 measure-wide-l lh-copy mt3 mb4">
1717
{{ end }}
1818
</div>
1919

20+
{{/* Only display overview on the homepage */}}
2021
{{ if eq (relURL .URL) ("/" | safeHTML) }}
2122
<section class="cf mb4 ph3 ph4-ns">
2223
<ul class="list pa0 ma0 flex flex-wrap-m mw9">
2324
{{ range .Site.Data.HomeOverview.Overview }}
24-
{{ $icon := .Icon }}
25+
{{ $icon_size := "32px" }}
2526
<li class="white-90 flex pv4 w-50-ns">
2627
<div class="overview-icon mb1 ml1">
27-
<img src="{{ $icon }}">
28+
{{ partial .Icon }}
2829
</div>
2930
<p class="tl measure-narrow ph3">{{ .Text }}</p>
3031
</li>

static/css/styles.css

+6
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ a {
4646
width: 5rem;
4747
height: 5rem;
4848
}
49+
50+
.make-icon svg {
51+
width: 5rem;
52+
height: 5rem;
53+
fill: #ffffff;
54+
}

0 commit comments

Comments
 (0)