Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-iconify
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Libraries
django-iconify
Compare revisions
2501323164e8ab7cc17ebcd9da67af473ea31c2a to 97870e4f4bd995aa3df9ef170f852e09e11b2f82
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
AlekSIS/libs/django-iconify
Select target project
No results found
97870e4f4bd995aa3df9ef170f852e09e11b2f82
Select Git revision
Loading items
Swap
Target
AlekSIS/libs/django-iconify
Select target project
AlekSIS/libs/django-iconify
1 result
2501323164e8ab7cc17ebcd9da67af473ea31c2a
Select Git revision
Loading items
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source
2
Leave out optional attributes
· 3a8bed9b
Nik | Klampfradler
authored
Feb 15, 2021
Docs say there are defaults, but there aren't…
Verified
3a8bed9b
Add some more icons as test
· 97870e4f
Nik | Klampfradler
authored
Feb 15, 2021
Verified
97870e4f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dj_iconify/types.py
+30
-23
30 additions, 23 deletions
dj_iconify/types.py
examples/dj-iconify-server/dj_iconify_server/templates/test.html
+3
-1
3 additions, 1 deletion
...s/dj-iconify-server/dj_iconify_server/templates/test.html
with
33 additions
and
24 deletions
dj_iconify/types.py
View file @
97870e4f
...
...
@@ -8,34 +8,41 @@ import json
class
IconifyOptional
:
left
:
int
=
0
top
:
int
=
0
width
:
int
=
16
height
:
int
=
16
left
:
Optional
[
int
]
=
None
top
:
Optional
[
int
]
=
None
width
:
Optional
[
int
]
=
None
height
:
Optional
[
int
]
=
None
rotate
:
int
=
0
h_flip
:
bool
=
Fals
e
v_flip
:
bool
=
Fals
e
rotate
:
Optional
[
int
]
=
None
h_flip
:
Optional
[
bool
]
=
Non
e
v_flip
:
Optional
[
bool
]
=
Non
e
def
_as_dict_optional
(
self
)
->
dict
:
return
{
"
left
"
:
self
.
left
,
"
top
"
:
self
.
top
,
"
width
"
:
self
.
width
,
"
height
"
:
self
.
height
,
"
rotate
"
:
self
.
rotate
,
"
hFlip
"
:
self
.
h_flip
,
"
vFlip
"
:
self
.
v_flip
,
}
res
=
{}
if
self
.
left
is
not
None
:
res
[
"
left
"
]
=
self
.
left
if
self
.
top
is
not
None
:
res
[
"
top
"
]
=
self
.
top
if
self
.
width
is
not
None
:
res
[
"
width
"
]
=
self
.
width
if
self
.
height
is
not
None
:
res
[
"
height
"
]
=
self
.
height
if
self
.
rotate
is
not
None
:
res
[
"
rotate
"
]
=
self
.
rotate
if
self
.
h_flip
is
not
None
:
res
[
"
hFlip
"
]
=
self
.
h_flip
if
self
.
v_flip
is
not
None
:
res
[
"
vFlip
"
]
=
self
.
v_flip
return
res
def
_from_dict_optional
(
self
,
src
:
dict
)
->
None
:
self
.
left
=
src
.
get
(
"
left
"
,
None
)
or
self
.
left
self
.
top
=
src
.
get
(
"
top
"
,
None
)
or
self
.
top
self
.
width
=
src
.
get
(
"
width
"
,
None
)
or
self
.
width
self
.
height
=
src
.
get
(
"
height
"
,
None
)
or
self
.
height
self
.
rotate
=
src
.
get
(
"
rotate
"
,
None
)
or
self
.
rotate
self
.
h_flip
=
src
.
get
(
"
hFlip
"
,
None
)
or
self
.
h_flip
self
.
v_flip
=
src
.
get
(
"
vFlip
"
,
None
)
or
self
.
v_flip
self
.
left
=
src
.
get
(
"
left
"
,
None
)
self
.
top
=
src
.
get
(
"
top
"
,
None
)
self
.
width
=
src
.
get
(
"
width
"
,
None
)
self
.
height
=
src
.
get
(
"
height
"
,
None
)
self
.
rotate
=
src
.
get
(
"
rotate
"
,
None
)
self
.
h_flip
=
src
.
get
(
"
hFlip
"
,
None
)
self
.
v_flip
=
src
.
get
(
"
vFlip
"
,
None
)
class
IconifyIcon
(
IconifyOptional
):
...
...
This diff is collapsed.
Click to expand it.
examples/dj-iconify-server/dj_iconify_server/templates/test.html
View file @
97870e4f
...
...
@@ -6,6 +6,8 @@
<script
type=
"text/javascript"
src=
"https://code.iconify.design/1/1.0.6/iconify.min.js"
></script>
</head>
<body>
<span
class=
"iconify"
data-icon=
"fa:home"
style=
"color:#ff0000"
></span>
<span
class=
"iconify"
data-icon=
"mdi:account"
style=
"color:#00ff00"
></span>
<span
class=
"iconify"
data-icon=
"mdi:account-cash"
style=
"color:#0000ff;font-size:48pt"
></span>
<span
class=
"iconify"
data-icon=
"mdi:seatbelt"
style=
"color:#ff0000;font-size:72pt"
></span>
</body>
</head>
This diff is collapsed.
Click to expand it.