Update home latest news title

This commit is contained in:
Chocobozzz 2019-06-05 11:35:25 +02:00
parent ec0c6fc14e
commit edb4708407
No known key found for this signature in database
GPG key ID: 583A612D890159BE
11 changed files with 25 additions and 19 deletions

View file

@ -18,7 +18,8 @@
></iframe>
</div> -->
<p>
<img alt="PeerTube" :src="`${$root['/']}icons/favicon.png`"> <span v-html="$t('home.banner.title')"></span>
<img alt="PeerTube" :src="`${$root['/']}icons/favicon.png`">
<a v-if="getLatestNews" v-bind:href="getLatestNews.url">{{ getLatestNews.title }}</a>
</p>
<p class="text-left" v-html="$t('home.banner.subtitle')"></p>
<a class="frama_campaign" href="https://framasoft.org" v-html="$t('home.banner.button')"></a>
@ -162,6 +163,29 @@ import InstancesComponent from '../partials/Instances.vue'
export default {
components: {
InstancesComponent
},
computed: {
getLatestNews: function () {
const blocs = this.$t('news.blocs')
if (typeof blocs !== 'object') return undefined
let latest
for (const key of Object.keys(blocs)) {
const bloc = blocs[key]
Object.assign(bloc, { url: 'news#' + key })
if (!latest) {
latest = bloc
continue
}
if (latest.date.data < bloc.date.data) {
latest = bloc
}
}
return latest
}
}
}
</script>

View file

@ -22,8 +22,6 @@ home:
getting-started: loslegen
how-it-works: Wie es funktioniert
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,8 +22,6 @@ home:
getting-started: Get started
how-it-works: How it works
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,8 +22,6 @@ home:
getting-started: Get started
how-it-works: Como funciona
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,7 +22,6 @@ home:
getting-started: Pour commencer
how-it-works: Comment ça fonctionne
banner:
title: <a href="news#newsletter26-02-2019">Rétrospective et nouvelles fonctionnalités !</a>
subtitle: Découvrez nos progrès de ces derniers mois ainsi que les fonctionnalités
à venir.
button: Soutenir

View file

@ -22,8 +22,6 @@ home:
getting-started: Get started
how-it-works: Come funziona
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,7 +22,6 @@ home:
getting-started: 始めよう
how-it-works: 使い方
banner:
title: <a href="news#newsletter26-02-2019">回顧展、新機能など</a>
subtitle: 私たちは、先月の私たちの進歩について話しています。そして次に何が起こっていますか。
button: サポート
install: PeerTube をインストール

View file

@ -22,8 +22,6 @@ home:
getting-started: Начать
how-it-works: Как это работает
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,8 +22,6 @@ home:
getting-started: Nisjani
how-it-works: Si funksionon
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,8 +22,6 @@ home:
getting-started: Kom igång
how-it-works: Hur det funkar
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support

View file

@ -22,8 +22,6 @@ home:
getting-started: Get started
how-it-works: 它是如何運作的
banner:
title: <a href="news#newsletter26-02-2019">Retrospective, new features and more
to come!</a>
subtitle: We're talking about our progress these last months and what's coming
next.
button: Support