$def with (domain, resources) $var breadcrumbs = ("cache", "Cache") $var title: $domain $ root = resources.pop(0)
$pformat(root['data']['rels'])
$if "alternates" in root["data"]:
$pformat(root['data']['alternates'])
$if "icon" in root["data"]["rels"]:
$root["title"]
$domain
$ repr = representative_card(root["data"], root["origin"]) $if repr:
$if "photo" in repr:

$repr["name"][0]

$if "pronoun" in repr: $if isinstance(repr["pronoun"][0], dict): $ pronouns = [p["value"] for p in repr["pronoun"]] $else: $ pronouns = [p for p in repr["pronoun"]]

$:" / ".join(pronouns)

$if "country-name" in repr:

$if "region" in repr: $if "locality" in repr: $if "street-address" in repr: $repr["street-address"][0]
$repr["locality"][0], $repr["region"][0], $repr["country-name"][0] $if "postal-code" in repr: $repr["postal-code"][0]

$if "note" in repr:

$repr["note"][0]

$if "org" in repr:

$repr["org"]

$if "role" in repr:

$repr["role"]

$if "category" in repr:

$repr["category"]

$if "nickname" in repr:

$repr["nickname"][0]

$if "bday" in repr:

$repr["bday"][0]

$if "email" in repr:

$repr["email"][0].partition(":")[2]

$if "url" in repr: $ urls = [url for url in repr["url"] if not url.startswith(root["origin"])] $if urls: $ rels = root["data"]["rels"]

Pages