This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/routes/team.vue

203 lines
6.7 KiB
Vue
Raw Permalink Normal View History

2021-01-12 11:06:59 -08:00
<template>
<div>
2021-11-10 04:05:08 -08:00
<CommunityNav/>
2021-01-12 11:06:59 -08:00
<h2>
2021-06-27 04:03:02 -07:00
<Icon v="collective-logo.svg" class="invertible"/>
2021-01-12 11:06:59 -08:00
<T>contact.team.name</T>
</h2>
2021-07-18 12:51:03 -07:00
<figure class="float-end border rounded m-3">
2021-06-27 04:03:02 -07:00
<img src="/img/collective-logo.svg" alt="" class="invertible"/>
2021-01-12 11:06:59 -08:00
<figcaption>
<p><T>contact.team.logo</T></p>
<p class="text-center bigger mb-0">
<Icon v="transgender-alt"/>
+
<Icon v="comment"/>
=
2021-06-27 04:03:02 -07:00
<Icon v="collective-logo.svg" class="invertible"/>
2021-01-12 11:06:59 -08:00
</p>
2021-08-26 12:01:34 -07:00
<div class="btn-group w-100 mt-3">
<a href="/img-local/logo/logo-full.png" class="btn btn-outline-primary btn-sm" download>
<Icon v="cloud-download"/>
PNG
</a>
<a href="/img-local/logo/logo-full.svg" class="btn btn-outline-primary btn-sm" download>
<Icon v="cloud-download"/>
SVG
</a>
</div>
2021-01-12 11:06:59 -08:00
</figcaption>
</figure>
<section>
2021-08-26 12:01:34 -07:00
<p><T>contact.team.description</T></p>
<ul v-if="$te('contact.team.extra')">
<li v-for="item in $t('contact.team.extra')">
<LinkedText :text="item"/>
</li>
</ul>
2021-01-12 11:06:59 -08:00
</section>
2021-07-18 12:51:03 -07:00
<Mission/>
2021-01-12 11:06:59 -08:00
2021-08-26 05:25:59 -07:00
<section v-if="$te('contact.team.credentials')">
<h3>
<Icon v="graduation-cap"/>
<T>contact.team.credentials.header</T>
</h3>
<T>contact.team.credentials.description</T>
<ul>
<li v-for="credential in credentials">
<strong>{{ credential.credentialsName || credential.teamName }}</strong>
<a :href="`https://pronouns.page/@${credential.username}`" class="badge bg-light text-dark border">
@{{credential.username}}
</a>
<ul>
<li v-for="item in credential.credentials">
<ProfileLink v-if="item.startsWith('https://') || item.startsWith('http://')" :link="item"/>
<LinkedText v-else :text="item"/>
</li>
</ul>
</li>
</ul>
</section>
2021-08-26 06:12:28 -07:00
<section v-if="$te('contact.team.join')">
<h3>
<Icon v="user-plus"/>
<T>contact.team.join.header</T>
</h3>
<p><T>contact.team.join.encouragement</T></p>
<p><T>contact.team.join.areasIntro</T></p>
<ul>
<li v-for="item in $t('contact.team.join.areas')">{{item}}</li>
</ul>
<p><T>contact.team.join.allies</T></p>
<div v-if="$te('contact.team.join.warning')" class="alert alert-warning">
<p class="mb-0">
<Icon v="exclamation-triangle"/>
<T>contact.team.join.warning</T>
</p>
</div>
2021-08-26 06:12:28 -07:00
<p><T>contact.team.join.how</T></p>
<ul>
<li v-for="item in $t('contact.team.join.application')">{{item}}</li>
</ul>
</section>
2021-01-12 11:06:59 -08:00
<section>
<h3>
<Icon v="user-friends"/>
<T>contact.team.members</T>
</h3>
<template v-for="(members, locale) in membersByLocale" v-if="members.length">
<h4 class="mt-4">
<template v-if="locale === ''">
<T>contact.team.upcoming</T>
</template>
<template v-else-if="locale === config.locale">
{{locales[locale].name}}
</template>
<a v-else :href="locales[locale].url">
{{locales[locale].name}}
</a>
</h4>
<ul class="list-unstyled member-list">
2021-01-21 09:56:08 -08:00
<li v-for="member in members" class="mb-3 d-flex">
2021-01-12 11:06:59 -08:00
<a :href="`https://pronouns.page/@${member.username}`">
<Avatar :user="member" dsize="4rem"/>
</a>
2021-01-22 14:54:24 -08:00
<span class="ms-2">
2021-01-12 11:06:59 -08:00
{{ member.teamName }}
<br/>
2021-01-22 14:54:24 -08:00
<a :href="`https://pronouns.page/@${member.username}`" class="badge bg-light text-dark border">
2021-01-12 11:06:59 -08:00
@{{member.username}}
</a>
</span>
</li>
</ul>
</template>
</section>
</div>
</template>
<script>
import { head } from "../src/helpers";
export default {
head() {
return head({
title: this.$t('contact.team.name'),
2021-12-23 08:56:27 -08:00
description: this.$t('contact.team.description'),
2021-01-12 11:06:59 -08:00
});
},
async asyncData({app}) {
return {
membersByLocale: await app.$axios.$get(`/admin/list`),
}
},
2021-08-26 05:25:59 -07:00
computed: {
credentials() {
const r = [];
for (let locale in this.membersByLocale) {
if (!this.membersByLocale.hasOwnProperty(locale)) { continue; }
for (let member of this.membersByLocale[locale]) {
if (member.locale === this.config.locale && member.credentials !== null) {
r.push(member);
}
}
}
return r.sort((a, b) => {
if (a.credentialsLevel > b.credentialsLevel) { return -1; }
if (a.credentialsLevel < b.credentialsLevel) { return 1; }
return Math.random() > 0.5 ? 1 : -1;
});
},
},
2021-01-12 11:06:59 -08:00
}
</script>
<style lang="scss" scoped>
@import "assets/variables";
img {
max-width: 100%;
}
figure {
width: 100%;
max-width: 18rem;
padding: $spacer;
> img {
width: 100%;
}
figcaption {
font-size: $small-font-size;
}
}
2021-01-21 09:56:08 -08:00
@include media-breakpoint-down('md', $grid-breakpoints) {
figure {
float: none !important;
margin: 0 auto;
}
}
2021-01-12 11:06:59 -08:00
.bigger {
font-size: 2rem;
}
@include media-breakpoint-up('md', $grid-breakpoints) {
.member-list {
column-count: 3;
column-width: 16rem;
}
}
</style>