Skip to content

Commit b0d8c48

Browse files
committed
Move inline svg styles to CSS because of Content Security Policy
1 parent 99a7931 commit b0d8c48

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

app/styles/app.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,11 @@ h1 {
342342
padding: 5px;
343343
}
344344
}
345+
346+
.arrow-in-list svg {
347+
background: #fff;
348+
}
349+
350+
a.arrow svg {
351+
background: #EEECDD;
352+
}

app/templates/components/category-list.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<li>
44
{{#link-to 'category' category.slug class='name'}}
55
<span>{{ category.category }} ({{ format-num category.crates_cnt }})</span>
6-
{{svg-jar "right-arrow"}}
6+
<div class='arrow-in-list'>
7+
{{svg-jar "right-arrow"}}
8+
</div>
79
{{/link-to}}
810
</li>
911
{{/each}}

app/templates/components/crate-list.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<li>
44
{{#link-to 'crate' crate.id class='name'}}
55
<span>{{ crate.name }} ({{ crate.max_version }})</span>
6-
{{svg-jar "right-arrow"}}
6+
<div class='arrow-in-list'>
7+
{{svg-jar "right-arrow"}}
8+
</div>
79
{{/link-to}}
810
</li>
911
{{/each}}

app/templates/components/keyword-list.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<li>
44
{{#link-to 'keyword' keyword class='name'}}
55
<span>{{ keyword.id }} ({{ format-num keyword.crates_cnt }})</span>
6-
{{svg-jar "right-arrow"}}
6+
<div class='arrow-in-list'>
7+
{{svg-jar "right-arrow"}}
8+
</div>
79
{{/link-to}}
810
</li>
911
{{/each}}

app/templates/crate/versions.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{{/if}}
2323
</div>
2424
{{#link-to 'crate.version' version.num class='arrow'}}
25-
{{svg-jar "right-arrow" style="background-color: #EEECDD"}}
25+
{{svg-jar "right-arrow"}}
2626
{{/link-to}}
2727
</div>
2828
{{/each}}

public/assets/right-arrow.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)