Files
PORTAL_COD2/front/src/components/carousel-list.vue
T
2023-10-02 13:15:17 +03:00

127 lines
2.9 KiB
Vue

<template>
<!-- -->
<v-carousel
interval="10000"
cover
height="450"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
cycle
>
<v-carousel-item
v-for="(x, i) in carous" :key="i"
:src="`${burl}${x.link}`"
cover
eager
>
<!-- <my-helper :pretext = 'x'/> -->
<v-container
fill-height
fluid
pa-0 ma-0 pb-3
class="flex-column h-100 d-flex"
>
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}} </v-col>
<!-- {{ burl }} {{ x.sender }} -->
<v-col class="flex-grow-0 pa-0 pr-1">
<v-img
width="50"
:aspect-ratio="1"
:src="`${burl}${x.sender}`"
cover
/>
</v-col>
</v-row>
</v-card-title>
<v-card-text class="ml-2 mb-0 mb-2 w-50 flex-grow-0 pb-3 text-h6 bgText overflow-auto ">
<v-textarea
class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
:model-value=x.text
variant='plain'
readonly
auto-grow
rows="1"
hide-details
/>
</v-card-text>
</v-card>
</v-container>
</v-carousel-item>
</v-carousel>
</template>
<script>
import { ref, computed } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
export default {
setup() {
const burl = baseURL.slice(0,-1)
const carous=ref([{link: ""}])
const imageSrcgrupp=computed(()=> {
return new URL(`@/assets/mc.png`, import.meta.url).href;
})
getfromserver("api/navigation/carousels/", carous)
return { burl, carous, imageSrcgrupp}
}
}
</script>
<style>
.bgCard {
/* #ffffff6b #ffffff8c*/
background: #ffffff38 ;
}
.bgText {
background: #ffffffb0;
line-height: 2.1rem!important;
}
.titles {
font-family: cursive !important;
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 1.3em!important;
}
</style>