edit: panneau lien pour les réseaux des artistes

This commit is contained in:
2026-03-21 23:11:56 +01:00
parent fbe2d02a99
commit ed9f84f040
6 changed files with 163 additions and 5 deletions
@@ -0,0 +1,116 @@
<script setup>
import CloseIcon from '../assets/icons/close.svg'
</script>
<template>
<div id="linkPannel" class="windowStyle" ref="linkPannel" @mousedown="$emit('focus')" @touchstart="$emit('focus')">
<Moveable
className="moveable"
:target="target"
:draggable="true"
@drag="onDrag"
/>
<div class="windowTitle">
<p>
{{selectedLink.caption}}
</p>
<!-- touchstart.capture pour passer en prio sur déplacement fenêtre/ .stop si pas de method-->
<button type="button" class="closeBtn" @mousedown.capture="$emit('close')" @touchstart.capture="$emit('close')">
<CloseIcon name="close" class="icon"/>
</button>
</div>
<div class="windowContent" id="linkContent">
<p id="linkTextStyle">{{selectedLink.description}}</p>
<a class="textBtnStyle" v-for="item in selectedLink.linksData" :href="item.url" target="_blank">{{item.caption}}</a>
</div>
</div>
</template>
<style scoped>
/*================= Mise en page:
=> Mobile First : par défaut, moins de 500px
=> Tablette et PC format haut : de 500 à 1000px
=> PC large : à partir de 1000px
*/
/*+++++++++++++++++ COPYBOX
================ PC HAUT/IPAD
@media(min-width:650px){}
================ PC LARGE
@media(min-width:1300px){}
*/
#linkPannel{
position: fixed;
width: 333px;
height: auto;
top: 500px;
left: 16.1px;
overflow-y: scroll;
}
#linkContent{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
}
#linkContent .textBtnStyle{
width: 267px;
height: 77px;
margin-top: 33px;
margin-bottom: 33px;
}
#linkTextStyle{
font-size: 16.1px;
font-family: 'velvelyne';
color: var(--main-color);
font-weight: bold;
padding-right: 33px;
padding-left: 33px;
padding-top: 16.1px;
}
/*================ PC LARGE*/
@media(min-width:1300px){
#linkPannel{
top: 333px;
left: 161px;
}
}
</style>
<script>
import Moveable from 'vue3-moveable';
import { dataStorage } from '../dataExchange.js'
export default {
name : 'LinkPannel',
components:{
Moveable
},
data(){
return{
target: null,
}
},
emits: ['close','focus'],
computed: {
selectedLink(){
return dataStorage.selectedLink
}
},
methods:{
onDrag({ target, transform }) {
target.style.transform = transform;
}
},
mounted(){
this.target = this.$refs.linkPannel;
console.log("Link pannel is loaded!");
}
};
</script>