Новая галерея
This commit is contained in:
1 parent
4f278bbc73
commit
3234accae2
1 file changed
+43
-41
@@ -241,7 +241,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="flex-column d-flex overflow-auto overflow-x-hidden " style="height:94vh"
|
||||
<v-col class="flex-column d-flex overflow-auto overflow-x-hidden "
|
||||
>
|
||||
|
||||
|
||||
@@ -256,8 +256,8 @@
|
||||
v-for="n in Math.ceil(x.gallery.length/19)"
|
||||
:key=n
|
||||
>
|
||||
<v-row style="height:150px" >
|
||||
<!-- 1.1 -->
|
||||
<!-- <v-row style="height:150px" >
|
||||
|
||||
<v-col
|
||||
|
||||
class=" flex-column d-flex pa-1" v-for="e in 4" :key=e
|
||||
@@ -296,10 +296,10 @@
|
||||
</v-col>
|
||||
|
||||
|
||||
</v-row>
|
||||
<v-row style="height:350px" v-if="((5-1)+(n-1)*19)<x.gallery.length">
|
||||
</v-row> -->
|
||||
<!-- <v-row style="height:350px" v-if="((5-1)+(n-1)*19)<x.gallery.length">
|
||||
|
||||
<!-- 5 - 6 -->
|
||||
|
||||
<v-col class="flex-column d-flex pa-1">
|
||||
<div v-if="((5-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(5-1)+(n-1)*19]['bg']"
|
||||
@@ -368,7 +368,7 @@
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
<!-- 7 -->
|
||||
|
||||
|
||||
<v-col class=" flex-column d-flex pa-1 ">
|
||||
<div v-if="((7-1)+(n-1)*19)<x.gallery.length"
|
||||
@@ -403,7 +403,7 @@
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
<!-- 8-9 -->
|
||||
|
||||
<v-col class="flex-column d-flex pa-1 ">
|
||||
<div v-if="((8-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(8-1)+(n-1)*19]['bg']"
|
||||
@@ -471,12 +471,12 @@
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-row> -->
|
||||
|
||||
<!-- 10-13 -->
|
||||
<v-row style="height:200px" v-if="((5-1)+(n-1)*19)<x.gallery.length">
|
||||
<v-row style="height:200px" v-if="((5-1)+(n-1)*19)<x.gallery.length" class="justify-space-between ">
|
||||
<!-- 10 -->
|
||||
<v-col lg=5 class=" flex-column d-flex pa-1 ">
|
||||
<!-- <v-col lg=5 class=" flex-column d-flex pa-1 ">
|
||||
<div v-if="((10-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(10-1)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 px-1 flex-column d-flex'
|
||||
@@ -507,44 +507,49 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col> -->
|
||||
|
||||
<!-- 11 -->
|
||||
<v-col class=" flex-column d-flex pa-1 ">
|
||||
<div v-if="((11-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(11-1)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 px-1 flex-column d-flex'
|
||||
>
|
||||
<v-row >
|
||||
<v-col class="pa-1 pb-0 ma-auto">
|
||||
<v-col
|
||||
v-for="e in x.gallery.length" :key=e
|
||||
:lg="Math.floor(Math.random() * (Math.floor(5) - Math.ceil(3)) + Math.ceil(3))"
|
||||
class="flex-column d-flex pa-0 pb-3"
|
||||
:class="x.gallery[(e-1)+(n-1)*19]['bg']">
|
||||
<div
|
||||
v-if="((e-1)+(n-1)*19)<x.gallery.length"
|
||||
class='h-100 w-100 flex-column d-flex'
|
||||
>
|
||||
<v-row>
|
||||
<v-col class="d-flex">
|
||||
<v-img
|
||||
aspect-ratio ="2"
|
||||
cover
|
||||
|
||||
class=" pointer"
|
||||
:src="`${burl}${x.gallery[(11-1)+(n-1)*19].img}`"
|
||||
@click="openImg(x.gallery[(11-1)+(n-1)*19].id)"
|
||||
: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 align-self-center ">
|
||||
<v-row class="flex-grow-0 mt-0 align-self-center ">
|
||||
<v-col class="pa-0 flex-grow-0">
|
||||
<v-btn
|
||||
density="compact"
|
||||
variant="text"
|
||||
size="small"
|
||||
:color="heartIcoAll(x.gallery[(11-1)+(n-1)*19])?'red':'black'"
|
||||
:icon= "heartIcoAll(x.gallery[(11-1)+(n-1)*19])?'mdi-heart':'mdi-heart-outline'"
|
||||
@click = toggleLikeAll(x.gallery[(11-1)+(n-1)*19].id)
|
||||
: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[(11-1)+(n-1)*19].likes.length}}
|
||||
{{x.gallery[(e-1)+(n-1)*19].likes.length}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
<!-- 12 -->
|
||||
<v-col class=" flex-column d-flex pa-1 ">
|
||||
<!-- <v-col class=" flex-column d-flex pa-1 ">
|
||||
<div v-if="((12-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(12-1)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 px-1 flex-column d-flex'
|
||||
@@ -575,9 +580,9 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col> -->
|
||||
<!-- 13 -->
|
||||
<v-col class=" flex-column d-flex pa-1 ">
|
||||
<!-- <v-col class=" flex-column d-flex pa-1 ">
|
||||
<div v-if="((13-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(13-1)+(n-1)*19]['bg']"
|
||||
class='h-100 w-100 pa-3 px-1 flex-column d-flex'
|
||||
@@ -608,11 +613,11 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
|
||||
<!-- 14-19 -->
|
||||
<v-row style="height:250px" class="mb-7" v-if="((5-1)+(n-1)*19)<x.gallery.length">
|
||||
<!-- <v-row style="height:250px" class="mb-7" v-if="((5-1)+(n-1)*19)<x.gallery.length">
|
||||
<v-col lg=2 class=" flex-column d-flex pa-1 ">
|
||||
<div v-if="((14-1)+(n-1)*19)<x.gallery.length"
|
||||
:class="x.gallery[(14-1)+(n-1)*19]['bg']"
|
||||
@@ -814,7 +819,7 @@
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-row> -->
|
||||
</div>
|
||||
<!-- <v-card
|
||||
|
||||
@@ -1089,10 +1094,6 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- <my-helper :pretext="galleryimges.likes.length"/> -->
|
||||
<!-- -->
|
||||
<!-- <v-btn color="primary" block @click="dialogfoto = false">Close Dialog</v-btn> -->
|
||||
<!-- :icon="galleryimges.filter(e=> e.user==accountStore.user.login).length>0?'mdi-heart-outline':'mdi-thumb-down-outline'" -->
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
@@ -1143,8 +1144,7 @@ export default {
|
||||
const page = ref(1)
|
||||
const selecnews = ref(2)
|
||||
const route = useRoute()
|
||||
const colors = ['bg-blue-grey-lighten-5'
|
||||
]
|
||||
const colors = []
|
||||
|
||||
let str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`
|
||||
|
||||
@@ -1162,8 +1162,10 @@ 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)]
|
||||
newss.value.result[0].gallery.forEach(e=>
|
||||
e.bg=colors[Math.floor(Math.random() * colors.length)
|
||||
|
||||
]
|
||||
|
||||
)
|
||||
gallery.value = true
|
||||
|
||||
Reference in new issue
Block a user