my eye

index.html

$def with (project, issues, mentions)
$var breadcrumbs = ("projects", "Projects", project, f"<b>{project}</b>")
$var title: Issues

<form action=/projects/$project/issues/new>
<button type=submit>New Issue</button>
</form>

$for issue in issues:
    <div>$issue</div>

<h4>Elsewhere</h4>

$for mention in mentions:
    <div>
    $ data = mention["data"]
    $if name := data.get("name", None):
        <h3>$name</h3>
    $if data:
        $ a = data["author"]
        $ comment_type = data["comment_type"][0]
        $if comment_type == "like":
            $emoji.emojize(":red_heart:")
        $if content := data.get("content"):
            <div>$:content</div>
    $ published = data["published"][0]
    <small>Opened <a href=$data["url"]><time class=dt-published
    datetime="$published.isoformat()">$published.diff_for_humans()</time></a>
    $if data:
        by <a href=$a["url"]>$a.get("name", a["url"])</a>,
        $if comment := data.get("comment"):
            $ comment_count = len(comment)
            $if comment_count:
                💬 $comment_count comment$("s" if comment_count > 1 else "")
    </small>
    </div>