[nouns][terminology][inclusive] clean up nouns images, terminology & inclusive position (not inside nouns anymore)
This commit is contained in:
parent
00c9c270d0
commit
b62156e98a
|
@ -171,12 +171,6 @@ form[disabled] {
|
|||
list-style: none;
|
||||
li {
|
||||
white-space: nowrap;
|
||||
a:not([href='#']) {
|
||||
display: none;
|
||||
}
|
||||
&:hover a:not([href='#']) {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
>li:before {
|
||||
content: "⋅";
|
||||
|
@ -190,12 +184,6 @@ form[disabled] {
|
|||
list-style: none;
|
||||
li {
|
||||
white-space: nowrap;
|
||||
a:not([href='#']) {
|
||||
display: none;
|
||||
}
|
||||
&:hover a:not([href='#']) {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
>li:before {
|
||||
content: "⁖";
|
||||
|
|
|
@ -45,13 +45,11 @@
|
|||
<ul class="list-singular">
|
||||
<li v-for="w in s.el.masc">
|
||||
{{ w }}
|
||||
<a :href="`/api/nouns/${w}.png`" target="_blank" rel="noopener"><Icon v="image"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="config.nouns.plurals" class="list-plural">
|
||||
<li v-for="w in s.el.mascPl">
|
||||
<Spelling :text="w"/>
|
||||
<a :href="`/api/nouns/${w}.png`" target="_blank" rel="noopener"><Icon v="image"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -73,13 +71,11 @@
|
|||
<ul class="list-singular">
|
||||
<li v-for="w in s.el.fem">
|
||||
<Spelling :text="w"/>
|
||||
<a :href="`/api/nouns/${w}.png`" target="_blank" rel="noopener"><Icon v="image"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="config.nouns.plurals" class="list-plural">
|
||||
<li v-for="w in s.el.femPl">
|
||||
<Spelling :text="w"/>
|
||||
<a :href="`/api/nouns/${w}.png`" target="_blank" rel="noopener"><Icon v="image"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -102,14 +98,12 @@
|
|||
<li v-for="w in s.el.neutr">
|
||||
<Declension v-if="config.nouns.declension" :word="w" tooltip/>
|
||||
<template v-else><Spelling :text="w"/></template>
|
||||
<a :href="`/api/nouns/${w}.png`" target="_blank" rel="noopener"><Icon v="image"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="config.nouns.plurals" class="list-plural">
|
||||
<li v-for="w in s.el.neutrPl">
|
||||
<Declension v-if="config.nouns.declension" :word="w" plural :singularOptions="s.el.neutr" tooltip/>
|
||||
<template v-else><Spelling :text="w"/></template>
|
||||
<a :href="`/api/nouns/${w}.png`" target="_blank" rel="noopener"><Icon v="image"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -172,6 +166,16 @@
|
|||
</span>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<a :href="`/api/nouns/${s.el.id}.png`" target="_blank" rel="noopener"
|
||||
class="btn btn-concise btn-outline-primary btn-sm m-1"
|
||||
>
|
||||
<Icon v="image"/>
|
||||
<span class="btn-label">
|
||||
<T>nouns.image</T>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</template></template>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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.terminology.route}#${link.toLowerCase()}`" :title="alt">
|
||||
<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>
|
||||
</a>
|
||||
|
@ -29,7 +29,7 @@
|
|||
},
|
||||
computed: {
|
||||
link() {
|
||||
if (!this.config.nouns.terms.enabled || !(this.config.nouns.terms.published || this.$isGranted('terms'))) {
|
||||
if (!this.config.terminology.enabled || !(this.config.terminology.published || this.$isGranted('terms'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -160,11 +160,11 @@
|
|||
for (let subroute of this.config.nouns.subroutes || []) {
|
||||
extras.push(`/${this.config.nouns.route}/${subroute}`);
|
||||
}
|
||||
if (this.config.nouns.inclusive.enabled) {
|
||||
extras.push(`/${this.config.nouns.route}/${this.config.nouns.inclusive.route}`);
|
||||
if (this.config.inclusive.enabled) {
|
||||
extras.push(`/${this.config.nouns.route}/${this.config.inclusive.route}`);
|
||||
}
|
||||
if (this.config.nouns.terms.enabled) {
|
||||
extras.push(`/${this.config.nouns.route}/${this.config.nouns.terms.route}`);
|
||||
if (this.config.terminology.enabled) {
|
||||
extras.push(`/${this.config.nouns.route}/${this.config.terminology.route}`);
|
||||
}
|
||||
|
||||
links.push({
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="btn-group mb-3 d-none d-md-flex bg-white category-filter">
|
||||
<button v-for="category in config.nouns.inclusive.categories"
|
||||
<button v-for="category in config.inclusive.categories"
|
||||
:class="['btn btn-sm', filter === ':' + category ? 'btn-primary' : 'btn-outline-primary']"
|
||||
@click="filter = filter === ':' + category ? '' : ':' + category"
|
||||
>
|
||||
|
@ -35,15 +35,15 @@
|
|||
<template v-slot:header>
|
||||
<th class="text-nowrap">
|
||||
<Icon v="comment-times"/>
|
||||
<T>nouns.inclusive.insteadOf</T>
|
||||
<T>inclusive.insteadOf</T>
|
||||
</th>
|
||||
<th class="text-nowrap">
|
||||
<Icon v="comment-check"/>
|
||||
<T>nouns.inclusive.say</T>
|
||||
<T>inclusive.say</T>
|
||||
</th>
|
||||
<th class="text-nowrap">
|
||||
<Icon v="comment-dots"/>
|
||||
<T>nouns.inclusive.because</T>
|
||||
<T>inclusive.because</T>
|
||||
</th>
|
||||
<th></th>
|
||||
</template>
|
||||
|
@ -278,7 +278,7 @@
|
|||
},
|
||||
watch: {
|
||||
filter() {
|
||||
this.setHash(this.config.nouns.inclusive.hashNamespace || '', this.filter);
|
||||
this.setHash(this.config.inclusive.hashNamespace || '', this.filter);
|
||||
if (this.$refs.dictionarytable) {
|
||||
this.$refs.dictionarytable.reset();
|
||||
this.$refs.dictionarytable.focus();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<Icon v="comment-times"/>
|
||||
<T>nouns.inclusive.insteadOf</T>
|
||||
<T>inclusive.insteadOf</T>
|
||||
</strong></label>
|
||||
<NounForm v-model="form.insteadOf" maxlength="128"/>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<Icon v="comment-check"/>
|
||||
<T>nouns.inclusive.say</T>
|
||||
<T>inclusive.say</T>
|
||||
</strong></label>
|
||||
<NounForm v-model="form.say" maxlength="128"/>
|
||||
</div>
|
||||
|
@ -36,14 +36,14 @@
|
|||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<Icon v="comment-dots"/>
|
||||
<T>nouns.inclusive.because</T>
|
||||
<T>inclusive.because</T>
|
||||
</strong></label>
|
||||
<textarea v-model="form.because" class="form-control form-control-sm" required rows="6"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><strong><T>nouns.inclusive.categories</T>:</strong></label>
|
||||
<a v-for="category in config.nouns.inclusive.categories"
|
||||
<label><strong><T>inclusive.categories</T>:</strong></label>
|
||||
<a v-for="category in config.inclusive.categories"
|
||||
href="#" :class="['badge border mx-1 text-decoration-none', form.categories.includes(category) ? 'bg-primary text-white' : 'bg-light text-primary']"
|
||||
@click.prevent="form.categories = form.categories.includes(category) ? form.categories.filter(c => c !== category) : [...form.categories, category]"
|
||||
>
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><strong><T>nouns.inclusive.sources</T>:</strong></label>
|
||||
<label><strong><T>inclusive.sources</T>:</strong></label>
|
||||
<ListInput v-model="form.links" v-slot="s">
|
||||
<input v-model="s.val" type="url" class="form-control" @keyup="s.update(s.val)" required/>
|
||||
</ListInput>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="btn-group mb-3 d-none d-md-flex bg-white category-filter">
|
||||
<button v-for="category in config.nouns.terms.categories"
|
||||
<button v-for="category in config.terminology.categories"
|
||||
:class="['btn btn-sm', filter === ':' + category ? 'btn-primary' : 'btn-outline-primary']"
|
||||
@click="filter = filter === ':' + category ? '' : ':' + category"
|
||||
>
|
||||
|
@ -212,7 +212,7 @@
|
|||
},
|
||||
watch: {
|
||||
filter() {
|
||||
this.setHash(this.config.nouns.terms.hashNamespace || '', this.filter);
|
||||
this.setHash(this.config.terminology.hashNamespace || '', this.filter);
|
||||
if (this.$refs.dictionarytable) {
|
||||
this.$refs.dictionarytable.reset();
|
||||
this.$refs.dictionarytable.focus();
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="col-12 col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<T>nouns.terms.term</T>
|
||||
<T>terminology.term</T>
|
||||
</strong></label>
|
||||
<NounForm v-model="form.term" required maxlength="128"/>
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<div class="col-12 col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<T>nouns.terms.original</T>
|
||||
<T>terminology.original</T>
|
||||
</strong></label>
|
||||
<NounForm v-model="form.original" maxlength="1024"/>
|
||||
</div>
|
||||
|
@ -33,14 +33,14 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<T>nouns.terms.definition</T>
|
||||
<T>terminology.definition</T>
|
||||
</strong></label>
|
||||
<textarea v-model="form.definition" class="form-control form-control-sm" required rows="6"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><strong><T>nouns.terms.category</T>:</strong></label>
|
||||
<a v-for="category in config.nouns.terms.categories"
|
||||
<label><strong><T>terminology.category</T>:</strong></label>
|
||||
<a v-for="category in config.terminology.categories"
|
||||
href="#" :class="['badge border mx-1 text-decoration-none', form.categories.includes(category) ? 'bg-primary text-white' : 'bg-light text-primary']"
|
||||
@click.prevent="form.categories = form.categories.includes(category) ? form.categories.filter(c => c !== category) : [...form.categories, category]"
|
||||
>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<div class="col-12 col-lg-4">
|
||||
<div class="form-group">
|
||||
<label class="text-nowrap"><strong>
|
||||
<T>nouns.terms.images</T>
|
||||
<T>terminology.images</T>
|
||||
</strong></label>
|
||||
<ImageWidget v-model="form.images" multiple sizes="big,thumb"/>
|
||||
</div>
|
||||
|
|
|
@ -10,10 +10,12 @@ sources:
|
|||
|
||||
nouns:
|
||||
enabled: false
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: false
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: false
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -42,22 +42,24 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'sexuelle Orientierung'
|
||||
- 'romantische Orientierung'
|
||||
- 'tertiäre Orientierung'
|
||||
- 'Geschlecht'
|
||||
- 'Geschlechtsausdruck'
|
||||
- 'Beziehungsmodell'
|
||||
- 'Sprache'
|
||||
- 'Anziehung'
|
||||
- 'Politik'
|
||||
- 'Vorurteil'
|
||||
route: 'terminologie'
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'sexuelle Orientierung'
|
||||
- 'romantische Orientierung'
|
||||
- 'tertiäre Orientierung'
|
||||
- 'Geschlecht'
|
||||
- 'Geschlechtsausdruck'
|
||||
- 'Beziehungsmodell'
|
||||
- 'Sprache'
|
||||
- 'Anziehung'
|
||||
- 'Politik'
|
||||
- 'Vorurteil'
|
||||
route: 'terminologie'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -163,6 +163,8 @@ nouns:
|
|||
plural: 'Plural'
|
||||
pluralShort: 'Pl.'
|
||||
|
||||
image: 'Bild'
|
||||
|
||||
terms:
|
||||
header: 'Terminologie'
|
||||
headerLong: 'Wörterbuch von Queerer Terminologie'
|
||||
|
|
|
@ -71,23 +71,25 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'sexual orientation'
|
||||
- 'romantic orientation'
|
||||
- 'tertiary orientation'
|
||||
- 'gender'
|
||||
- 'gender expression'
|
||||
- 'relationship model'
|
||||
- 'language'
|
||||
- 'attraction'
|
||||
- 'politics'
|
||||
- 'prejudice'
|
||||
|
||||
route: 'terms'
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'sexual orientation'
|
||||
- 'romantic orientation'
|
||||
- 'tertiary orientation'
|
||||
- 'gender'
|
||||
- 'gender expression'
|
||||
- 'relationship model'
|
||||
- 'language'
|
||||
- 'attraction'
|
||||
- 'politics'
|
||||
- 'prejudice'
|
||||
|
||||
route: 'terms'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -207,17 +207,19 @@ nouns:
|
|||
plural: 'plural'
|
||||
pluralShort: 'pl.'
|
||||
|
||||
terms:
|
||||
header: 'Terminology'
|
||||
headerLong: 'Dictionary of queer terminology'
|
||||
info:
|
||||
- >
|
||||
A dictionary of terms related to the LGBTQ+ community.
|
||||
term: 'Term'
|
||||
original: 'Etymology'
|
||||
category: 'Category'
|
||||
images: 'Additional images, from outside the flag catalogue'
|
||||
definition: 'Definition'
|
||||
image: 'Picture'
|
||||
|
||||
terminology:
|
||||
header: 'Terminology'
|
||||
headerLong: 'Dictionary of queer terminology'
|
||||
info:
|
||||
- >
|
||||
A dictionary of terms related to the LGBTQ+ community.
|
||||
term: 'Term'
|
||||
original: 'Etymology'
|
||||
category: 'Category'
|
||||
images: 'Additional images, from outside the flag catalogue'
|
||||
definition: 'Definition'
|
||||
|
||||
faq:
|
||||
header: 'FAQ'
|
||||
|
|
|
@ -46,22 +46,24 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: false
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientación sexual'
|
||||
- 'orientación romántica'
|
||||
- 'orientacja terciaria'
|
||||
- 'género'
|
||||
- 'expresión de género'
|
||||
- 'modelo de relación'
|
||||
- 'lenguaje'
|
||||
- 'atracción'
|
||||
- 'política'
|
||||
- 'prejuicio'
|
||||
route: 'terminologia'
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientación sexual'
|
||||
- 'orientación romántica'
|
||||
- 'orientacja terciaria'
|
||||
- 'género'
|
||||
- 'expresión de género'
|
||||
- 'modelo de relación'
|
||||
- 'lenguaje'
|
||||
- 'atracción'
|
||||
- 'política'
|
||||
- 'prejuicio'
|
||||
route: 'terminologia'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -168,17 +168,19 @@ nouns:
|
|||
plural: 'plural'
|
||||
pluralShort: 'pl.'
|
||||
|
||||
terms:
|
||||
header: 'Terminología'
|
||||
headerLong: 'Diccionario de terminología queer'
|
||||
info:
|
||||
- >
|
||||
Un diccionario de terminología relacionada con la comunidad LGBTQ+.
|
||||
term: 'Término'
|
||||
original: 'Etimología'
|
||||
category: 'Categoría'
|
||||
images: 'Imágenes adicionales, de fuera del catálogo de banderas'
|
||||
definition: 'Definición'
|
||||
image: 'Imagen'
|
||||
|
||||
terminology:
|
||||
header: 'Terminología'
|
||||
headerLong: 'Diccionario de terminología queer'
|
||||
info:
|
||||
- >
|
||||
Un diccionario de terminología relacionada con la comunidad LGBTQ+.
|
||||
term: 'Término'
|
||||
original: 'Etimología'
|
||||
category: 'Categoría'
|
||||
images: 'Imágenes adicionales, de fuera del catálogo de banderas'
|
||||
definition: 'Definición'
|
||||
|
||||
faq:
|
||||
header: 'Preguntas'
|
||||
|
|
|
@ -50,22 +50,24 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientation sexuelle'
|
||||
- 'orientation romantique'
|
||||
- 'orientation tertiaire'
|
||||
- 'genre'
|
||||
- 'expression du genre'
|
||||
- 'modèle de relation'
|
||||
- 'langage'
|
||||
- 'attirance'
|
||||
- 'politique'
|
||||
- 'préjugé'
|
||||
route: 'terminologie'
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientation sexuelle'
|
||||
- 'orientation romantique'
|
||||
- 'orientation tertiaire'
|
||||
- 'genre'
|
||||
- 'expression du genre'
|
||||
- 'modèle de relation'
|
||||
- 'langage'
|
||||
- 'attirance'
|
||||
- 'politique'
|
||||
- 'préjugé'
|
||||
route: 'terminologie'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -167,17 +167,19 @@ nouns:
|
|||
plural: 'pluriel'
|
||||
pluralShort: 'pl.'
|
||||
|
||||
terms:
|
||||
header: 'Terminologie'
|
||||
headerLong: 'Dictionnaire des terminologies queer'
|
||||
info:
|
||||
- >
|
||||
Un dictionnaire des terminologies utilisées parmi la communauté LGBTQ+.
|
||||
term: 'Terminologie'
|
||||
original: 'Etymologie'
|
||||
category: 'Catégorie'
|
||||
images: 'Images supplémentaires'
|
||||
definition: 'Définition'
|
||||
image: 'Photo'
|
||||
|
||||
terminology:
|
||||
header: 'Terminologie'
|
||||
headerLong: 'Dictionnaire des terminologies queer'
|
||||
info:
|
||||
- >
|
||||
Un dictionnaire des terminologies utilisées parmi la communauté LGBTQ+.
|
||||
term: 'Terminologie'
|
||||
original: 'Etymologie'
|
||||
category: 'Catégorie'
|
||||
images: 'Images supplémentaires'
|
||||
definition: 'Définition'
|
||||
|
||||
faq:
|
||||
header: 'FAQ'
|
||||
|
|
|
@ -64,10 +64,12 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: false
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: false
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -167,6 +167,8 @@ nouns:
|
|||
plural: 'meervoud'
|
||||
pluralShort: 'meerv.'
|
||||
|
||||
image: 'Beeld'
|
||||
|
||||
faq:
|
||||
header: 'FAQ'
|
||||
headerLong: 'Veelgestelde vragen'
|
||||
|
@ -261,7 +263,7 @@ faq:
|
|||
Als je cis bent (=niet trans) en je gebruikt „{/he=he}” or „{/she=she}”, dan zou je kunnen
|
||||
denken dat jouw voornaamwoorden <em>vanzelfsprekend</em>. zijn.
|
||||
And misschien is dat wel zo - zolang als jouw naam op jouw profiel staat (en traditioneel als mannelijk of vrouwelijk wordt gezien)
|
||||
en jouw avatar is ingesteld op jouw foto.
|
||||
en jouw avatar is ingesteld op jouw foto.
|
||||
Voor velen is dat niet zo en is het daarom moeilijk om te raden hoe ze willen worden aangesproken.
|
||||
- >
|
||||
Maar het is vooral vanwege het volgende: jouw voornaamwoorden kunnen dan wel ''vanzelfsprekend'' zijn,
|
||||
|
@ -272,7 +274,7 @@ faq:
|
|||
- >
|
||||
Het is erg belangrijk voor trans, non-binaire and gender non-conforme personen om onze voornaamwoorden te delen.
|
||||
Tegelijkertijd maakt het ons ook kwetsbaar.
|
||||
Maar als cis personen dit ook doen, dan kan dat een wereld van verschil betekenen.
|
||||
Maar als cis personen dit ook doen, dan kan dat een wereld van verschil betekenen.
|
||||
Het maakt ons comfortabeler, veilig en maakt dat we ons welkom voelen.
|
||||
{https://avris.it/blog/why-everyone-should-have-pronouns-in-their-bio=(more reasons here).}
|
||||
change:
|
||||
|
@ -291,7 +293,7 @@ faq:
|
|||
|
||||
- >
|
||||
Voornaamwoorden ≠ gender
|
||||
Jouw gender zal niet radicaal veranderen puur omdat je een keertje in de war raakte omdat iemand jou ''hen'' noemde.
|
||||
Jouw gender zal niet radicaal veranderen puur omdat je een keertje in de war raakte omdat iemand jou ''hen'' noemde.
|
||||
Maak je geen zorgen. Experiment. Kijk wat het beste bij jou past.
|
||||
preferred-pronouns:
|
||||
question: 'Waarom moet ik niet ''geprefereerde voornaamwoorden'' zeggen?'
|
||||
|
|
|
@ -45,23 +45,25 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'seksuell legning'
|
||||
- 'romantisk legning'
|
||||
- 'tertiær legning'
|
||||
- 'kjønn'
|
||||
- 'kjønns uttrykk'
|
||||
- 'forholds modell'
|
||||
- 'språk'
|
||||
- 'attraksjon'
|
||||
- 'politikk'
|
||||
- 'fordom'
|
||||
|
||||
route: 'terminologi'
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'seksuell legning'
|
||||
- 'romantisk legning'
|
||||
- 'tertiær legning'
|
||||
- 'kjønn'
|
||||
- 'kjønns uttrykk'
|
||||
- 'forholds modell'
|
||||
- 'språk'
|
||||
- 'attraksjon'
|
||||
- 'politikk'
|
||||
- 'fordom'
|
||||
|
||||
route: 'terminologi'
|
||||
|
||||
|
||||
names:
|
||||
|
|
|
@ -169,17 +169,19 @@ nouns:
|
|||
plural: 'flertall.'
|
||||
pluralShort: 'fl.'
|
||||
|
||||
terms:
|
||||
header: 'Terminologi'
|
||||
headerLong: 'Ordbok av queer terminologi'
|
||||
info:
|
||||
- >
|
||||
En ordbok med begrep som relaterer til LHBTQ+ fellesskapet.
|
||||
term: 'Begrep'
|
||||
original: 'Etymologi'
|
||||
category: 'Kategori'
|
||||
images: 'Ekstra bilder, fra utsiden av flagg katalogen'
|
||||
definition: 'Definisjon'
|
||||
image: 'Bilde'
|
||||
|
||||
terminology:
|
||||
header: 'Terminologi'
|
||||
headerLong: 'Ordbok av queer terminologi'
|
||||
info:
|
||||
- >
|
||||
En ordbok med begrep som relaterer til LHBTQ+ fellesskapet.
|
||||
term: 'Begrep'
|
||||
original: 'Etymologi'
|
||||
category: 'Kategori'
|
||||
images: 'Ekstra bilder, fra utsiden av flagg katalogen'
|
||||
definition: 'Definisjon'
|
||||
|
||||
faq:
|
||||
header: 'Spørsmål'
|
||||
|
|
|
@ -74,6 +74,7 @@ sources:
|
|||
nouns:
|
||||
enabled: true
|
||||
route: 'slowniki'
|
||||
routeMain: 'neutratywy'
|
||||
collapsable: false
|
||||
plurals: true
|
||||
pluralsRequired: true
|
||||
|
@ -85,25 +86,27 @@ nouns:
|
|||
- 'dukatywy'
|
||||
- 'osobatywy'
|
||||
- 'iksatywy'
|
||||
inclusive:
|
||||
enabled: true
|
||||
categories: ['nieheteronormatywność', 'transpłciowość', 'interpłciowość', 'feminizm', 'niepełnosprawność', 'rasa i narodowość', 'ubóstwo', 'zdrowie psychiczne']
|
||||
route: 'inkluzywny'
|
||||
terms:
|
||||
enabled: true
|
||||
published: true
|
||||
categories:
|
||||
- 'orientacja seksualna'
|
||||
- 'orientacja romantyczna'
|
||||
- 'orientacja tertiarna'
|
||||
- 'płeć'
|
||||
- 'ekspresja płciowa'
|
||||
- 'model relacji'
|
||||
- 'język'
|
||||
- 'pociąg'
|
||||
- 'polityka'
|
||||
- 'uprzedzenia'
|
||||
route: 'terminologia'
|
||||
|
||||
inclusive:
|
||||
enabled: true
|
||||
categories: ['nieheteronormatywność', 'transpłciowość', 'interpłciowość', 'feminizm', 'niepełnosprawność', 'rasa i narodowość', 'ubóstwo', 'zdrowie psychiczne']
|
||||
route: 'inkluzywny'
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
published: true
|
||||
categories:
|
||||
- 'orientacja seksualna'
|
||||
- 'orientacja romantyczna'
|
||||
- 'orientacja tertiarna'
|
||||
- 'płeć'
|
||||
- 'ekspresja płciowa'
|
||||
- 'model relacji'
|
||||
- 'język'
|
||||
- 'pociąg'
|
||||
- 'polityka'
|
||||
- 'uprzedzenia'
|
||||
route: 'terminologia'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:to="buildRoute(route)"
|
||||
:class="['btn', isActiveRoute(route) ? 'btn-primary' : 'btn-outline-primary']">
|
||||
<Icon :v="icon"/>
|
||||
<T>nouns.{{name}}.header</T>
|
||||
<T>{{name}}</T>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="d-block d-md-none btn-group-vertical btn-block mb-2 w-100">
|
||||
|
@ -13,7 +13,7 @@
|
|||
:to="buildRoute(route)"
|
||||
:class="['btn', isActiveRoute(route) ? 'btn-primary' : 'btn-outline-primary']">
|
||||
<Icon :v="icon"/>
|
||||
<T>nouns.{{name}}.header</T>
|
||||
<T>{{name}}</T>
|
||||
</router-link>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -23,18 +23,18 @@
|
|||
export default {
|
||||
data() {
|
||||
const links = [
|
||||
{name: 'neuterNouns', icon: 'deer', route: 'neutratywy'},
|
||||
{name: 'dukajNouns', icon: 'ghost', route: 'dukatywy'},
|
||||
{name: 'personNouns', icon: 'user-friends', route: 'osobatywy'},
|
||||
{name: 'xNouns', icon: 'comment-times', route: 'iksatywy'},
|
||||
{name: 'nouns.neuterNouns.header', icon: 'deer', route: 'neutratywy'},
|
||||
{name: 'nouns.dukajNouns.header', icon: 'ghost', route: 'dukatywy'},
|
||||
{name: 'nouns.personNouns.header', icon: 'user-friends', route: 'osobatywy'},
|
||||
{name: 'nouns.xNouns.header', icon: 'comment-times', route: 'iksatywy'},
|
||||
];
|
||||
|
||||
if (this.config.nouns.inclusive.enabled) {
|
||||
links.push({name: 'inclusive', icon: 'book-heart', route: this.config.nouns.inclusive.route});
|
||||
if (this.config.inclusive.enabled) {
|
||||
links.push({name: 'inclusive.header', icon: 'book-heart', route: this.config.inclusive.route});
|
||||
}
|
||||
|
||||
if (this.config.nouns.terms.enabled) {
|
||||
links.push({name: 'terms', icon: 'flag', route: this.config.nouns.terms.route});
|
||||
if (this.config.terminology.enabled) {
|
||||
links.push({name: 'terminology.header', icon: 'flag', route: this.config.terminology.route});
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -371,38 +371,40 @@ nouns:
|
|||
plural: 'liczba mnoga'
|
||||
pluralShort: 'l. mn.'
|
||||
|
||||
inclusive:
|
||||
header: 'Inkluzywność'
|
||||
headerLong: 'Słownik inkluzywnego języka'
|
||||
insteadOf: 'Zamiast'
|
||||
say: 'Lepiej mów'
|
||||
because: 'Ponieważ'
|
||||
info:
|
||||
- >
|
||||
Język jest nośnikiem myśli, nośnikiem kultury, podstawą komunikacji. Wpływa na to, co robimy i jak myślimy.
|
||||
Jeśli chcemy tworzyć społeczeństwo otwarte na różnorodność i akceptujące odmienność,
|
||||
to nasz język też musi być włączający.
|
||||
- >
|
||||
Inkluzywny język to nie tylko rzeczowniki i nie tylko kwestie płciowości.
|
||||
Poniżej przedstawiamy słownik, w którym zbieramy sugestie,
|
||||
jakich konstrukcji lepiej unikać i dlatego, oraz czym je zastępować.
|
||||
categories: 'Kategorie'
|
||||
sources: 'Linki źródłowe'
|
||||
image: 'Obrazek'
|
||||
|
||||
terms:
|
||||
header: 'Terminologia'
|
||||
headerLong: 'Słownik terminologii queerowej'
|
||||
info:
|
||||
- >
|
||||
Większość zwrotów i wyrażeń związanych ze społecznością LGBTQ+
|
||||
funkcjonuje w polszczyźnie jako anglojęzyczne wstawki.
|
||||
Poniżej przedstawiamy słownik tłumaczący, co dane określenia oznaczają,
|
||||
i jakie proponujemy dla nich polskie tłumaczenia.
|
||||
term: 'Określenie'
|
||||
original: 'Pochodzenie, określenie angielskie'
|
||||
category: 'Kategoria'
|
||||
images: 'Dodatkowe obrazki, spoza katalogu flag'
|
||||
definition: 'Definicja'
|
||||
inclusive:
|
||||
header: 'Inkluzywność'
|
||||
headerLong: 'Słownik inkluzywnego języka'
|
||||
insteadOf: 'Zamiast'
|
||||
say: 'Lepiej mów'
|
||||
because: 'Ponieważ'
|
||||
info:
|
||||
- >
|
||||
Język jest nośnikiem myśli, nośnikiem kultury, podstawą komunikacji. Wpływa na to, co robimy i jak myślimy.
|
||||
Jeśli chcemy tworzyć społeczeństwo otwarte na różnorodność i akceptujące odmienność,
|
||||
to nasz język też musi być włączający.
|
||||
- >
|
||||
Inkluzywny język to nie tylko rzeczowniki i nie tylko kwestie płciowości.
|
||||
Poniżej przedstawiamy słownik, w którym zbieramy sugestie,
|
||||
jakich konstrukcji lepiej unikać i dlatego, oraz czym je zastępować.
|
||||
categories: 'Kategorie'
|
||||
sources: 'Linki źródłowe'
|
||||
|
||||
terminology:
|
||||
header: 'Terminologia'
|
||||
headerLong: 'Słownik terminologii queerowej'
|
||||
info:
|
||||
- >
|
||||
Większość zwrotów i wyrażeń związanych ze społecznością LGBTQ+
|
||||
funkcjonuje w polszczyźnie jako anglojęzyczne wstawki.
|
||||
Poniżej przedstawiamy słownik tłumaczący, co dane określenia oznaczają,
|
||||
i jakie proponujemy dla nich polskie tłumaczenia.
|
||||
term: 'Określenie'
|
||||
original: 'Pochodzenie, określenie angielskie'
|
||||
category: 'Kategoria'
|
||||
images: 'Dodatkowe obrazki, spoza katalogu flag'
|
||||
definition: 'Definicja'
|
||||
|
||||
names:
|
||||
header: 'Imiona'
|
||||
|
|
|
@ -47,22 +47,24 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: false
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientação sexual'
|
||||
- 'orientação romântica'
|
||||
- 'orientação terciária'
|
||||
- 'gênero'
|
||||
- 'expressão de gênero'
|
||||
- 'modelo de relação'
|
||||
- 'linguagem'
|
||||
- 'atração'
|
||||
- 'política'
|
||||
- 'preconceito'
|
||||
route: 'terminologia'
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientação sexual'
|
||||
- 'orientação romântica'
|
||||
- 'orientação terciária'
|
||||
- 'gênero'
|
||||
- 'expressão de gênero'
|
||||
- 'modelo de relação'
|
||||
- 'linguagem'
|
||||
- 'atração'
|
||||
- 'política'
|
||||
- 'preconceito'
|
||||
route: 'terminologia'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -166,17 +166,19 @@ nouns:
|
|||
plural: 'plural'
|
||||
pluralShort: 'pl.'
|
||||
|
||||
terms:
|
||||
header: 'Terminologia'
|
||||
headerLong: 'Dicionário de terminologia queer'
|
||||
info:
|
||||
- >
|
||||
Um dicionário de terminologia relacionada à comunidade LGBTQ+.
|
||||
term: 'Termo'
|
||||
original: 'Etimologia'
|
||||
category: 'Categoria'
|
||||
images: 'Imagens adicionais, de fora do catálogo de bandeiras'
|
||||
definition: 'Definição'
|
||||
image: 'Imagem'
|
||||
|
||||
terminology:
|
||||
header: 'Terminologia'
|
||||
headerLong: 'Dicionário de terminologia queer'
|
||||
info:
|
||||
- >
|
||||
Um dicionário de terminologia relacionada à comunidade LGBTQ+.
|
||||
term: 'Termo'
|
||||
original: 'Etimologia'
|
||||
category: 'Categoria'
|
||||
images: 'Imagens adicionais, de fora do catálogo de bandeiras'
|
||||
definition: 'Definição'
|
||||
|
||||
faq:
|
||||
header: 'Perguntas'
|
||||
|
|
|
@ -50,21 +50,23 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientacja seksualna'
|
||||
- 'orientacja romantyczna'
|
||||
- 'orientacja tertiarna'
|
||||
- 'określenie orientacji romantycznej i seksualnej'
|
||||
- 'płeć'
|
||||
- 'ekspresja płciowa'
|
||||
- 'model relacji'
|
||||
- 'język'
|
||||
- 'pociąg'
|
||||
route: 'terminology'
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: true
|
||||
categories:
|
||||
- 'orientacja seksualna'
|
||||
- 'orientacja romantyczna'
|
||||
- 'orientacja tertiarna'
|
||||
- 'określenie orientacji romantycznej i seksualnej'
|
||||
- 'płeć'
|
||||
- 'ekspresja płciowa'
|
||||
- 'model relacji'
|
||||
- 'język'
|
||||
- 'pociąg'
|
||||
route: 'terminology'
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
{name: 'nouns', icon: 'book', route: ''},
|
||||
];
|
||||
|
||||
if (this.config.nouns.inclusive.enabled) {
|
||||
links.push({name: 'inclusive', icon: 'book-heart', route: this.config.nouns.inclusive.route});
|
||||
if (this.config.inclusive.enabled) {
|
||||
links.push({name: 'inclusive', icon: 'book-heart', route: this.config.inclusive.route});
|
||||
}
|
||||
|
||||
if (this.config.nouns.terms.enabled) {
|
||||
links.push({name: 'terms', icon: 'flag', route: this.config.nouns.terms.route});
|
||||
if (this.config.terminology.enabled) {
|
||||
links.push({name: 'terms', icon: 'flag', route: this.config.terminology.route});
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -171,20 +171,22 @@ nouns:
|
|||
nouns:
|
||||
header: 'נײטראַלע סובסטאַנטיװן'
|
||||
|
||||
terms:
|
||||
header: 'טערמינאָלאָגיע'
|
||||
headerLong: 'Słownik terminologii queerowej'
|
||||
info:
|
||||
- >
|
||||
Większość zwrotów i wyrażeń związanych ze społecznością LGBTQ+
|
||||
funkcjonuje w polszczyźnie jako anglojęzyczne wstawki.
|
||||
Poniżej przedstawiamy słownik tłumaczący, co dane określenia oznaczają,
|
||||
i jakie proponujemy dla nich polskie tłumaczenia.
|
||||
term: 'Określenie'
|
||||
original: 'Pochodzenie, określenie angielskie'
|
||||
category: 'Kategoria'
|
||||
images: 'Dodatkowe obrazki, spoza katalogu flag'
|
||||
definition: 'Definicja'
|
||||
image: 'Image'
|
||||
|
||||
terminology:
|
||||
header: 'טערמינאָלאָגיע'
|
||||
headerLong: 'Słownik terminologii queerowej'
|
||||
info:
|
||||
- >
|
||||
Większość zwrotów i wyrażeń związanych ze społecznością LGBTQ+
|
||||
funkcjonuje w polszczyźnie jako anglojęzyczne wstawki.
|
||||
Poniżej przedstawiamy słownik tłumaczący, co dane określenia oznaczają,
|
||||
i jakie proponujemy dla nich polskie tłumaczenia.
|
||||
term: 'Określenie'
|
||||
original: 'Pochodzenie, określenie angielskie'
|
||||
category: 'Kategoria'
|
||||
images: 'Dodatkowe obrazki, spoza katalogu flag'
|
||||
definition: 'Definicja'
|
||||
|
||||
faq:
|
||||
header: 'פֿראַגעס'
|
||||
|
|
|
@ -49,10 +49,12 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: false
|
||||
|
||||
inclusive:
|
||||
enabled: false
|
||||
|
||||
terminology:
|
||||
enabled: false
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -153,6 +153,8 @@ nouns:
|
|||
plural: '複數'
|
||||
pluralShort: '複數'
|
||||
|
||||
image: 'Image' # TODO
|
||||
|
||||
faq:
|
||||
header: 'FAQ'
|
||||
headerLong: 'Frequently asked questions'
|
||||
|
|
|
@ -190,11 +190,11 @@ export default {
|
|||
for (let subroute of config.nouns.subroutes || []) {
|
||||
routes.push({ path: `/${config.nouns.route}/${subroute}`, component: resolve(__dirname, `data/nouns/${subroute}.vue`) });
|
||||
}
|
||||
if (config.nouns.inclusive.enabled) {
|
||||
routes.push({path: `/${config.nouns.route}/${config.nouns.inclusive.route}`, component: resolve(__dirname, 'routes/inclusive.vue')});
|
||||
if (config.inclusive.enabled) {
|
||||
routes.push({path: `/${config.nouns.route}/${config.inclusive.route}`, component: resolve(__dirname, 'routes/inclusive.vue')});
|
||||
}
|
||||
if (config.nouns.terms.enabled) {
|
||||
routes.push({path: `/${config.nouns.route}/${config.nouns.terms.route}`, component: resolve(__dirname, 'routes/queerTerms.vue')});
|
||||
if (config.terminology.enabled) {
|
||||
routes.push({path: `/${config.nouns.route}/${config.terminology.route}`, component: resolve(__dirname, 'routes/terminology.vue')});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,16 +68,16 @@
|
|||
nouns_search: ['GET', '/api/nouns/search/{term}'],
|
||||
},
|
||||
}, {
|
||||
enabled: this.config.nouns.inclusive.enabled,
|
||||
header: 'nouns.inclusive.header',
|
||||
enabled: this.config.inclusive.enabled,
|
||||
header: 'inclusive.header',
|
||||
icon: 'book-heart',
|
||||
endpoints: {
|
||||
inclusive_all: ['GET', '/api/inclusive'],
|
||||
inclusive_search: ['GET', '/api/inclusive/search/{term}'],
|
||||
},
|
||||
}, {
|
||||
enabled: this.config.nouns.terms.enabled,
|
||||
header: 'nouns.terms.header',
|
||||
enabled: this.config.terminology.enabled,
|
||||
header: 'terminology.header',
|
||||
icon: 'flag',
|
||||
endpoints: {
|
||||
terms_all: ['GET', '/api/terms'],
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
<h2>
|
||||
<Icon v="book-heart"/>
|
||||
<T>nouns.inclusive.headerLong</T>
|
||||
<T>inclusive.headerLong</T>
|
||||
</h2>
|
||||
|
||||
<section>
|
||||
<T>nouns.inclusive.info</T>
|
||||
<Share :title="$t('nouns.inclusive.headerLong')"/>
|
||||
<T>inclusive.info</T>
|
||||
<Share :title="$t('inclusive.headerLong')"/>
|
||||
</section>
|
||||
|
||||
<InclusiveDictionary load ref="inclusivedictionary"/>
|
||||
|
@ -25,14 +25,14 @@
|
|||
components: { NounsNav },
|
||||
mixins: [ hash ],
|
||||
mounted() {
|
||||
this.handleHash(this.config.nouns.inclusive.hashNamespace || '', filter => {
|
||||
this.handleHash(this.config.inclusive.hashNamespace || '', filter => {
|
||||
this.$refs.inclusivedictionary.setFilter(filter);
|
||||
});
|
||||
},
|
||||
head() {
|
||||
return head({
|
||||
title: this.$t('nouns.inclusive.headerLong'),
|
||||
description: this.$t('nouns.inclusive.info')[0],
|
||||
title: this.$t('inclusive.headerLong'),
|
||||
description: this.$t('inclusive.info')[0],
|
||||
});
|
||||
},
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
};
|
||||
},
|
||||
async mounted() {
|
||||
if (this.config.nouns.terms.enabled) {
|
||||
if (this.config.terminology.enabled) {
|
||||
this.terms = await this.$axios.$get(`/terms`);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
<h2>
|
||||
<Icon v="flag"/>
|
||||
<T>nouns.terms.headerLong</T>
|
||||
<T>terminology.headerLong</T>
|
||||
</h2>
|
||||
|
||||
<section>
|
||||
<T>nouns.terms.info</T>
|
||||
<Share :title="$t('nouns.terms.headerLong')"/>
|
||||
<T>terminology.info</T>
|
||||
<Share :title="$t('terminology.headerLong')"/>
|
||||
</section>
|
||||
|
||||
<TermsDictionary load ref="termsdictionary"/>
|
||||
|
@ -26,14 +26,14 @@
|
|||
|
||||
mixins: [ hash ],
|
||||
mounted() {
|
||||
this.handleHash(this.config.nouns.terms.hashNamespace || '', filter => {
|
||||
this.handleHash(this.config.terminology.hashNamespace || '', filter => {
|
||||
this.$refs.termsdictionary.setFilter(filter);
|
||||
});
|
||||
},
|
||||
head() {
|
||||
return head({
|
||||
title: this.$t('nouns.terms.headerLong'),
|
||||
description: this.$t('nouns.terms.info')[0],
|
||||
title: this.$t('terminology.headerLong'),
|
||||
description: this.$t('terminology.info')[0],
|
||||
});
|
||||
},
|
||||
}
|
|
@ -6,8 +6,10 @@ import cookieParser from 'cookie-parser';
|
|||
import grant from "grant";
|
||||
import router from "./routes/user";
|
||||
import { loadSuml } from './loader';
|
||||
import {isGranted} from "../src/helpers";
|
||||
import {handleErrorAsync, isGranted} from "../src/helpers";
|
||||
import cookieSettings from "../src/cookieSettings";
|
||||
import SQL from "sql-template-strings";
|
||||
import {createCanvas, loadImage, registerFont} from "canvas";
|
||||
|
||||
global.config = loadSuml('config');
|
||||
|
||||
|
|
|
@ -166,45 +166,33 @@ router.post('/nouns/remove/:id', handleErrorAsync(async (req, res) => {
|
|||
return res.json('ok');
|
||||
}));
|
||||
|
||||
const findBaseForm = (noun, query) => {
|
||||
for (let form of ['masc', 'fem', 'neutr', 'mascPl', 'femPl', 'neutrPl']) {
|
||||
for (let formPart of noun[form].split('|')) {
|
||||
if (formPart.toLowerCase() === query.toLowerCase()) {
|
||||
return formPart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
router.get('/nouns/:word.png', handleErrorAsync(async (req, res) => {
|
||||
const query = req.params.word.toLowerCase();
|
||||
const term = '%' + query + '%';
|
||||
const noun = (await req.db.all(SQL`
|
||||
router.get('/nouns/:id.png', async (req, res) => {
|
||||
const noun = (await req.db.get(SQL`
|
||||
SELECT * FROM nouns
|
||||
WHERE locale = ${global.config.locale}
|
||||
AND id = ${req.params.id}
|
||||
AND approved >= ${req.isGranted('nouns') ? 0 : 1}
|
||||
AND (masc like ${term} OR fem like ${term} OR neutr like ${term} OR mascPl like ${term} OR femPl like ${term} OR neutrPl like ${term})
|
||||
ORDER BY masc
|
||||
`)).filter(noun =>
|
||||
noun.masc.toLowerCase().split('|').includes(query)
|
||||
|| noun.fem.toLowerCase().split('|').includes(query)
|
||||
|| noun.neutr.toLowerCase().split('|').includes(query)
|
||||
|| noun.mascPl.toLowerCase().split('|').includes(query)
|
||||
|| noun.femPl.toLowerCase().split('|').includes(query)
|
||||
|| noun.neutrPl.toLowerCase().split('|').includes(query)
|
||||
)[0]
|
||||
AND deleted = 0
|
||||
`));
|
||||
|
||||
if (!noun) {
|
||||
return res.status(404).json({error: 'Not found'});
|
||||
}
|
||||
|
||||
const base = findBaseForm(noun, query);
|
||||
let maxItems = 0;
|
||||
['masc', 'fem', 'neutr'].forEach((form, column) => {
|
||||
let items = 0;
|
||||
for (let [key, symbol] of [['', '⋅'], ['Pl', '⁖']]) {
|
||||
items += noun[form + key].split('|').filter(x => x.length).length;
|
||||
}
|
||||
if (items > maxItems) {
|
||||
maxItems = items;
|
||||
}
|
||||
});
|
||||
|
||||
const width = 1200;
|
||||
const height = 600;
|
||||
const padding = 48;
|
||||
const width = 1200;
|
||||
const height = padding * 2.5 + (maxItems + 1) * 48 + padding;
|
||||
const mime = 'image/png';
|
||||
|
||||
registerFont('static/fonts/quicksand-v21-latin-ext_latin-regular.ttf', { family: 'Quicksand', weight: 'regular'});
|
||||
|
@ -218,33 +206,36 @@ router.get('/nouns/:word.png', handleErrorAsync(async (req, res) => {
|
|||
context.drawImage(bg, 0, 0, width, height);
|
||||
|
||||
context.font = 'bold 64pt Quicksand';
|
||||
context.fillText(base, width / 2 - context.measureText(base).width / 2, 120);
|
||||
|
||||
for (let [column, key, icon] of [[0, 'masculine', '\uf222'], [1, 'feminine', '\uf221'], [2, 'neuter', '\uf22c']]) {
|
||||
context.font = 'regular 24pt FontAwesome';
|
||||
context.fillText(icon, column * (width - 2 * padding) / 3 + padding, 192);
|
||||
context.fillText(icon, column * (width - 2 * padding) / 3 + padding, padding * 1.5);
|
||||
|
||||
context.font = 'bold 24pt Quicksand';
|
||||
context.fillText(translations.nouns[key], column * (width - 2 * padding) / 3 + padding + 36, 192);
|
||||
context.fillText(translations.nouns[key], column * (width - 2 * padding) / 3 + padding + 36, padding * 1.5);
|
||||
}
|
||||
|
||||
context.font = 'regular 24pt Quicksand';
|
||||
['masc', 'fem', 'neutr'].forEach((form, column) => {
|
||||
let i = 0;
|
||||
for (let [key, symbol] of [['', '⋅'], ['Pl', '⁖']])
|
||||
noun[form + key].split('|').filter(x => x.length).forEach(part => {
|
||||
context.fillText(symbol + ' ' + part, column * (width - 2 * padding) / 3 + padding, 244 + i * 48);
|
||||
i++;
|
||||
});
|
||||
noun[form + key].split('|').filter(x => x.length).forEach(part => {
|
||||
context.fillText(symbol + ' ' + part, column * (width - 2 * padding) / 3 + padding, padding * 2.5 + i * 48);
|
||||
i++;
|
||||
});
|
||||
})
|
||||
|
||||
context.fillStyle = '#C71585';
|
||||
context.font = 'regular 24pt FontAwesome';
|
||||
context.fillText('\uf02c', padding, height - padding);
|
||||
context.font = `regular 24pt Quicksand`;
|
||||
context.fillText(translations.title, padding + 48, height - padding - 4);
|
||||
context.font = 'regular 16pt FontAwesome';
|
||||
context.fillText('\uf02c', padding, height - padding + 12);
|
||||
context.font = `regular 16pt Quicksand`;
|
||||
context.fillText(
|
||||
translations.title + '/' + (global.config.nouns.routeMain || global.config.nouns.route),
|
||||
padding + 36,
|
||||
height - padding + 8
|
||||
);
|
||||
|
||||
return res.set('content-type', mime).send(canvas.toBuffer(mime));
|
||||
}));
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
|
|
@ -7,7 +7,7 @@ class Jwt {
|
|||
this.publicKey = fs.readFileSync(publicKey);
|
||||
}
|
||||
|
||||
sign(payload, expiresIn = '30d') {
|
||||
sign(payload, expiresIn = '365d') {
|
||||
return jwt.sign(payload, this.privateKey, {
|
||||
expiresIn,
|
||||
algorithm: 'RS256',
|
||||
|
|
Reference in New Issue