This repository has been archived by the owner on Aug 26, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
756c8ba
commit 79884e3
Showing
6 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.svg-icon | ||
width: 16px | ||
height: 16px | ||
vertical-align: middle | ||
path | ||
fill: #000 | ||
|
||
.svg-icon-white | ||
path | ||
fill: #FFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% load static %} | ||
<img src="{% static path %}" alt="{{ alt }}" class="js-svg-icon svg-icon" /> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from django import template | ||
from django.template.loader import render_to_string | ||
|
||
register = template.Library() | ||
|
||
ICON_PATH = "brambling/lib/picons/{key}.svg" | ||
|
||
@register.simple_tag | ||
def icon(key, alt): | ||
path = ICON_PATH.format(key=key) | ||
return render_to_string('brambling/_icon.html', {'key': key, 'alt': alt, 'path': path}) |