File: 697.py

package info (click to toggle)
python-trame 3.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 101,620 kB
  • sloc: python: 13,515; sh: 183; javascript: 93; makefile: 7
file content (39 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from trame.app import get_server
from trame.ui.vuetify3 import SinglePageLayout
from trame.widgets import vuetify3 as vuetify

server = get_server(client_type="vue3")
state, ctrl = server.state, server.controller

# Adding missing font
server.enable_module(
    {"styles": ["https://fonts.googleapis.com/css?family=Roboto:300,400,500"]}
)

with SinglePageLayout(server) as layout:
    with layout.content:
        with vuetify.VContainer(
            fluid=True,
            classes="d-flex justify-center align-center",
            style="height: 100%;",
        ):
            with vuetify.VCard():
                with vuetify.VCardTitle(
                    "Centered Card",
                    classes="d-flex align-center flex-wrap",
                    # style="font-weight: 500 !important"
                ):
                    vuetify.VSpacer()
                    vuetify.VBtn(icon="mdi-refresh", density="compact")
                vuetify.VDivider()
                with vuetify.VCardText():
                    vuetify.VTextField(
                        v_model=("text_value", ""),
                        label="Some text",
                        placeholder="Type here...",
                        variant="outlined",
                    )

    # print(layout)

server.start()