You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
#!/usr/bin/env python3 |
|
""" |
|
Example BadGUI application demonstrating basic components and layouts. |
|
""" |
|
|
|
import badgui as ui |
|
|
|
def main(): |
|
# Main title |
|
ui.label("Welcome to BadGUI!", classes=["text-h3", "text-primary"]) |
|
|
|
# Buttons in a row |
|
with ui.row(): |
|
ui.button("Primary Button", classes=["q-mr-md"]) |
|
ui.button("Secondary Button", classes=["q-mr-md"]) |
|
ui.button("Success Button", classes=["bg-positive"]) |
|
|
|
# Input fields in a column |
|
with ui.column(): |
|
ui.input(placeholder="Enter your name", classes=["q-mb-md"]) |
|
ui.input(placeholder="Enter your email", classes=["q-mb-md"]) |
|
ui.input(placeholder="Enter your message", classes=["q-mb-md"]) |
|
|
|
# Another row with mixed content |
|
with ui.row(): |
|
ui.label("Status:") |
|
ui.label("Ready", classes=["text-positive", "text-weight-bold"]) |
|
|
|
# a table with some data |
|
with ui.column(): |
|
ui.label("User Data", classes=["text-h5", "text-secondary", "q-mb-md"]) |
|
with ui.row(classes=["q-pa-md", "bg-grey-2"]): |
|
ui.label("Name", classes=["text-bold", "q-mr-lg"]) |
|
ui.label("Email", classes=["text-bold", "q-mr-lg"]) |
|
ui.label("Role", classes=["text-bold"]) |
|
with ui.row(classes=["q-pa-md"]): |
|
ui.label("Alice", classes=["q-mr-lg"]) |
|
ui.label("alice@example.com", classes=["q-mr-lg"]) |
|
ui.label("Admin", classes=["q-mr-lg"]) |
|
|
|
# Build the Vue.js project |
|
print("🚀 Building BadGUI project...") |
|
ui.build(output_dir="./example-output", project_name="badgui-example") |
|
|
|
if __name__ == "__main__": |
|
main() |