Esempio n. 1
0
def home():
    """Index page - without renderer"""
    return render(
        doctype("html"),
        e.html()(
            e.head()(e.title()("htmldoom rendering framework demo")),
            e.body()(
                e.h1()("Home page"),
                e.a(href="/jinja2")("Jinja2"),
                e.br(),
                e.a(href="/htmldoom")("htmldoom"),
            ),
        ),
    )
Esempio n. 2
0
def home(request):
    """Index page - without renderer"""
    return Response(
        render(
            doctype("html"),
            e.html()(
                e.head()(e.title()("Pyramid template engine demo")),
                e.body()(
                    e.h1()("Home page"),
                    e.a(href="/jinja2")("Jinja2"),
                    e.br(),
                    e.a(href="/htmldoom")("htmldoom"),
                ),
            ),
        ))
Esempio n. 3
0
from htmldoom import doctype, renders
from htmldoom.yaml_loader import loadyaml as ly

LAYOUTS_DIR = "docs/src/layouts"


@renders(doctype("html"), ly(f"{LAYOUTS_DIR}/fullpage.yml", "default"))
def document(**values):
    """The document renderer."""
    return values