{* SPDX-FileCopyrightText: © 2021 Olivier Meunier SPDX-License-Identifier: AGPL-3.0-only *} {{ extends "./base" }} {{- block title() -}}{{ gettext("Bookmark Highlights") }}{{- end -}} {{- block mainContent() -}}

{{ yield title() }}

{{- if .Pagination.TotalCount == 0 -}}

{{ gettext("You don't have any highlights yet.") }}

{{ gettext(` Once you start highlighting parts of your saved articles, they will appear on this page for you to easily find them. `) }}

{{ gettext( `Read more about highlights in the documentation.`, "link", urlFor(`/docs/bookmark`) + "#highlights", )|raw }}

{{- else -}} {{- include "/_libs/pagination" .Pagination -}} {{- range i, x := .Annotations -}}

{{ date(x.Created, "%e %B %Y, %H:%M") }}

{{- if x.Note != "" -}}

{{- yield icon(name="o-note") -}} {{ x.Note }}

{{- end -}}
{{- x.Text -}}
{* This groups annotations by bookmarks in the same sequence *} {{- if i+1 == len(.Annotations) || .Annotations[i+1].BookmarkID != x.BookmarkID -}} {{ x.BookmarkSiteName }} ‐ {{ x.BookmarkTitle }} {{- end -}}
{{- end -}} {{- include "/_libs/pagination" .Pagination -}} {{- end -}} {{- end -}}