-
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.
Further refactoring of the frontend code, just because.
- Loading branch information
Showing
24 changed files
with
756 additions
and
722 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
html { | ||
background-color: var(--bg-color); | ||
} | ||
|
||
.faq { | ||
width: 100%; | ||
color: white; | ||
padding: 2rem 0; | ||
background-color: black; | ||
} |
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,20 @@ | ||
me { | ||
cursor: pointer; | ||
transition: opacity 0.2s ease-in-out; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
font-weight: 600; | ||
font-size: 18px; | ||
line-height: 100%; | ||
border: none; | ||
text-align: center; | ||
letter-spacing: 0.05em; | ||
padding: 20px 24px; | ||
background-color: var(--bg-color); | ||
color: var(--color); | ||
} | ||
|
||
me:hover { | ||
opacity: 0.7; | ||
transition: opacity 0.2s ease-in-out; | ||
} |
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 |
---|---|---|
@@ -1,36 +1,13 @@ | ||
import htpy as h | ||
|
||
from .utils import with_children | ||
|
||
_STYLE = """ | ||
me { | ||
cursor: pointer; | ||
transition: opacity 0.2s ease-in-out; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
font-weight: 600; | ||
font-size: 18px; | ||
line-height: 100%; | ||
border: none; | ||
text-align: center; | ||
letter-spacing: 0.05em; | ||
padding: 20px 24px; | ||
background-color: {bg_color}; | ||
color: {color}; | ||
} | ||
me:hover { | ||
opacity: 0.7; | ||
transition: opacity 0.2s ease-in-out; | ||
} | ||
""" | ||
from server.utils.components import style | ||
|
||
|
||
def _style(bg_color: str, color: str) -> h.Element: | ||
return h.style[_STYLE.replace("{bg_color}", bg_color).replace("{color}", color)] | ||
from .utils import with_children | ||
|
||
|
||
@with_children | ||
def button(children: h.Node, href: str, bg_color: str, color: str) -> h.Element: | ||
"""Render a button with the given background and text color.""" | ||
return h.a(href=href)[_style(bg_color, color), children] | ||
return h.a(href=href)[ | ||
style(__file__, "button.css", bg_color=bg_color, color=color), children | ||
] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,63 @@ | ||
me { | ||
background-color: black; | ||
color: #aaa; | ||
padding-top: 4rem; | ||
padding-bottom: 2rem; | ||
padding-left: 0.5rem; | ||
padding-right: 0.5rem; | ||
width: 100%; | ||
} | ||
|
||
@media screen and (min-width: 768px) { | ||
me { | ||
padding-left: 2em; | ||
padding-right: 2rem; | ||
} | ||
} | ||
|
||
me div.center { | ||
margin-bottom: 2em; | ||
display: flex; | ||
justify-content: center; | ||
color: #fff; | ||
} | ||
|
||
me div.center svg { | ||
width: 120px !important; | ||
} | ||
|
||
me div.outer { | ||
display: flex; | ||
flex-direction: column-reverse; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
@media screen and (min-width: 768px) { | ||
me div.outer { | ||
flex-direction: row; | ||
} | ||
} | ||
|
||
me div.inner { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1em; | ||
} | ||
|
||
me a { | ||
color: #aaa; | ||
text-decoration: underline; | ||
} | ||
|
||
me a:hover { | ||
color: white; | ||
} | ||
|
||
me .colophon { | ||
text-align: center; | ||
color: #888; | ||
font-size: 0.8em; | ||
padding-top: 1em; | ||
padding-bottom: 3em; | ||
} |
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
Oops, something went wrong.