Add publisher dashboard routes
This commit is contained in:
parent
96551c2788
commit
e4a5246ab3
31 changed files with 1603 additions and 516 deletions
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
import htpy as h
|
||||
from htpy import Node, Renderable
|
||||
|
||||
from repub.components import app_shell
|
||||
from repub.components import app_shell, publisher_shell
|
||||
|
||||
ON_LOAD_JS = (
|
||||
"@post(window.location.pathname + "
|
||||
|
|
@ -17,6 +17,7 @@ TAB_ID_JS = "self.crypto.randomUUID().substring(0,8)"
|
|||
def shim_page(
|
||||
*, datastar_src: str, current_path: str, head: Node | None = None
|
||||
) -> Renderable:
|
||||
shell = app_shell if current_path.startswith("/admin") else publisher_shell
|
||||
return h.html(lang="en")[
|
||||
h.head[
|
||||
h.meta(charset="UTF-8"),
|
||||
|
|
@ -33,7 +34,7 @@ def shim_page(
|
|||
}
|
||||
),
|
||||
h.noscript["Your browser does not support JavaScript!"],
|
||||
app_shell(
|
||||
shell(
|
||||
current_path=current_path,
|
||||
content=(
|
||||
h.section[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue