Adds basic module structure
This commit is contained in:
parent
93ecad3223
commit
e030b7d36d
2 changed files with 24 additions and 8 deletions
20
src/mod_welcome.py
Normal file
20
src/mod_welcome.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from shiny import module, ui
|
||||
|
||||
# UI ----
|
||||
# Note that we made conter_ui a function, and decorated it
|
||||
|
||||
|
||||
@module.ui
|
||||
def welcome_ui():
|
||||
return ui.div(
|
||||
{"style": "border: 1px solid #ccc; border-radius: 5px; margin: 5px 0;"},
|
||||
ui.h2("Das ist die Welcome Page"),
|
||||
ui.markdown("""Hallo Welt""")
|
||||
)
|
||||
|
||||
|
||||
# Server ----
|
||||
# Note that we just added the @module.server decorator
|
||||
@module.server
|
||||
def welcome_server(input, output, session, starting_value=0):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue