Commit a397ab4d authored by Pablo Marcos's avatar Pablo Marcos Committed by Carl Schwan
Browse files

Flatpak, recent news, new section url

parent d5fa7426
......@@ -12,7 +12,7 @@ languages:
menu:
main:
- name: Format Support
url: /applications/
url: /formats/
weight: 1
- name: Download
url: /download/
......@@ -39,7 +39,7 @@ languages:
menu:
main:
- name: Formatos Soportados
url: /applications/
url: /formats/
weight: 1
- name: Descargas
url: /download/
......
......@@ -12,7 +12,7 @@ options:
- name: Flatpak
image: /images/flatpak.png
image_alt: Flatpak logo
text: "You can install the latest [Okular Flatpak](https://flathub.org/apps/details/org.kde.okular) from Flathub. Experimental Flatpaks with nightly builds of Okular can be [installed from the KDE Flatpak repository](https://community.kde.org/KDE_PIM/Flatpak)."
text: "You can install the latest [Okular Flatpak](https://flathub.org/apps/details/org.kde.okular) from Flathub. Experimental Flatpaks with nightly builds of Okular can be [installed from the KDE Flatpak repository](https://community.kde.org/Guidelines_and_HOWTOs/Flatpak#Applications )."
- name: Release Sources
image: /images/ark.svg
image_alt: Ark logo
......
---
layout: applications
layout: formats
title: Document Format Handlers Status
intro: Okular supports a wide variety of document formats and use cases. This page always refers to the stable series of Okular, currently Okular 20.12
......
......@@ -58,6 +58,13 @@ Home.try_it:
Home.download_it:
other: "Visit the download page"
Home.recentnews:
other: "Latest News"
Home.recentnews.view-all:
other: "View all Development News"
Home.recentnews.read-more:
other: "Read More"
#Applications
Apps.Header:
......
......@@ -13,7 +13,7 @@
<img class="img-fluid" alt={{ i18n "Home.alt_img"}} src="/images/screenies/okular-main.png" />
<figcaption>{{ i18n "Home.figcaption" | markdownify}}</figcaption>
</figure>
<div><a href="{{ "/" | relLangURL }}" class="noblefir">{{ i18n "Home.downloadbutton"}}</a></div>
<div><a href="{{ "/download" | relLangURL }}" class="noblefir">{{ i18n "Home.downloadbutton"}}</a></div>
</div>
</section>
......@@ -23,7 +23,7 @@
<img src="/images/okular-format-support.svg" class="img-fluid" style="max-height: 100px" />
<p>{{ i18n "Home.SupportsFormats.description"}}</p>
<p>
<a class="learn-more mt-3" href="{{ "/applications" | relLangURL }}"> {{ i18n "Home.SupportsFormats.seemore"}}</a>
<a class="learn-more mt-3" href="{{ "/formats" | relLangURL }}"> {{ i18n "Home.SupportsFormats.seemore"}}</a>
</p>
</div>
</section>
......@@ -120,5 +120,35 @@
</p>
</div>
</section>
<section id="recent-news" class="section-green">
<div class="container my-4">
<h2 class="mb-3 h1">{{ i18n "Home.recentnews" }}</h2>
<div class="row">
{{ $pages := (.Site.GetPage "/news").RegularPagesRecursive }}
{{ range .Site.Home.Translations }}
{{ $pages = $pages | lang.Merge (.Site.GetPage "/news").RegularPagesRecursive }}
{{ end }}
{{ range first 4 (where $pages "Params.hidden" "ne" "true") }}
<div class="col-12 col-md-6 mb-4">
<div class="text-lighter">{{ partial "i18n_date.html" . }}</div>
<h3 class="mt-1 h4">{{ partial "i18n_title.html" . }}</h3>
<div class="post-entry mt-3">
{{ $description := partial "i18n_description.html" . }}
{{ if $description }}
{{ $description }}
{{else}}
{{ .Summary }}
{{end}}
{{ if .Truncated }}
<a href="{{ .Permalink }}" class="d-block mt-2">{{i18n "Home.recentnews.read-more" }}</a>
{{ end }}
</div>
</div>
{{end}}
</div>
<a href="/news/" class="learn-more mt-3" style="font-weight: bold;">&#x1F4E2; {{ i18n "Home.recentnews.view-all" }}</a>
</div>
</section>
</main>
{{ end }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<title>{{ i18n "site-title" }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range (.Paginate (where .Pages "Type" "announcement")).Pages }}
{{ if (not (eq (countwords .Content) 0)) }}
<description>{{ i18n "rss-description" }}</description>
<generator>Hugo -- gohugo.io</generator>
<language>{{ .Site.LanguageCode | default "en" }}</language>
{{ with .OutputFormats.Get "RSS" }}{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}{{ end }}
{{ $pages := (.Site.GetPage "/news").RegularPagesRecursive }}
{{ range first 4 (where $pages "Params.hidden" "ne" "true") }}
<item>
<title>{{ .Title }}</title>
<title>{{ partial "i18n_title.html" . }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
<description>{{ partial "rss_content.html" . | html }}</description>
</item>
{{ end }}
{{ end }}
</channel>
</rss>
{{/*
SPDX-FileCopyrightText: 2021 Nguyen Hung Phu <phuhnguyen@disroot.org>
SPDX-License-Identifier: LGPL-3.0-or-later
*/}}
{{- $dateFormat := i18n "date-format" }}
{{- if .Params.date }}
{{- $withY := replace $dateFormat "%Y" .Params.date.Year }}
{{- $withYB := replace $withY "%B" (i18n (.Params.date.Format "January")) }}
{{- $withYBd := replace $withYB "%d" (.Params.date.Format "02") }}
{{- $withYBdA := replace $withYBd "%A" (i18n (.Params.date.Format "Monday")) }}
{{- $withYBdA }}
{{- end -}}
{{/*
SPDX-FileCopyrightText: 2021 Nguyen Hung Phu <phuhnguyen@disroot.org>
SPDX-License-Identifier: LGPL-3.0-or-later
*/}}
{{- with .Params.description }}
{{- . }}
{{- else }}
{{- if .IsHome }}
{{- i18n "site-description" }}
{{- else if eq .Params.layout "plasma" }}
{{- $version := .File.TranslationBaseName }}
{{- $major := index (split $version ".") 0 | int }}
{{- $minor := index (split $version ".") 1 | int }}
{{- $patch := index (split $version ".") 2 | int }}
{{- $msgName := "" }}
{{- $versionStr := "" }}
{{- $varStr := "" }}
{{- if and (or (and (eq $major 5) (gt $minor 19)) (gt $major 5)) (gt $patch 0) (lt $patch 50) }}
{{- $msgName = "annc-plasma-bugfix-desc-post-5-19" }}
{{- $varStr = "%maj_ver" }}
{{- $versionStr = $major }}
{{- else }}
{{- $varStr = "%ver" }}
{{- if and (gt $patch 0) (lt $patch 50) }}
{{- $msgName = "annc-plasma-desc-pre-5-20" }}
{{- $versionStr = $version }}
{{- else if eq $patch 0 }}
{{- $msgName = "annc-plasma-desc-pre-5-20" }}
{{- $versionStr = print $major "." $minor }}
{{- else }}
{{- $msgName = "annc-plasma-beta-desc-pre-5-20" }}
{{- $versionStr = print $major "." (add $minor 1) }}
{{- end }}
{{- end }}
{{- replace (i18n $msgName) $varStr $versionStr }}
{{- else if eq .Params.layout "framework" }}
{{- $version := .File.TranslationBaseName }}
{{- $major := index (split $version ".") 0 | int }}
{{- $minor := index (split $version ".") 1 | int }}
{{- $msgName := "" }}
{{- if and (eq $major 5) (lt $minor 76) }}
{{- $msgName = "annc-frameworks-desc-pre-5-76" }}
{{- else }}
{{- $msgName = "annc-frameworks-desc" }}
{{- end }}
{{- replace (i18n $msgName) "%ver" $version }}
{{- else }}
{{- "" }}
{{- end }}
{{- end -}}
{{/*
SPDX-FileCopyrightText: 2021 Nguyen Hung Phu <phuhnguyen@disroot.org>
SPDX-License-Identifier: LGPL-3.0-or-later
*/}}
{{- with .Params.title }}
{{- . }}
{{- else }}
{{- if .IsHome }}
{{- i18n "home" }}
{{- else if eq .Params.layout "plasma" }}
{{- $version := .File.TranslationBaseName }}
{{- $major := index (split $version ".") 0 | int }}
{{- $minor := index (split $version ".") 1 | int }}
{{- $patch := index (split $version ".") 2 | int }}
{{- $msgName := "" }}
{{- $versionStr := "" }}
{{- if and (gt $patch 0) (lt $patch 50) }}
{{- $msgName = printf "annc-plasma-bugfix-title-%d" .Params.date.Month }}
{{- $versionStr = $version }}
{{- else if eq $patch 0 }}
{{- $msgName = "annc-plasma-release-title" }}
{{- $versionStr = print $major "." $minor }}
{{- else }}
{{- $msgName = "annc-plasma-beta-title" }}
{{- $versionStr = print $major "." (add (int $minor) 1) }}
{{- end }}
{{- replace (i18n $msgName) "%ver" $versionStr }}
{{- else if eq .Params.layout "framework" }}
{{- $version := .File.TranslationBaseName }}
{{- $major := index (split $version ".") 0 | int }}
{{- $minor := index (split $version ".") 1 | int }}
{{- $msgName := "" }}
{{- if and (eq $major 5) (lt $minor 76) }}
{{- $msgName = "annc-frameworks-title-pre-5-76" }}
{{- else }}
{{- $msgName = "annc-frameworks-title" }}
{{- end }}
{{- replace (i18n $msgName) "%ver" $version }}
{{- else }}
{{- "" }}
{{- end }}
{{- end -}}
{{/*
SPDX-FileCopyrightText: 2021 Nguyen Hung Phu <phuhnguyen@disroot.org>
SPDX-License-Identifier: LGPL-3.0-or-later
*/}}
{{- if eq .Params.layout "plasma" }}
{{ partial "announcements/plasma_intro.html" . }}
{{ .Content }}
{{ $major := path.Base .File.Dir }}
{{ with .Params.changelog }}
<a href="/announcements/changelogs/plasma/{{$major}}/{{ . }}">{{ i18n "view-changelog" }}</a>
{{ end }}
{{- else if eq .Params.layout "framework" }}
{{ partial "announcements/frameworks_intro.html" . }}
{{ .Content }}
{{- else }}
{{ .Content }}
{{- end -}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment