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