{* SPDX-FileCopyrightText: © 2023 Olivier Meunier SPDX-License-Identifier: AGPL-3.0-only *} {{- import "/_libs/common" -}} {{ import "./components/common" }} {{- if isset(.Item) -}} {{ .Item.Title }} {{- else -}} {{ gettext("Shared link") }} {{- end -}} - Readeck {{- if isset(.Item) }} {{- if !empty(.Item.Description) }} {{ end -}} {{- if isset(.Item.Resources.image) }} {{ end -}} {{- if .Item.Type == "video" }} {{ else if .Item.HasArticle }} {{- range .Item.Authors }} {{ end -}} {{- if !empty(.Item.Published) }} {{ end -}} {{- end -}} {{- end -}}
{{- if !isset(.Item) -}}

{{- if .Status == 404 -}} {{ gettext("Page not found") }} {{- else if .Status == 410 -}} {{ gettext("Page has expired") }} {{- end -}}

{{- else -}}

{{ .Item.Title }}

  • {{- if isset(.Item.Resources.icon) -}} {{- end -}} {{ default(.Item.SiteName, "no site name") }}
  • {{- if !empty(.Item.Published) -}} {{- yield line_icon(icon="o-calendar") content -}} {{ gettext("Published on %s", date(.Item.Published, "%e %B %Y")) }} {{- end -}} {{- end -}} {{- if !empty(.Item.Authors) -}} {{- yield line_icon(icon="o-pen") content -}} {{ gettext("By %s", join(.Item.Authors, ", ")) }} {{- end -}} {{- end -}} {{- yield line_icon(icon="o-link-ext") content -}} {{ .Item.Domain }} {{- end -}} {{- if .Item.ReadingTime > 0 -}} {{- yield line_icon(icon="o-clock") content -}} {{ gettext("%d min", .Item.ReadingTime) }} {{- end -}} {{- end -}}

{{- gettext( "Shared by %[1]s with %[2]s", html(.Username), `Readeck`, ) | raw }} {{ yield icon(name="o-logo-square") -}}


{{- if !empty(.Item.Description) -}}

{{ .Item.Description }}

{{- end -}}
{{- if .Item.Type == "photo" && isset(.Item.Resources.image) -}}
{{- else if .Item.Type == "video" && isset(.Item.Resources.image) && .Item.Embed -}}
{{- end -}} {{- if .Item.HasArticle -}}
{{- unsafeWrite(.HTML) -}}
{{- end -}} {{- end -}}

{{- gettext( "Saved with %s", `Readeck`, ) | raw }} {{ yield icon(name="o-logo-square") -}}