Skip to content

Commit

Permalink
complete layout
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Oct 22, 2020
1 parent cc646a9 commit b338003
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions syzygy_tables_info/views.py
Expand Up @@ -25,13 +25,14 @@ def asset_url(path: str) -> str:
return "/static/{}?mtime={}".format(path, os.path.getmtime(os.path.join(os.path.dirname(__file__), "..", "static", path)))


def layout(*, development: bool = True, left: Optional[Frag] = None, right: Optional[Frag] = None) -> Frag:
def layout(*, development: bool = True, left: Optional[Frag] = None, right: Optional[Frag] = None, head: Optional[Frag] = None, scripts: Optional[Frag] = None) -> Frag:
return html(lang="en")(
raw("<!-- https://github.com/niklasf/syzygy-tables.info -->"),
h("head")(
h("meta", charset="utf-8"),
h("link", rel="preload", href="/static/fonts/fontello.woff2", as_="font", type="font/woff2", crossorigin=True),
h("link", rel="stylesheet", href=asset_url("css/style.min.css")),
head,
h("title")("Syzygy endgame tablebases"),
h("meta", name="viewport", content="width=device-width,initial-scale=1.0,user-scalable=yes"),
h("meta", name="keywords", content="Syzygy,chess,endgame,tablebase"),
Expand All @@ -53,13 +54,20 @@ def layout(*, development: bool = True, left: Optional[Frag] = None, right: Opti
h("div", klass="inner")(
h("p")(
"Powered by Ronald de Man's ",
h("a", href="https://github.com/syzygy1/tb")("Syzygy endgame tablebases"), ",",
h("a", href="https://github.com/syzygy1/tb")("Syzygy endgame tablebases"), ", ",
"7-piece tablebases generated by Bojun Guo and a ",
h("a", href="https://github.com/niklasf/lila-tablebase#http-api")("public API"), " ",
"hosted by ",
h("a", href="https://tablebase.lichess.ovh")("lichess.org"), ".",
),
h("p")(
h("a", href="/endgames")("Endgames"), ". ",
h("a", href="/metrics")("Metrics"), ". ",
h("a", href="/legal", data_jslicense=1)("Legal"), ". ",
h("a", href="https://github.com/niklasf/syzygy-tables.info")("GitHub"), ".",
),
),
),
scripts,
),
)

0 comments on commit b338003

Please sign in to comment.