changes in home

This commit is contained in:
mohadese namavar
2024-06-16 17:10:28 +04:30
parent 93cc604116
commit 04ee56e136
8 changed files with 17 additions and 10 deletions
@@ -16,7 +16,6 @@
<script setup>
const items = reactive([
{ icon: "call", title: "aboutUsPhone" },
{ icon: "sms", title: "aboutUsPostalCode" },
{ icon: "location", title: "aboutUsAddress" },
]);
</script>
+9 -1
View File
@@ -12,7 +12,9 @@
{{ data.title }}
</router-link>
</h1>
<p v-html="data.content"></p>
<p>
{{ removeTags(data.content) }}
</p>
<div>
<span>{{ new Date(data.createdAt).toLocaleDateString('fa') }}</span>
<router-link :to="'/blog/' + data.link">
@@ -25,6 +27,12 @@
<script setup>
defineProps({ data: { type: Object, default: {} } })
const removeTags = (str) => {
if (str === null || str === '') return false
else str = str.toString()
return str.replace(/(<([^>]+)>|&nbsp;)+/gi, '')
}
</script>
<style lang="scss">
+1 -1
View File
@@ -44,7 +44,7 @@ const store = useCategoriesStore();
// }
img {
@apply w-[4.4rem] h-[4.4rem] rounded-full lg:w-[9.1rem] lg:h-32;
@apply w-[4.4rem] h-[4.4rem] rounded-full lg:w-[9.1rem] lg:h-[9.1rem];
}
h3 {
+1 -1
View File
@@ -6,7 +6,7 @@
<Swiper v-bind="swipers.topSlider">
<SwiperSlide v-for="{ link, images, title, id } in sliders" :key="id">
<router-link :to="link">
<img :title="title" :src="images[device]" />
<img :title="title" :src="images[device] + '?w=1980'" />
</router-link>
</SwiperSlide>
</Swiper>