[flags] add alt text

This commit is contained in:
Andrea Vos 2021-04-21 20:06:17 +02:00
parent a41528d423
commit f0a4569ca6

View File

@ -1,15 +1,15 @@
<template> <template>
<span class="flag-wrapper"> <span class="flag-wrapper">
<a v-if="link" :href="`/${config.nouns.route}/${config.nouns.terms.route}#${link.toLowerCase()}`" :title="alt"> <a v-if="link" :href="`/${config.nouns.route}/${config.nouns.terms.route}#${link.toLowerCase()}`" :title="alt">
<img :src="img" alt="" class="flag-mini rounded"/> <img :src="img" :alt="name" class="flag-mini rounded"/>
<Spelling escape :text="name"/><sup v-if="custom" class="text-muted"><small><Icon v="user"/></small></sup> <Spelling escape :text="name"/><sup v-if="custom" class="text-muted"><small><Icon v="user"/></small></sup>
</a> </a>
<span v-else :title="alt"> <span v-else :title="alt">
<img :src="img" alt="" class="flag-mini rounded"/> <img :src="img" :alt="name" class="flag-mini rounded"/>
<Spelling escape :text="name"/><sup v-if="custom" class="text-muted"><small><Icon v="user"/></small></sup> <Spelling escape :text="name"/><sup v-if="custom" class="text-muted"><small><Icon v="user"/></small></sup>
</span> </span>
<span class="flag-preview bg-white rouded p-2 border"> <span class="flag-preview bg-white rouded p-2 border">
<img :src="img" alt="" class="rounded"/> <img :src="img" :alt="name" class="rounded"/>
<span v-if="custom" class="alert alert-warning small d-inline-block mt-2 mb-0 p-2"> <span v-if="custom" class="alert alert-warning small d-inline-block mt-2 mb-0 p-2">
<Icon v="user"/> <Icon v="user"/>
<T>profile.flagsCustomWarning</T> <T>profile.flagsCustomWarning</T>