Cleaned up some of the duplicate and old test files. Got the flex grid to work and the font is okay for now. Can't seem to get darkmode to work across multiple pages from the header. Editing and adding a verse functions were updated.
This commit is contained in:
38
dashboard.py
38
dashboard.py
@ -1,26 +1,36 @@
|
||||
import theme
|
||||
from nicegui import ui
|
||||
import data
|
||||
from utils import Utils
|
||||
import random
|
||||
|
||||
color = {'tnt': theme.tnt, 'cubbies': theme.cubbies, 'sparks': theme.sparks}
|
||||
color = {"tnt": theme.tnt, "cubbies": theme.cubbies, "sparks": theme.sparks}
|
||||
|
||||
@ui.page('/dashboard')
|
||||
@ui.page("/dashboard", dark=False)
|
||||
def dashboard():
|
||||
with theme.frame('Dashboard'):
|
||||
random_order = []
|
||||
with theme.frame("Dashboard"):
|
||||
pass
|
||||
|
||||
with ui.grid().style('grid-template-columns: repeat(2, minmax(1px, 1fr));'):
|
||||
# with ui.grid().style('grid-template-columns: repeat(2, minmax(1px, 1fr));'):
|
||||
# with ui.grid().classes('grid-flow-row-dense grid-flow-col-dense grid-cols-auto grid-rows-5').style('height: 90vh; width: 100%;'):
|
||||
with ui.grid().classes("flex flex-row gap-x-2 flex-wrap").style(
|
||||
"height: 80vh; width: 100%;"
|
||||
):
|
||||
peoples = Utils.get_unique_people()
|
||||
for ppl in peoples:
|
||||
pl = ''.join(ppl)
|
||||
pl = "".join(ppl)
|
||||
card_info = Utils.get_persons_incomplete(pl)
|
||||
for item in card_info:
|
||||
vcard = ui.label(item[1]).classes('hidden')
|
||||
pcard = ui.label(item[2]).classes('hidden')
|
||||
club = ui.label(item[3]).classes('hidden')
|
||||
with ui.card().classes('grid justify-items-center').style(f'border: 2px solid {color[club.text.lower()]}'):
|
||||
ui.label(pl).classes('absolute top-0 left-0 font-thin text-sm')
|
||||
ui.label(vcard.text).classes('text-center')
|
||||
ui.label(pcard.text).classes('font-bold')
|
||||
random_order = random_order + card_info
|
||||
random.shuffle(random_order)
|
||||
for item in random_order:
|
||||
pl = ui.label(item[0]).classes("hidden")
|
||||
vcard = ui.label(item[1]).classes("hidden")
|
||||
pcard = ui.label(item[2]).classes("hidden")
|
||||
club = ui.label(item[3]).classes("hidden")
|
||||
with ui.card().classes("grid justify-items-center").style(
|
||||
f"border: 2px solid {color[club.text.lower()]}"
|
||||
):
|
||||
ui.label(pl.text).classes("absolute top-4 left-3 font-thin text-sm")
|
||||
ui.label(vcard.text).classes("text-center font-mono")
|
||||
ui.label(pcard.text).classes("font-light text-lg font-sans text-wrap break-words")#.style('font-family: "Liberation Mono"')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user