2019-04-03 17:29:03 +02:00
|
|
|
<template>
|
2020-02-18 08:57:00 +01:00
|
|
|
<footer class="footer" ref="footer">
|
2020-12-11 15:27:04 +01:00
|
|
|
<picture>
|
|
|
|
<source
|
|
|
|
:srcset="`/img/pics/footer_${random}-1024w.webp 1x, /img/pics/footer_${random}-1920w.webp 2x`"
|
|
|
|
type="image/webp"
|
|
|
|
/>
|
|
|
|
<source
|
|
|
|
:srcset="`/img/pics/footer_${random}-1024w.jpg 1x, /img/pics/footer_${random}-1920w.jpg 2x`"
|
|
|
|
type="image/jpeg"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
:src="`/img/pics/footer_${random}-1024w.jpg`"
|
|
|
|
alt=""
|
|
|
|
width="5234"
|
|
|
|
height="2189"
|
|
|
|
loading="lazy"
|
|
|
|
/>
|
|
|
|
</picture>
|
2020-02-18 08:57:00 +01:00
|
|
|
<ul>
|
2020-11-30 17:57:08 +01:00
|
|
|
<li>
|
|
|
|
<b-select
|
2021-09-07 17:52:34 +02:00
|
|
|
:aria-label="$t('Language')"
|
2020-11-30 17:57:08 +01:00
|
|
|
v-if="$i18n"
|
|
|
|
v-model="locale"
|
|
|
|
:placeholder="$t('Select a language')"
|
|
|
|
>
|
2021-10-10 16:24:12 +02:00
|
|
|
<option
|
|
|
|
v-for="(language, lang) in langs"
|
|
|
|
:value="lang"
|
|
|
|
:key="lang"
|
|
|
|
:selected="isLangSelected(lang)"
|
|
|
|
>
|
2020-11-30 17:57:08 +01:00
|
|
|
{{ language }}
|
|
|
|
</option>
|
|
|
|
</b-select>
|
|
|
|
</li>
|
2020-02-18 08:57:00 +01:00
|
|
|
<li>
|
2020-11-30 10:24:11 +01:00
|
|
|
<router-link :to="{ name: RouteName.ABOUT }">{{
|
|
|
|
$t("About")
|
|
|
|
}}</router-link>
|
2020-02-18 08:57:00 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-11-30 10:24:11 +01:00
|
|
|
<router-link :to="{ name: RouteName.TERMS }">{{
|
|
|
|
$t("Terms")
|
|
|
|
}}</router-link>
|
2020-02-18 08:57:00 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-11-30 10:24:11 +01:00
|
|
|
<a
|
2021-11-02 19:47:54 +01:00
|
|
|
rel="external"
|
2020-11-30 10:24:11 +01:00
|
|
|
hreflang="en"
|
2021-11-09 09:12:04 +01:00
|
|
|
href="https://framagit.org/framasoft/mobilizon/blob/main/LICENSE"
|
2020-11-30 10:24:11 +01:00
|
|
|
>
|
2020-02-18 08:57:00 +01:00
|
|
|
{{ $t("License") }}
|
|
|
|
</a>
|
|
|
|
</li>
|
2021-10-10 16:24:12 +02:00
|
|
|
<li>
|
|
|
|
<a href="#navbar">{{ $t("Back to top") }}</a>
|
|
|
|
</li>
|
2020-02-18 08:57:00 +01:00
|
|
|
</ul>
|
|
|
|
<div class="content has-text-centered">
|
2020-06-15 18:12:49 +02:00
|
|
|
<i18n
|
|
|
|
tag="span"
|
|
|
|
path="Powered by {mobilizon}. © 2018 - {date} The Mobilizon Contributors - Made with the financial support of {contributors}."
|
|
|
|
>
|
2021-11-02 19:47:54 +01:00
|
|
|
<a rel="external" slot="mobilizon" href="https://joinmobilizon.org">{{
|
2020-11-30 10:24:11 +01:00
|
|
|
$t("Mobilizon")
|
|
|
|
}}</a>
|
2020-06-15 18:12:49 +02:00
|
|
|
<span slot="date">{{ new Date().getFullYear() }}</span>
|
2021-11-02 19:47:54 +01:00
|
|
|
<a
|
|
|
|
rel="external"
|
|
|
|
href="https://joinmobilizon.org/hall-of-fame"
|
|
|
|
slot="contributors"
|
|
|
|
>{{ $t("more than 1360 contributors") }}</a
|
|
|
|
>
|
2020-06-15 18:12:49 +02:00
|
|
|
</i18n>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</footer>
|
2019-04-03 17:29:03 +02:00
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
2020-11-30 17:57:08 +01:00
|
|
|
import { Component, Vue, Watch } from "vue-property-decorator";
|
|
|
|
import { saveLocaleData } from "@/utils/auth";
|
|
|
|
import { loadLanguageAsync } from "@/utils/i18n";
|
2020-02-18 08:57:00 +01:00
|
|
|
import RouteName from "../router/name";
|
2020-11-30 17:57:08 +01:00
|
|
|
import langs from "../i18n/langs.json";
|
2019-04-03 17:29:03 +02:00
|
|
|
|
2020-10-16 16:36:16 +02:00
|
|
|
@Component
|
2019-04-03 17:29:03 +02:00
|
|
|
export default class Footer extends Vue {
|
2019-12-20 13:04:34 +01:00
|
|
|
RouteName = RouteName;
|
2020-10-16 16:36:16 +02:00
|
|
|
|
2020-11-30 17:57:08 +01:00
|
|
|
locale: string | null = this.$i18n.locale;
|
|
|
|
|
|
|
|
langs: Record<string, string> = langs;
|
|
|
|
|
2020-10-16 16:36:16 +02:00
|
|
|
// eslint-disable-next-line class-methods-use-this
|
|
|
|
get random(): number {
|
|
|
|
return Math.floor(Math.random() * 4) + 1;
|
|
|
|
}
|
2020-11-30 17:57:08 +01:00
|
|
|
|
|
|
|
@Watch("locale")
|
|
|
|
// eslint-disable-next-line class-methods-use-this
|
|
|
|
async updateLocale(locale: string): Promise<void> {
|
|
|
|
if (locale) {
|
2021-08-09 19:29:15 +02:00
|
|
|
console.debug("Setting locale from footer");
|
2020-11-30 17:57:08 +01:00
|
|
|
await loadLanguageAsync(locale);
|
|
|
|
saveLocaleData(locale);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Watch("$i18n.locale", { deep: true })
|
|
|
|
updateLocaleFromI18n(locale: string): void {
|
|
|
|
if (locale) {
|
|
|
|
this.locale = locale;
|
|
|
|
}
|
|
|
|
}
|
2021-10-10 16:24:12 +02:00
|
|
|
|
|
|
|
isLangSelected(lang: string): boolean {
|
|
|
|
return lang === this.locale;
|
|
|
|
}
|
2019-04-03 17:29:03 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2020-10-16 16:36:16 +02:00
|
|
|
@import "~bulma/sass/utilities/mixins.sass";
|
2020-02-18 08:57:00 +01:00
|
|
|
footer.footer {
|
|
|
|
color: $secondary;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2020-06-15 18:12:49 +02:00
|
|
|
font-size: 14px;
|
2020-10-16 16:36:16 +02:00
|
|
|
padding: 1rem 1.5rem;
|
2019-04-03 17:29:03 +02:00
|
|
|
|
2020-10-16 16:36:16 +02:00
|
|
|
img {
|
2020-02-18 08:57:00 +01:00
|
|
|
flex: 1;
|
2020-10-16 16:36:16 +02:00
|
|
|
max-width: 40rem;
|
|
|
|
@include mobile {
|
2021-06-10 10:33:06 +02:00
|
|
|
max-width: 100%;
|
2020-10-16 16:36:16 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-04-03 17:29:03 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
div.content {
|
|
|
|
flex: 1;
|
2021-06-10 10:33:06 +02:00
|
|
|
padding-top: 10px;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-04-03 17:29:03 +02:00
|
|
|
|
2020-10-16 16:36:16 +02:00
|
|
|
ul {
|
2020-02-18 08:57:00 +01:00
|
|
|
display: inline-flex;
|
2020-10-16 16:36:16 +02:00
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
li {
|
|
|
|
display: inline-flex;
|
|
|
|
margin: auto 5px;
|
2021-06-10 10:33:06 +02:00
|
|
|
padding: 2px 0;
|
2020-10-16 16:36:16 +02:00
|
|
|
a {
|
|
|
|
font-size: 1.1rem;
|
|
|
|
}
|
2019-04-03 17:29:03 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2020-06-15 18:12:49 +02:00
|
|
|
|
|
|
|
a {
|
|
|
|
color: $white;
|
|
|
|
text-decoration: underline;
|
|
|
|
text-decoration-color: $secondary;
|
2021-10-10 16:24:12 +02:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: #000;
|
|
|
|
color: #fff;
|
|
|
|
outline: 3px solid #000;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2020-06-15 18:12:49 +02:00
|
|
|
}
|
2020-11-30 17:57:08 +01:00
|
|
|
|
2021-06-10 10:33:06 +02:00
|
|
|
::v-deep span.select {
|
|
|
|
select,
|
|
|
|
option {
|
|
|
|
background: $background-color;
|
|
|
|
color: $white;
|
|
|
|
}
|
2020-11-30 17:57:08 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-04-03 17:29:03 +02:00
|
|
|
</style>
|