promoted statics on header menu #2194, crédits paysage sonor (récit) #2148

This commit is contained in:
Bachir Soussi Chiadmi 2023-07-06 11:08:07 +02:00
parent 689d00d3de
commit 5c41bfc04a
6 changed files with 33 additions and 20 deletions

View File

@ -13,6 +13,7 @@ fragment ConcernementFields on Concernement {
}
description
}
recit_colophon
author {
username
structure {

View File

@ -87,8 +87,7 @@ body{
}
#content{
section.concernement{
@mixin main-cartouche{
background-color: rgba(255, 255, 255, 0.9);
box-sizing: border-box;
width:450px;
@ -99,6 +98,12 @@ body{
//
display: flex;
flex-direction: column;
}
section.static{
@include main-cartouche();
}
section.concernement{
@include main-cartouche();
justify-content: flex-end;
// layout
>header{
@ -193,13 +198,18 @@ body{
}
>footer{
section.infos{
>p{
>div{
font-size: 0.882em;
font-weight: 100;
>span{
>span{
font-weight: 100;
white-space:nowrap;
>span.label{
font-weight: 100;
}
>div{
&, p{
display: inline-block;
font-size: inherit;
font-weight: inherit;
}
}
}

View File

@ -87,13 +87,12 @@ export default {
<template v-slot:footer>
<section class="infos">
<p>
<span class="author"><span>une enquête de</span> {{ opened_concernement.author.username }}<br/></span>
<span class="structure" v-if="opened_concernement.author.structure.length"><span>avec</span> {{ opened_concernement.author.structure[0].name }}<br/></span>
<span class="lieu" v-if="opened_concernement.lieu.length"><span>à</span> {{ opened_concernement.lieu[0].name }}<br/></span>
<span class="created"><span>démarrée le</span> {{ created }}<br/></span>
<span class="changed"><span>mise à jour le</span> {{ changed }}</span>
</p>
<div class="author"><span>une enquête de</span> {{ opened_concernement.author.username }}<br/></div>
<div class="structure" v-if="opened_concernement.author.structure.length"><span>avec</span> {{ opened_concernement.author.structure[0].name }}<br/></div>
<div class="lieu" v-if="opened_concernement.lieu.length"><span>à</span> {{ opened_concernement.lieu[0].name }}<br/></div>
<div class="created"><span>démarrée le</span> {{ created }}<br/></div>
<div class="changed"><span>mise à jour le</span> {{ changed }}</div>
<div class="recit-colophon"><span>récit:</span> <div v-html="opened_concernement.recit_colophon" /></div>
</section>
<!-- <section class="historique">

View File

@ -20,7 +20,7 @@ export const CommonStore = defineStore({
this.hover_elmt = elmt;
},
addPaperSymbolDefinition(name, path) {
console.log(`addPaperSymbolDefinition ${name}`, path);
// console.log(`addPaperSymbolDefinition ${name}`, path);
// mode can be : terraindevie, proximite, superposition, puissancedagir, action, doleancer
this.paper_symbol_definitions[name] = new paper.SymbolDefinition(path);
}

View File

@ -23,7 +23,7 @@ export const StaticsStore = defineStore({
console.log('statics store loadStatics');
return new Promise((resolve, reject) => {
const ast = gql`{
allstatics {
promotedstatics {
...StaticsFields
}
}
@ -31,11 +31,11 @@ export const StaticsStore = defineStore({
`
console.log('ast', ast);
GQL.post('', { query: print(ast) })
.then(({ data : { data : { allstatics } } }) => {
console.log('loadstatics loaded', allstatics)
this.statics = allstatics
.then(({ data : { data : { promotedstatics } } }) => {
console.log('loadstatics loaded', promotedstatics)
this.statics = promotedstatics
allstatics.forEach((s) => {
promotedstatics.forEach((s) => {
// console.log("s", s);
this.statics_byid[s.id] = s
});

View File

@ -29,10 +29,13 @@ export default {
</script>
<template>
<section class="static">
<span v-if="!loaded">loading ...</span>
<!-- <h2 v-if="loaded">{{ this.id }}</h2> -->
<h2 v-if="loaded">{{ statics_byid[id].title }}</h2>
<div v-if="loaded" v-html="statics_byid[id].texte"/>
</section>
</template>
<style lang="scss" scoped>