From ba45c8d70386676f26de1cc08d8d61590b18d051 Mon Sep 17 00:00:00 2001 From: Pierre-Jean CHANCELLIER <paidge_cs@hotmail.com> Date: Thu, 3 Feb 2022 10:39:08 +0100 Subject: [PATCH] v0.20 --- assets/css/_bootstrap.scss | 2 +- assets/css/style.scss | 17 ++++-- components/badge/Date.vue | 2 +- components/btn/Clipboard.vue | 4 +- components/btn/Sort.vue | 3 +- components/certif/List.vue | 34 ++++++------ components/member/List.vue | 14 ++--- components/navigation/menu/Sidebar.vue | 2 +- i18n/locales/de.json | 2 +- i18n/locales/en.json | 2 +- i18n/locales/es.json | 2 +- i18n/locales/fr.json | 2 +- pages/a-propos.vue | 75 +++++++++++++------------- pages/favoris.vue | 6 +-- pages/lexique.vue | 8 +-- pages/parametres.vue | 10 ++-- pages/previsions/index.vue | 6 ++- 17 files changed, 102 insertions(+), 89 deletions(-) diff --git a/assets/css/_bootstrap.scss b/assets/css/_bootstrap.scss index e89fec6..7c18f40 100644 --- a/assets/css/_bootstrap.scss +++ b/assets/css/_bootstrap.scss @@ -21,7 +21,7 @@ @import "~bootstrap/scss/breadcrumb"; // @import "~bootstrap/scss/pagination"; @import "~bootstrap/scss/badge"; -@import "~bootstrap/scss/jumbotron"; +// @import "~bootstrap/scss/jumbotron"; @import "~bootstrap/scss/alert"; // @import "~bootstrap/scss/progress"; // @import "~bootstrap/scss/media"; diff --git a/assets/css/style.scss b/assets/css/style.scss index 81bc940..896d150 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -10,7 +10,8 @@ $small-font-size: 70%; $body-bg: var(--background-color-primary); $body-color: var(--text-primary-color); -// Tables +// Tables; +$table-border-color: var(--background-color-primary); $table-cell-padding: 0.5rem; $table-bg: var(--background-color-primary); $table-color: var(--text-primary-color); @@ -41,9 +42,6 @@ $close-font-weight: 500; $mark-padding: 0.2em 0; $mark-bg: yellow; -// Jumbotron -$jumbotron-bg: var(--background-color-secondary); - // Colors $info: #0a8299; @@ -55,6 +53,17 @@ $info: #0a8299; } .table { + &.sortable thead { + tr { + border-left: 1px solid var(--text-primary-color); + } + + th { + border-right: 1px solid; + border-top: 1px solid; + border-bottom: 1px solid; + } + } tbody tr > * { vertical-align: middle; } diff --git a/components/badge/Date.vue b/components/badge/Date.vue index 6c29157..39e7d79 100644 --- a/components/badge/Date.vue +++ b/components/badge/Date.vue @@ -1,6 +1,6 @@ <template> <span class="badge" :class="'badge-' + $options.filters.dateStatus(date)"> - {{ date == 0 ? "N/A" : $d(new Date(date * 1000), styleDate) }} + {{ !date ? "N/A" : $d(new Date(date * 1000), styleDate) }} </span> </template> diff --git a/components/btn/Clipboard.vue b/components/btn/Clipboard.vue index 005368a..194b9db 100644 --- a/components/btn/Clipboard.vue +++ b/components/btn/Clipboard.vue @@ -1,9 +1,9 @@ <template> - <div class="clipboard input-group input-group-sm mb-3 mx-auto"> + <div class="clipboard input-group mb-3 mx-auto"> <div class="input-group-prepend"> <button id="btncopy" - class="btn btn-secondary px-4 py-1" + class="btn btn-info px-4 py-1" type="button" @click="copyText"> <outline-clipboard-copy-icon class="icon" /> diff --git a/components/btn/Sort.vue b/components/btn/Sort.vue index e8c2c72..5453911 100644 --- a/components/btn/Sort.vue +++ b/components/btn/Sort.vue @@ -46,7 +46,8 @@ export default { background: var(--info); color: white; - &:focus { + &:focus, + &:hover { background: #086375; } } diff --git a/components/certif/List.vue b/components/certif/List.vue index 7e72710..d92673f 100644 --- a/components/certif/List.vue +++ b/components/certif/List.vue @@ -6,23 +6,25 @@ v-model="search" class="form-control w-75 mx-auto my-2" :placeholder="$t('recherche.title')" /> - <table class="table table-striped table-hover"> + <table class="table table-striped table-hover sortable"> <thead class="thead-light"> - <th class="p-0" @click="sort('uid')"> - <BtnSort - :title="$t('membres')" - fieldName="uid" - :currentSort="currentSort" - :currentSortDir="currentSortDir" /> - </th> - <th class="p-0" @click="sort('expires_on')"> - <BtnSort - class="justify-content-end" - :title="$t('expire')" - fieldName="expires_on" - :currentSort="currentSort" - :currentSortDir="currentSortDir" /> - </th> + <tr> + <th class="p-0" @click="sort('uid')"> + <BtnSort + :title="$t('membres')" + fieldName="uid" + :currentSort="currentSort" + :currentSortDir="currentSortDir" /> + </th> + <th class="p-0" @click="sort('expires_on')"> + <BtnSort + class="justify-content-end" + :title="$t('expire')" + fieldName="expires_on" + :currentSort="currentSort" + :currentSortDir="currentSortDir" /> + </th> + </tr> </thead> <tbody> <tr diff --git a/components/member/List.vue b/components/member/List.vue index 1548c0a..b91ac86 100644 --- a/components/member/List.vue +++ b/components/member/List.vue @@ -1,10 +1,10 @@ <template> <div class="table-responsive pb-3"> - <table class="table table-striped table-hover text-center"> + <table class="table table-striped table-hover sortable text-center"> <thead class="thead-light"> - <tr class="border-left"> + <tr> <th - class="p-0 border-right" + class="p-0" scope="col" @click="sort('uid')" @keyup.enter="sort('uid')" @@ -17,7 +17,7 @@ </th> <th scope="col" - class="d-none d-md-table-cell p-0 border-right" + class="d-none d-md-table-cell p-0" @click="sort('pubkey')" v-if="['search', 'favoris'].includes(type)"> <BtnSort @@ -28,7 +28,7 @@ </th> <th scope="col" - class="d-none d-sm-table-cell p-0 border-right" + class="d-none d-sm-table-cell p-0" @click="sort('date_membership')" v-if="['adhesion', 'favoris', 'search'].includes(type)"> <BtnSort @@ -43,7 +43,7 @@ </th> <th scope="col" - class="d-none p-0 border-right" + class="d-none p-0" :class="{ 'd-sm-table-cell': type == 'certif', 'd-md-table-cell': type != 'certif' @@ -60,7 +60,7 @@ :currentSort="currentSort" :currentSortDir="currentSortDir" /> </th> - <th class="border-right" v-if="type == 'favoris'"></th> + <th v-if="type == 'favoris'"></th> </tr> </thead> <tbody> diff --git a/components/navigation/menu/Sidebar.vue b/components/navigation/menu/Sidebar.vue index e33c4fd..354445e 100644 --- a/components/navigation/menu/Sidebar.vue +++ b/components/navigation/menu/Sidebar.vue @@ -5,7 +5,7 @@ <img :src="$icon(512)" alt="Accueil" class="logo" /> <div> <h1 class="h3"> - Wotwizard <small><span class="small">v0.19</span></small> + Wotwizard <small><span class="small">v0.20</span></small> </h1> <small class="text-muted">{{ $t("slogan") }}</small> </div> diff --git a/i18n/locales/de.json b/i18n/locales/de.json index 7c22e28..47e3fc3 100644 --- a/i18n/locales/de.json +++ b/i18n/locales/de.json @@ -87,7 +87,7 @@ "infos": "Informationen", "inout": "Bei- und Austritte des Vertrauensnetz in den 2 letzten Tagen", "inpreparation": "In Vorbereitung", - "jours": "Nächsten 24 Stunden | Nächsten {n} Tage", + "jours": "24 Stunden | {n} Tage", "lexique": "Lexicon", "membre": { "calculant": { diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 04027e9..1a2e23f 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -88,7 +88,7 @@ "infos": "Informations", "inout": "Entries and exits of the web of trust for the last 2 days", "inpreparation": "In preparation", - "jours": "Next 24h | Next {n} days", + "jours": "24h | {n} days", "lexique": "Lexicon", "membre": { "calculant": { diff --git a/i18n/locales/es.json b/i18n/locales/es.json index e90de07..6dd446b 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -88,7 +88,7 @@ "infos": "Informaciones", "inout": "Entradas y salidas de la red de confianza en los últimos 2 dÃas", "inpreparation": "En preparación", - "jours": "Próximas 24 horas | Próximos {n} dÃas", + "jours": "24 horas | {n} dÃas", "lexique": "Léxico", "membre": { "calculant": { diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index 50e45f5..1e0f724 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -88,7 +88,7 @@ "infos": "Informations", "inout": "Entrées et sorties de la toile de confiance des 2 derniers jours", "inpreparation": "En préparation", - "jours": "Prochaines 24h | {n} prochains jours", + "jours": "24h | {n} jours", "lexique": "Lexique", "membre": { "calculant": { diff --git a/pages/a-propos.vue b/pages/a-propos.vue index 7d104f0..8cbe31e 100644 --- a/pages/a-propos.vue +++ b/pages/a-propos.vue @@ -1,48 +1,45 @@ <template> <main class="container"> - <div class="jumbotron"> - <h2 class="display-5">{{ $t("apropos.bienvenue") }}</h2> - <p class="lead"> - {{ $t("apropos.desc") }} - </p> - <BtnClipboard - textContent="78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8" /> - <hr class="my-4" /> - <h3 class="h4 mb-4">{{ $t("apropos.participants") }}</h3> - <div class="row"> - <div - class="col-sm-6 col-md-4 col-lg-3" - v-for="cat in liste_contrib" - :key="cat.title"> - <h4 class="h5" v-if="cat.title != 'testeurs'"> - {{ $t("apropos." + cat.title) }} - </h4> - <div class="list-group mb-4" v-if="cat.title != 'testeurs'"> - <NuxtLink - v-for="contrib in cat.contrib" - :key="contrib" - class="list-group-item list-group-item-action" - :to="chemin(contrib)"> - {{ contrib }} - </NuxtLink> - </div> + <h2 class="display-5 my-5">{{ $t("apropos.bienvenue") }}</h2> + <p class="lead"> + {{ $t("apropos.desc") }} + </p> + <BtnClipboard textContent="78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8" /> + <hr class="my-4" /> + <h3 class="h4 mb-4">{{ $t("apropos.participants") }}</h3> + <div class="row"> + <div + class="col-sm-6 col-md-4 col-lg-3" + v-for="cat in liste_contrib" + :key="cat.title"> + <h4 class="h5" v-if="cat.title != 'testeurs'"> + {{ $t("apropos." + cat.title) }} + </h4> + <div class="list-group mb-4" v-if="cat.title != 'testeurs'"> + <NuxtLink + v-for="contrib in cat.contrib" + :key="contrib" + class="list-group-item list-group-item-action" + :to="chemin(contrib)"> + {{ contrib }} + </NuxtLink> </div> </div> - <div class="row testeurs mb-4"> - <div class="col-12"> - <h4 class="h5"> - {{ $t("apropos." + liste_contrib[4].title) }} - </h4> - </div> - <div - class="col list-group-item d-flex align-items-center" - v-for="testeur in liste_contrib[4].contrib" - :key="testeur"> - {{ testeur }} - </div> + </div> + <div class="row testeurs mb-4"> + <div class="col-12"> + <h4 class="h5"> + {{ $t("apropos." + liste_contrib[4].title) }} + </h4> + </div> + <div + class="col list-group-item d-flex align-items-center" + v-for="testeur in liste_contrib[4].contrib" + :key="testeur"> + {{ testeur }} </div> - <p v-html="$t('apropos.contribuer')"></p> </div> + <p v-html="$t('apropos.contribuer')"></p> </main> </template> diff --git a/pages/favoris.vue b/pages/favoris.vue index 7999653..a1781c1 100644 --- a/pages/favoris.vue +++ b/pages/favoris.vue @@ -14,11 +14,9 @@ v-if=" !$apollo.queries.favoris.loading && favoris && favoris.length != 0 "> - <input - type="text" + <BtnSearch v-model="search" - class="form-control col-sm-6 col-md-5 col-lg-4 col-xl-3 mx-auto mb-3" - :placeholder="$t('recherche.title')" /> + class="col-sm-7 col-md-6 col-lg-5 col-xl-4 mx-auto" /> <MemberList defaultSort="date_membership" :members="filteredFavoris" diff --git a/pages/lexique.vue b/pages/lexique.vue index 6ffd212..1446e2f 100644 --- a/pages/lexique.vue +++ b/pages/lexique.vue @@ -8,9 +8,11 @@ </div> <div class="table-responsive"> <table class="table table-striped"> - <thead class="d-none d-sm-table-row"> - <th>{{ $t("mot") }}</th> - <th>{{ $t("description") }}</th> + <thead> + <tr class="d-none d-sm-table-row"> + <th>{{ $t("mot") }}</th> + <th>{{ $t("description") }}</th> + </tr> </thead> <tbody> <tr v-for="mot in listeMotsTrad" :key="mot.title"> diff --git a/pages/parametres.vue b/pages/parametres.vue index a60f2d8..79f59f5 100644 --- a/pages/parametres.vue +++ b/pages/parametres.vue @@ -9,10 +9,12 @@ <div class="table-responsive" v-if="allParameters"> <table class="table table-striped"> <thead> - <th>{{ $t("nom") }}</th> - <th class="d-none d-sm-table-cell">{{ $t("type") }}</th> - <th>{{ $t("valeur") }}</th> - <th class="d-none d-md-table-cell">{{ $t("description") }}</th> + <tr> + <th>{{ $t("nom") }}</th> + <th class="d-none d-sm-table-cell">{{ $t("type") }}</th> + <th>{{ $t("valeur") }}</th> + <th class="d-none d-md-table-cell">{{ $t("description") }}</th> + </tr> </thead> <tbody> <tr v-for="param in allParameters" :key="param.name"> diff --git a/pages/previsions/index.vue b/pages/previsions/index.vue index 6652828..a988c72 100644 --- a/pages/previsions/index.vue +++ b/pages/previsions/index.vue @@ -164,7 +164,7 @@ export default { } ], error: null, - display: "forecastsByNames" + display: "" } }, methods: { @@ -263,7 +263,9 @@ export default { }, mounted() { $nuxt.$emit("changeRoute", this.breadcrumb) - this.display = localStorage.previsions ? localStorage.previsions : "" + this.display = localStorage.previsions + ? localStorage.previsions + : "forecastsByNames" } } </script> -- GitLab