$def with (resource) $ path = tx.request.uri.path $ owner = tx.host.owner \ $if "title" in resource: $:Document(resource.title).doc.text_content() — \ $owner["name"][0] $if "photo" in owner: $if not tx.request.uri.path: $if not isinstance(resource, str) and "head" in resource: $:resource.head() $if tx.user.is_owner:
$if "photo" in owner:
$owner["name"][0]
$if "note" in owner: $owner["note"][0]
$if email := get_first(owner, "email"): $owner["email"][0] • $if onion := get_onion(): $ _stripped_onion = onion.lstrip("x") $ _prefix_length = len(onion) - len(_stripped_onion) @$_stripped_onion[:12-_prefix_length]@$tx.host.name $if nickname := get_first(owner, "nickname"): • @$nickname@$tx.host.name $if key := get_key(): • $:"–".join(key.split()[:2])
$if path: $ breadcrumbs = [] $if "breadcrumbs" in resource: $ breadcrumbs = list(resource["breadcrumbs"]) $:render_breadcrumbs(breadcrumbs, path) $if "title" in resource: $if getattr(resource, "show_title", True):

$:resource.title

$:resource $# $if "hide_footer" not in resource: $#