Skip to content

Commit

Permalink
Add Tabler icons (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-m-n authored Jul 22, 2024
1 parent 5174973 commit 7eda592
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The metadata for the model. The options are:

* `name`: Display name for this model. Default value is the class name.
* `name_plural`: Display plural name for this model. Default value is class name + `s`.
* `icon`: Icon to be displayed for this model in the admin. Only FontAwesome names are supported.
* `icon`: Icon to be displayed for this model in the admin. Only FontAwesome and Tabler names are supported.
* `category`: Category name to display group of `ModelView` classes together in dropdown.

!!! example
Expand Down
2 changes: 1 addition & 1 deletion sqladmin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def test_page(self, request: Request):

icon: ClassVar[str] = ""
"""Display icon for ModelAdmin in the sidebar.
Currently only supports FontAwesome icons.
Currently only supports FontAwesome and Tabler icons.
"""

category: ClassVar[str] = ""
Expand Down
4 changes: 4 additions & 0 deletions sqladmin/statics/css/tabler-icons.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sqladmin/statics/css/tabler-icons.min.css.map

Large diffs are not rendered by default.

Binary file added sqladmin/statics/webfonts/tabler-icons.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions sqladmin/templates/sqladmin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/tabler.min.css') }}">
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/tabler-icons.min.css') }}">
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/fontawesome.min.css') }}">
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/select2.min.css') }}">
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/flatpickr.min.css') }}">
Expand Down

0 comments on commit 7eda592

Please sign in to comment.