Skip to content

Commit

Permalink
add font presets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sup2point0 authored May 8, 2024
1 parent 8b27cc8 commit 98d7f4a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion quarkdown/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
'''

class url:
google_fonts = "https://fonts.googleapis.com/css2?"
styles = "https://raw.githack.com/Sup2point0/Quarkdown/main/quarkdown/resources/styles"

class css:
def font(fonts: list[str]) -> str:
'''Format the HTML `<link>` tag for loading fonts from Google Fonts.'''

return f'''<link rel="stylesheet" type="text/css" href="{url.google_fonts}{"&".join(font for font in fonts)}&display=swap">'''

def style(style: str) -> str:
'''Format the HTML `<link>` tag for a given stylesheet.'''

return f'''<link rel="stylesheet" type="text/css href="{url.styles}/{style.lower()}">'''
return f'''<link rel="stylesheet" type="text/css" href="{url.styles}/{style.lower()}">'''

dec_index = {
"spring": 0.5,
Expand Down

0 comments on commit 98d7f4a

Please sign in to comment.