{* SPDX-FileCopyrightText: © 2021 Olivier Meunier SPDX-License-Identifier: AGPL-3.0-only *} {{ extends "./base" }} {{- import "/_libs/forms" -}} {{- import "/_libs/pagination" -}} {{- import "./components/list_actions"}} {{ block title() }}{{ .PageTitle }}{{ end }} {{- block extraHead() }} {{- end -}} {{ block mainContent() -}}
{{- if .Form.Errors() -}} {{ range .Form.Errors() }}

{{ .Error() }}

{{- end -}} {{- end -}} {{- if .MaybeSearch -}} {{- yield message() content -}} {{ gettext(`"%[1]s" is not a valid address. Did you mean to search your bookmarks for %[2]s?`, html(.Form.Get(`url`).String()), `` + html(.Form.Get(`url`).String()) + ``, )|unsafe }} {{- end -}} {{- else if .Form.Get("url").Errors() -}} {{- yield message(type="error") content -}}
    {{ range .Form.Get("url").Errors() }}
  • {{ . }}
  • {{ end }}
{{- end -}} {{- end -}}
{{- if .Count.Total == 0 -}}
{{ yield icon(name="o-big-arrow", class="text-yellow-500", svgClass="h-36", w="50", h="250") }}

{{ gettext("Welcome to Readeck!") }}

{{ gettext("You don't have any bookmarks yet.
Copy a link in the field above and start saving.")|raw }}

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

{{- if hasPermission("bookmarks", "import") -}}

{{- yield icon(name="o-import", class="text-yellow-600", svgClass="h-6 w-6") }} {{ gettext("Import existing bookmarks") -}}

{{ gettext(` Would you like to import from a similar tool or from a file with existing bookmarks? Try Readeck's import tool. `) }}

{{- gettext("Import links and articles") -}}

{{- end -}}
{{- end -}} {{- if isset(.Filters) && .Count.Total > 0 }}

{{ .PageTitle }}

{{- yield list_actions() content -}}
{{- if hasPermission("bookmarks", "export") || hasPermission("bookmarks", "import") -}} {{ sortParam := isset(.CurrentOrder) ? .CurrentOrder : "" }} {{- yield export_menu(params=`?` + .Filters.GetQueryString(), sortParam=sortParam) content -}} {{- if hasPermission("bookmarks", "import") -}}
  • {{- yield icon(name="o-import") }} {{ gettext("Import bookmarks") }}
  • {{- end -}} {{- end -}} {{- end -}} {{- end -}}
    {{- if .Filters.IsActive() -}}

    {{- if .Pagination.TotalCount == 0 -}} {{ gettext(`Your search query yielded no results.`)|raw }} {{- else -}} {{ ngettext( `Your search query yielded %d result.`, `Your search query yielded %d results.`, .Pagination.TotalCount, .Pagination.TotalCount, )|raw }} {{- end -}}

    {{- end -}} {{ end -}}
    {{- yield icon(name="o-filter") }} {{ gettext("Filters") -}}

    {{ gettext("Filters") }} {{ yield icon(name="o-help") }} {{ gettext("Documentation") }}

    {{ include("./components/filters") .Filters }} {{- if isset(.CurrentOrder) -}} {{- end -}}
    {{ if .Filters.IsActive() -}} {{ gettext("Reset search") }} {{ yield icon(name="o-plus") }} {{ gettext("Create a collection") }} {{- end }}
    {{- include "./components/bookmark_list" -}}
    {{- end }}