66 lines
1.6 KiB
Vue
66 lines
1.6 KiB
Vue
<template>
|
|
<div style="padding: 0">
|
|
<div class="q-pa-sm row items-start">
|
|
<div class="new-card q-pa-sm" v-for="myNew in news" :key="myNew.id">
|
|
<QCard>
|
|
<QImg :src="`${$app.imageUrl}/news/full/${myNew.image}`">
|
|
</QImg>
|
|
<QCardSection>
|
|
<div class="text-h5">{{ myNew.title }}</div>
|
|
</QCardSection>
|
|
<QCardSection class="new-body">
|
|
<div v-html="myNew.text" />
|
|
</QCardSection>
|
|
</QCard>
|
|
</div>
|
|
</div>
|
|
<QPageSticky>
|
|
<QBtn
|
|
fab
|
|
icon="add_shopping_cart"
|
|
color="accent"
|
|
to="/ecomerce/catalog"
|
|
>
|
|
<QTooltip>{{ $t('startOrder') }}</QTooltip></QBtn
|
|
>
|
|
</QPageSticky>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="scss" scoped>
|
|
.new-card {
|
|
width: 100%;
|
|
|
|
@media screen and (min-width: 800px) and (max-width: 1400px) {
|
|
width: 50%;
|
|
}
|
|
@media screen and (min-width: 1401px) and (max-width: 1920px) {
|
|
width: 33.33%;
|
|
}
|
|
@media screen and (min-width: 19021) {
|
|
width: 25%;
|
|
}
|
|
}
|
|
.new-body {
|
|
font-family: 'Open Sans';
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'PageIndex',
|
|
data() {
|
|
return {
|
|
news: []
|
|
};
|
|
},
|
|
async mounted() {
|
|
this.news = await this.$jApi.query(
|
|
`SELECT title, text, image, id
|
|
FROM news
|
|
ORDER BY priority, created DESC`
|
|
);
|
|
}
|
|
};
|
|
</script>
|