2019-04-03 15:29:03 +00:00
|
|
|
<template>
|
2022-07-12 08:55:28 +00:00
|
|
|
<footer
|
|
|
|
class="bg-violet-2 color-secondary flex flex-col items-center py-2 px-3"
|
|
|
|
ref="footer"
|
|
|
|
>
|
|
|
|
<picture class="flex max-w-xl">
|
2020-12-11 14:27:04 +00:00
|
|
|
<source
|
|
|
|
:srcset="`/img/pics/footer_${random}-1024w.webp 1x, /img/pics/footer_${random}-1920w.webp 2x`"
|
|
|
|
type="image/webp"
|
|
|
|
/>
|
|
|
|
<img
|
2022-08-12 14:40:04 +00:00
|
|
|
:src="`/img/pics/footer_${random}-1024w.webp`"
|
2020-12-11 14:27:04 +00:00
|
|
|
alt=""
|
2022-07-12 08:55:28 +00:00
|
|
|
width="1024"
|
|
|
|
height="428"
|
2020-12-11 14:27:04 +00:00
|
|
|
loading="lazy"
|
|
|
|
/>
|
|
|
|
</picture>
|
2022-07-12 08:55:28 +00:00
|
|
|
<ul
|
|
|
|
class="inline-flex flex-wrap justify-around gap-3 text-lg text-white underline decoration-yellow-1"
|
|
|
|
>
|
2020-11-30 16:57:08 +00:00
|
|
|
<li>
|
2022-07-12 08:55:28 +00:00
|
|
|
<o-select
|
2022-09-01 08:42:05 +00:00
|
|
|
class="text-black dark:text-white"
|
2022-07-12 08:55:28 +00:00
|
|
|
:aria-label="t('Language')"
|
2020-11-30 16:57:08 +00:00
|
|
|
v-model="locale"
|
2022-07-12 08:55:28 +00:00
|
|
|
:placeholder="t('Select a language')"
|
2020-11-30 16:57:08 +00:00
|
|
|
>
|
2021-10-10 14:24:12 +00:00
|
|
|
<option
|
|
|
|
v-for="(language, lang) in langs"
|
|
|
|
:value="lang"
|
|
|
|
:key="lang"
|
|
|
|
:selected="isLangSelected(lang)"
|
|
|
|
>
|
2020-11-30 16:57:08 +00:00
|
|
|
{{ language }}
|
|
|
|
</option>
|
2022-07-12 08:55:28 +00:00
|
|
|
</o-select>
|
2020-11-30 16:57:08 +00:00
|
|
|
</li>
|
2020-02-18 07:57:00 +00:00
|
|
|
<li>
|
2020-11-30 09:24:11 +00:00
|
|
|
<router-link :to="{ name: RouteName.ABOUT }">{{
|
2022-07-12 08:55:28 +00:00
|
|
|
t("About")
|
2020-11-30 09:24:11 +00:00
|
|
|
}}</router-link>
|
2020-02-18 07:57:00 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-11-30 09:24:11 +00:00
|
|
|
<router-link :to="{ name: RouteName.TERMS }">{{
|
2022-07-12 08:55:28 +00:00
|
|
|
t("Terms")
|
2020-11-30 09:24:11 +00:00
|
|
|
}}</router-link>
|
2020-02-18 07:57:00 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-11-30 09:24:11 +00:00
|
|
|
<a
|
2021-11-02 18:47:54 +00:00
|
|
|
rel="external"
|
2020-11-30 09:24:11 +00:00
|
|
|
hreflang="en"
|
2021-11-09 08:12:04 +00:00
|
|
|
href="https://framagit.org/framasoft/mobilizon/blob/main/LICENSE"
|
2020-11-30 09:24:11 +00:00
|
|
|
>
|
2022-07-12 08:55:28 +00:00
|
|
|
{{ t("License") }}
|
2020-02-18 07:57:00 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-10-10 14:24:12 +00:00
|
|
|
<li>
|
2022-07-12 08:55:28 +00:00
|
|
|
<a href="#navbar">{{ t("Back to top") }}</a>
|
2021-10-10 14:24:12 +00:00
|
|
|
</li>
|
2020-02-18 07:57:00 +00:00
|
|
|
</ul>
|
2022-07-12 08:55:28 +00:00
|
|
|
<div class="text-center flex-1 pt-2 text-yellow-1">
|
|
|
|
<i18n-t
|
2020-06-15 16:12:49 +00:00
|
|
|
tag="span"
|
2022-07-12 08:55:28 +00:00
|
|
|
keypath="Powered by {mobilizon}. © 2018 - {date} The Mobilizon Contributors - Made with the financial support of {contributors}."
|
2020-06-15 16:12:49 +00:00
|
|
|
>
|
2022-07-12 08:55:28 +00:00
|
|
|
<template #mobilizon>
|
|
|
|
<a
|
|
|
|
rel="external"
|
|
|
|
class="text-white underline decoration-yellow-1"
|
|
|
|
href="https://joinmobilizon.org"
|
|
|
|
>{{ t("Mobilizon") }}</a
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
<template #date
|
|
|
|
><span>{{ new Date().getFullYear() }}</span></template
|
2021-11-02 18:47:54 +00:00
|
|
|
>
|
2022-07-12 08:55:28 +00:00
|
|
|
<template #contributors>
|
|
|
|
<a
|
|
|
|
rel="external"
|
|
|
|
class="text-white underline decoration-yellow-1"
|
|
|
|
href="https://joinmobilizon.org/hall-of-fame"
|
|
|
|
>{{ t("more than 1360 contributors") }}</a
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</i18n-t>
|
2020-02-18 07:57:00 +00:00
|
|
|
</div>
|
|
|
|
</footer>
|
2019-04-03 15:29:03 +00:00
|
|
|
</template>
|
2022-07-12 08:55:28 +00:00
|
|
|
<script setup lang="ts">
|
2020-11-30 16:57:08 +00:00
|
|
|
import { saveLocaleData } from "@/utils/auth";
|
|
|
|
import { loadLanguageAsync } from "@/utils/i18n";
|
2020-02-18 07:57:00 +00:00
|
|
|
import RouteName from "../router/name";
|
2020-11-30 16:57:08 +00:00
|
|
|
import langs from "../i18n/langs.json";
|
2022-07-12 08:55:28 +00:00
|
|
|
import { computed, watch } from "vue";
|
|
|
|
import { useI18n } from "vue-i18n";
|
2019-04-03 15:29:03 +00:00
|
|
|
|
2022-07-12 08:55:28 +00:00
|
|
|
const { locale, t } = useI18n({ useScope: "global" });
|
2020-11-30 16:57:08 +00:00
|
|
|
|
2022-07-12 08:55:28 +00:00
|
|
|
const random = computed((): number => {
|
|
|
|
return Math.floor(Math.random() * 4) + 1;
|
|
|
|
});
|
2020-11-30 16:57:08 +00:00
|
|
|
|
2022-07-12 08:55:28 +00:00
|
|
|
watch(locale, async () => {
|
|
|
|
if (locale) {
|
|
|
|
console.debug("Setting locale from footer");
|
|
|
|
await loadLanguageAsync(locale.value as string);
|
|
|
|
saveLocaleData(locale.value as string);
|
2020-10-16 14:36:16 +00:00
|
|
|
}
|
2022-07-12 08:55:28 +00:00
|
|
|
});
|
2020-11-30 16:57:08 +00:00
|
|
|
|
2022-07-12 08:55:28 +00:00
|
|
|
const isLangSelected = (lang: string): boolean => {
|
|
|
|
return lang === locale.value;
|
|
|
|
};
|
2019-04-03 15:29:03 +00:00
|
|
|
</script>
|