-
Notifications
You must be signed in to change notification settings - Fork 0
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
Istvan Bozso
committed
Mar 9, 2020
1 parent
37aa489
commit 6c1e246
Showing
6 changed files
with
72 additions
and
20 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
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,29 @@ | ||
from utils import namespace | ||
from utils.html import Library, st | ||
|
||
__all__ = ( | ||
"css", | ||
) | ||
|
||
class CSSLib(Library): | ||
def __init__(self, path, *args, **kwargs): | ||
Library.__init__(self, path, *args, **kwargs) | ||
|
||
|
||
def add(self, *args, **kwargs): | ||
kwargs.update(self.options) | ||
|
||
kwargs["rel"] = "stylesheet" | ||
kwargs["href"] = self.path | ||
|
||
return st.link(**kwargs) | ||
|
||
|
||
|
||
css = namespace( | ||
bootstrap = CSSLib( | ||
"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css", | ||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh", | ||
crossorigin="anonymous", | ||
), | ||
) |
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
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