forked from mirrors/thatmattlove-hyperglass
add font-size variable
This commit is contained in:
parent
a8b7494577
commit
0a74122bb2
7 changed files with 50 additions and 16 deletions
22
hooks.sh
22
hooks.sh
|
|
@ -1,10 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
LC=$(./manage.py line-count-badge)
|
||||
|
||||
echo $LC
|
||||
|
||||
function make_badge () {
|
||||
./manage.py line-count-badge
|
||||
if [[ ! $? == 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function isort_all () {
|
||||
isort -y hyperglass/*.py
|
||||
if [[ ! $? == 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
isort -y hyperglass/**/*.py
|
||||
if [[ ! $? == 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
make_badge
|
||||
# isort_all
|
||||
|
||||
exit 0
|
||||
|
|
@ -37,8 +37,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
"""
|
||||
|
||||
# Standard Library Imports
|
||||
from datetime import datetime
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
# Third Party Imports
|
||||
import stackprinter
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""Validate branding configuration variables."""
|
||||
|
||||
# Third Party Imports
|
||||
from pydantic import StrictStr
|
||||
from pydantic import constr
|
||||
from pydantic import validator
|
||||
from pydantic.color import Color
|
||||
|
|
@ -40,8 +41,20 @@ class Branding(HyperglassModel):
|
|||
class Font(HyperglassModel):
|
||||
"""Validation model for params.branding.font."""
|
||||
|
||||
primary: str = "Nunito"
|
||||
mono: str = "Fira Code"
|
||||
class Primary(HyperglassModel):
|
||||
"""Validation model for params.branding.font.primary."""
|
||||
|
||||
name: StrictStr = "Nunito"
|
||||
size: StrictStr = "1rem"
|
||||
|
||||
class Mono(HyperglassModel):
|
||||
"""Validation model for params.branding.font.mono."""
|
||||
|
||||
name: StrictStr = "Fira Code"
|
||||
size: StrictStr = "87.5%"
|
||||
|
||||
primary: Primary = Primary()
|
||||
mono: Mono = Mono()
|
||||
|
||||
class HelpMenu(HyperglassModel):
|
||||
"""Validation model for params.branding.help_menu."""
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ $hg-secondary: {{ colors.secondary }}
|
|||
$hg-danger: {{ colors.danger }}
|
||||
$hg-warning: {{ colors.warning }}
|
||||
$hg-background: {{ colors.background }}
|
||||
$hg-font-primary: {{ font.primary.name }}
|
||||
$hg-font-primary-size: {{ font.primary.size }}
|
||||
$hg-font-mono: {{ font.mono.name }}
|
||||
$hg-font-mono-size: {{ font.mono.size }}
|
||||
|
||||
// Functions
|
||||
@function findTextColor($color)
|
||||
|
|
@ -87,9 +91,10 @@ $enable-validation-icons: false
|
|||
$theme-colors: ("primary": $hg-primary, "secondary": $hg-secondary, "danger": $hg-danger, "warning": $hg-warning, "light": findTextColor(black), "dark": findTextColor(white), "overlay": $hg-overlay)
|
||||
|
||||
//// Fonts/Text
|
||||
$font-family-sans-serif: "{{ font.primary }}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
|
||||
$font-family-monospace: "{{ font.mono }}", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
|
||||
$font-family-sans-serif: $hg-font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
|
||||
$font-family-monospace: $hg-font-mono, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
|
||||
$headings-font-weight: 400
|
||||
$font-size-base: $hg-font-primary-size
|
||||
|
||||
//// Borders
|
||||
$border-radius: .5rem
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ async def _get_fonts():
|
|||
log.debug("Downloading theme fonts...")
|
||||
|
||||
font_base = "https://fonts.googleapis.com/css?family={p}|{m}&display=swap"
|
||||
font_primary = "+".join(params.branding.font.primary.split(" ")).strip()
|
||||
font_mono = "+".join(params.branding.font.mono.split(" ")).strip()
|
||||
font_primary = "+".join(params.branding.font.primary.name.split(" ")).strip()
|
||||
font_mono = "+".join(params.branding.font.mono.name.split(" ")).strip()
|
||||
font_url = font_base.format(p=font_primary + ":300,400,700", m=font_mono + ":400")
|
||||
|
||||
font_command = f"node {str(FONT_CMD)} -w -i '{font_url}' -o {str(FONT_DIR)}"
|
||||
|
|
|
|||
|
|
@ -310,14 +310,16 @@
|
|||
background-color: $hg-field-bg !important
|
||||
transition: all .3s !important
|
||||
font-weight: 200 !important
|
||||
font-size: 1.4rem !important
|
||||
// font-size: 1.4rem !important
|
||||
font-size: $font-size-lg
|
||||
opacity: 1 !important
|
||||
pointer-events: auto !important
|
||||
|
||||
#hg-accordion
|
||||
.btn-link
|
||||
font-weight: 200
|
||||
font-size: 1.4rem
|
||||
// font-size: 1.4rem
|
||||
font-size: $font-size-lg
|
||||
|
||||
#hg-accordion
|
||||
.card-body
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<text x="45.0" y="14">Lines of Code</text>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="106.0" y="15" fill="#010101" fill-opacity=".3">3051</text>
|
||||
<text x="105.0" y="14">3051</text>
|
||||
<text x="106.0" y="15" fill="#010101" fill-opacity=".3">3060</text>
|
||||
<text x="105.0" y="14">3060</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Loading…
Add table
Reference in a new issue