-
Notifications
You must be signed in to change notification settings - Fork 10
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
Showing
11 changed files
with
126 additions
and
55 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
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,33 @@ | ||
from django_icons.renderers import BaseRenderer, ImageRenderer | ||
|
||
|
||
class CustomSvgRenderer(BaseRenderer): | ||
""" | ||
Render an SVG. | ||
<svg class="svg-icon" viewBox="0 0 32 32"><use xlink:href="#icon-feather"></use></svg> | ||
""" | ||
|
||
def get_tag(self): | ||
return "svg" | ||
|
||
def get_class(self): | ||
return "svg-icon" | ||
|
||
def get_attrs(self): | ||
attrs = super(CustomSvgRenderer, self).get_attrs() | ||
attrs["viewBox"] = "0 0 32 32" | ||
return attrs | ||
|
||
def get_content(self): | ||
return '<use xlink:href="#icon-{name}"></use>'.format(name=self.name) | ||
|
||
|
||
class CustomImageRenderer(ImageRenderer): | ||
def get_image_root(cls): | ||
return "hd-icons" | ||
|
||
|
||
class CustomIcons8Renderer(ImageRenderer): | ||
def get_image_prefix(self): | ||
return "icons8-" |
This file was deleted.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
File renamed without changes.
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,7 @@ | ||
from django.conf.urls import url | ||
|
||
from app.views import HomeView | ||
|
||
urlpatterns = [ | ||
url(r"^$", HomeView.as_view(), name="home"), | ||
] |