Галерея 6 фотка
No files matched your search
@@ -168,6 +168,7 @@
|
||||
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
<v-col v-else class="flex-column d-flex" v-for="(x, i) in newss.result" :key=i>
|
||||
<v-row>
|
||||
<v-col class=" flex-column d-flex">
|
||||
@@ -245,61 +246,120 @@
|
||||
|
||||
|
||||
|
||||
<v-row class="d-flex flex-column ma-0"
|
||||
v-if="gallery"
|
||||
<v-row
|
||||
class="d-flex flex-column "
|
||||
v-if="gallery"
|
||||
>
|
||||
<v-col class="d-flex flex-column bg-red">
|
||||
<div class="flex-column d-flex"
|
||||
v-for="n in 2"
|
||||
<v-col class="d-flex flex-column ">
|
||||
<div
|
||||
class="flex-column d-flex ma-3"
|
||||
v-for="n in Math.ceil(x.gallery.length/19)"
|
||||
:key=n
|
||||
>
|
||||
<v-row style="height:150px">
|
||||
<v-col class="bg-yellow flex-column d-flex ">
|
||||
<v-row>
|
||||
<v-col class="pa-1 pb-0">
|
||||
<!-- 1.1 -->
|
||||
<v-col
|
||||
|
||||
class=" flex-column d-flex pa-0" v-for="e in 4" :key=e
|
||||
|
||||
>
|
||||
<div v-if="((e-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(e-1)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 flex-column d-flex'
|
||||
>
|
||||
<v-row >
|
||||
<v-col class="pa-1 pb-0 ma-auto">
|
||||
<v-img
|
||||
class="w-100 h-100 pointer"
|
||||
:src="`${burl}${x.gallery[0].img}`"
|
||||
@click="openImg(x.gallery[0].id)"
|
||||
/>
|
||||
class=" pointer"
|
||||
:src="`${burl}${x.gallery[(e-1)+(n-1)*19].img}`"
|
||||
@click="openImg(x.gallery[(e-1)+(n-1)*19].id)"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0 flex-grow-0">
|
||||
|
||||
<v-btn
|
||||
density="compact"
|
||||
variant="text"
|
||||
size="small"
|
||||
:color="heartIcoAll(x.gallery[0])?'red':'black'"
|
||||
:icon= "heartIcoAll(x.gallery[0])?'mdi-heart':'mdi-heart-outline'"
|
||||
@click = toggleLikeAll(x.gallery[0].id)
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="pa-0 pl-1">
|
||||
{{x.gallery[0].likes.length}}
|
||||
</v-col>
|
||||
<v-row class="flex-grow-0 align-self-center ">
|
||||
<v-col class="pa-0 flex-grow-0">
|
||||
<v-btn
|
||||
density="compact"
|
||||
variant="text"
|
||||
size="small"
|
||||
:color="heartIcoAll(x.gallery[(e-1)+(n-1)*19])?'red':'black'"
|
||||
:icon= "heartIcoAll(x.gallery[(e-1)+(n-1)*19])?'mdi-heart':'mdi-heart-outline'"
|
||||
@click = toggleLikeAll(x.gallery[(e-1)+(n-1)*19].id)
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="pa-0 pl-1" >
|
||||
{{x.gallery[(e-1)+(n-1)*19].likes.length}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col class="bg-grey">
|
||||
|
||||
</v-col>
|
||||
<v-col class="bg-blue">3</v-col>
|
||||
<v-col class="bg-black">4</v-col>
|
||||
|
||||
|
||||
</v-row>
|
||||
<v-row style="height:350px">
|
||||
<v-col class="bg-black d-flex flex-column">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<my-helper :pretext="x.gallery"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="bg-blue">
|
||||
6
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-col class="flex-column d-flex pa-0">
|
||||
<div v-if="((5)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(5)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 flex-column d-flex'
|
||||
>
|
||||
<v-row
|
||||
|
||||
>
|
||||
<v-col class="pa-1 pb-0 ma-auto">
|
||||
<v-img
|
||||
class=" pointer"
|
||||
:src="`${burl}${x.gallery[(5)+(n-1)*19].img}`"
|
||||
@click="openImg(x.gallery[(5)+(n-1)*19].id)"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 align-self-center ">
|
||||
<v-col class="pa-0 flex-grow-0">
|
||||
<v-btn
|
||||
density="compact"
|
||||
variant="text"
|
||||
size="small"
|
||||
:color="heartIcoAll(x.gallery[(5)+(n-1)*19])?'red':'black'"
|
||||
:icon= "heartIcoAll(x.gallery[(5)+(n-1)*19])?'mdi-heart':'mdi-heart-outline'"
|
||||
@click = toggleLikeAll(x.gallery[(5)+(n-1)*19].id)
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="pa-0 pl-1" >
|
||||
{{x.gallery[(5)+(n-1)*19].likes.length}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<div v-if="((6)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(6)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 flex-column d-flex'
|
||||
>
|
||||
<v-row
|
||||
|
||||
>
|
||||
<v-col class="pa-1 pb-0 ma-auto">
|
||||
<v-img
|
||||
class=" pointer"
|
||||
:src="`${burl}${x.gallery[(6)+(n-1)*19].img}`"
|
||||
@click="openImg(x.gallery[(6)+(n-1)*19].id)"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 align-self-center ">
|
||||
<v-col class="pa-0 flex-grow-0">
|
||||
<v-btn
|
||||
density="compact"
|
||||
variant="text"
|
||||
size="small"
|
||||
:color="heartIcoAll(x.gallery[(6)+(n-1)*19])?'red':'black'"
|
||||
:icon= "heartIcoAll(x.gallery[(6)+(n-1)*19])?'mdi-heart':'mdi-heart-outline'"
|
||||
@click = toggleLikeAll(x.gallery[(6)+(n-1)*19].id)
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="pa-0 pl-1" >
|
||||
{{x.gallery[(6)+(n-1)*19].likes.length}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col class="bg-yellow">7</v-col>
|
||||
<v-col class="bg-grey d-flex flex-column">
|
||||
@@ -670,7 +730,9 @@ export default {
|
||||
const page = ref(1)
|
||||
const selecnews = ref(2)
|
||||
const route = useRoute()
|
||||
|
||||
const colors = ['bg-pink-lighten-5','bg-red-lighten-5', 'bg-purple-lighten-5',
|
||||
'bg-deep-purple-lighten-5','bg-indigo-lighten-5', 'bg-blue-lighten-5'
|
||||
]
|
||||
|
||||
let str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`
|
||||
|
||||
@@ -688,7 +750,12 @@ export default {
|
||||
|
||||
newss.value= result.data
|
||||
if (newss.value.result[0].gallery.length > 0) {
|
||||
newss.value.result[0].gallery.forEach(e=>
|
||||
e.bg=colors[Math.floor(Math.random() * colors.length)]
|
||||
|
||||
)
|
||||
gallery.value = true
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -805,6 +872,13 @@ export default {
|
||||
|
||||
}, {deep:true})
|
||||
|
||||
const imagesIn = () => {
|
||||
console.log(newss.value.result[0].gallery.length);
|
||||
return newss.value.result[0].gallery.length
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Лайки на фотографии
|
||||
|
||||
const toggleLike = (idimage) => {
|
||||
@@ -814,9 +888,6 @@ export default {
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const toggleLikeAll = (idimage) => {
|
||||
@@ -872,7 +943,8 @@ export default {
|
||||
toggleLike,
|
||||
heartIco,
|
||||
heartIcoAll,
|
||||
toggleLikeAll
|
||||
toggleLikeAll,
|
||||
imagesIn
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 367 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 342 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 1.9 MiB |