Exemple #1
0
def myPage(name):

    main = container()

    welcome = blockquote(f"Welcome to Incantation, {name}!")

    title = blockquote("Incantation使用者的评价反馈")
    users = table(["姓名", "评价", "日期"],
                  [["Misakawa", "我自己做的,还能不给自己好评吗?完美的抽象!10/10分!", "2017-10-28"],
                   ["Thautwarm", "上面那个是我小号...", "2017-10-28"],
                   ["Ruikowa", "十分 and 我是被小号的。", "2017-10-29"]])

    side = collections([
        badge(new=True, href='#!', num=1, name='关注'),
        badge(new=True, href='#!', num=4, name='评论'),
        badge(href='#!', name='私信'),
        badge(new=False, href='#!', num=6, name='你的组织'),
        badge(href='#!', name='用户设置'),
        badge(href='#!', name='帮助反馈'),
    ])

    main.contains(
        Seq(
            welcome, divider(), "<br>",
            row(
                Seq(
                    col(side, grid(l=3, s=3, m=3)),
                    col(Seq(title, users), grid(l=8, s=8, m=8)),
                ))))
    page = Page(main)
    return page.gen()
Exemple #2
0
 def multifields():
     main = container()
     username = input_field(grid(l=5),
                            field_name='username',
                            type='text',
                            icon=Icons.account_circle,
                            id='username')
     password = input_field(grid(l=5),
                            field_name='password',
                            type='password',
                            icon=icon('exposure_plus_1'),
                            id='password')
     a_row = row(Seq(username, password))
     a_form = form(Seq("<br>" * 2, divider(), a_row))
     main.contains(a_form)
     return Page(main).gen()
Exemple #3
0
 def normal():
     main = container()
     a_form = form(
         Seq(
             "<br>" * 2, divider(),
             input_field(grid(l=10),
                         field_name='username',
                         type='text',
                         icon=Icons.account_circle,
                         id='username'),
             input_field(grid(l=10),
                         field_name='password',
                         type='password',
                         icon=icon('exposure_plus_1'),
                         id='password')))
     main.contains(a_form)
     return Page(main).gen()
Exemple #4
0
def index():
    main = container()
    main.contains(
        Seq(section('<h5>A</h5><p>a</p>'), divider(),
            section('<h>B</h><p>b</p>')))
    return Page(main).gen()