def App(): return html.div( html.section({"style": { "width": "50%", "float": "left" }}, Gallery()), html.section({"style": { "width": "50%", "float": "left" }}, Gallery()), )
def Gallery(): return html.section( html.h1("Photo Gallery"), Photo("Landscape", image_id=830), Photo("City", image_id=274), Photo("Puppy", image_id=237), )
def Gallery(): return html.section( html.h1("Famous Musicians"), Photo(), Photo(), Photo(), )
def TodoList(): return html.section( html.h1("My Todo List"), html.ul( Item("Find a cool problem to solve", done=True), Item("Build an app to solve it", done=True), Item("Share that app with the world!", done=False), ), )
def TodoList(): tasks = [ "Make breakfast (important)", "Feed the dog (important)", "Do laundry", "Go on a run (important)", "Clean the house", "Go to the grocery store", "Do some coding", "Read a book (important)", ] return html.section( html.h1("My Todo List"), DataList(tasks), )
def TodoList(): tasks = [ {"id": 0, "text": "Make breakfast", "priority": 0}, {"id": 1, "text": "Feed the dog", "priority": 0}, {"id": 2, "text": "Do laundry", "priority": 2}, {"id": 3, "text": "Go on a run", "priority": 1}, {"id": 4, "text": "Clean the house", "priority": 2}, {"id": 5, "text": "Go to the grocery store", "priority": 2}, {"id": 6, "text": "Do some coding", "priority": 1}, {"id": 7, "text": "Read a book", "priority": 1}, ] return html.section( html.h1("My Todo List"), DataList(tasks, filter_by_priority=1, sort_by_priority=True), )