Feat: formating and split in sections

This commit is contained in:
Bertrand Benjamin 2021-02-08 15:19:09 +01:00
parent 3250a600c9
commit 7dba11996a
2 changed files with 68 additions and 54 deletions

View File

@ -19,6 +19,12 @@ main {
margin: auto; margin: auto;
} }
section {
margin-top: 20px;
margin-bottom: 20px;
}
/* Exam analysis */ /* Exam analysis */
#select { #select {

View File

@ -56,68 +56,76 @@ layout = html.Div(
), ),
html.Main( html.Main(
children=[ children=[
html.Form( html.Section(
id="new-exam",
children=[ children=[
html.Label( html.Form(
id="new-exam",
children=[ children=[
"Classe", html.Label(
dcc.Dropdown( children=[
id="tribe", "Classe",
options=[ dcc.Dropdown(
{"label": t["name"], "value": t["name"]} id="tribe",
for t in config["tribes"] options=[
], {"label": t["name"], "value": t["name"]}
value=config["tribes"][0]["name"], for t in config["tribes"]
],
value=config["tribes"][0]["name"],
),
]
), ),
] html.Label(
), children=[
html.Label( "Nom de l'évaluation",
children=[ dcc.Input(
"Nom de l'évaluation", id="exam_name",
dcc.Input( type="text",
id="exam_name", placeholder="Nom de l'évaluation",
type="text", ),
placeholder="Nom de l'évaluation", ]
), ),
] html.Label(
), children=[
html.Label( "Date",
children=[ dcc.DatePickerSingle(
"Date", id="date",
dcc.DatePickerSingle( date=date.today(),
id="date", **get_current_year_limit(),
date=date.today(), ),
**get_current_year_limit(), ]
), ),
] html.Label(
), children=[
html.Label( "Trimestre",
children=[ dcc.Dropdown(
"Trimestre", id="term",
dcc.Dropdown( options=[
id="term", {"label": i + 1, "value": i + 1}
options=[ for i in range(3)
{"label": i + 1, "value": i + 1} ],
for i in range(3) value=1,
], ),
value=1, ]
), ),
] ],
), ),
], ]
), ),
html.Div( html.Section(
id="exercises", children=[
children=[], html.Div(
), id="exercises",
html.Button( children=[],
"Ajouter un exercice", ),
id="add-exercise", html.Button(
className="add-exercise", "Ajouter un exercice",
), id="add-exercise",
html.Div( className="add-exercise",
id="summary", ),
html.Div(
id="summary",
)
]
), ),
] ]
), ),