change adress and edit blog item

This commit is contained in:
mohadese-nm
2024-07-24 15:54:28 +04:30
parent e355bdc3e2
commit 33b3ef06ab
2 changed files with 23 additions and 13 deletions
+21 -10
View File
@@ -3,8 +3,10 @@
<article> <article>
<img :src="coverImage" :alt="title" /> <img :src="coverImage" :alt="title" />
<div> <div>
<h1>{{ title }}</h1> <h3>{{ removeTags(title) }}</h3>
<div v-if="type != 'vertical'" v-html="content" /> <div v-if="type != 'vertical'">
<p>{{ removeTags(content) }}</p>
</div>
<Button v-if="type == 'normal'" v-bind="btn.props" /> <Button v-if="type == 'normal'" v-bind="btn.props" />
</div> </div>
</article> </article>
@@ -19,6 +21,11 @@ const props = defineProps({
type: { default: 'normal' }, type: { default: 'normal' },
data: {}, data: {},
}); });
const removeTags = (str) => {
if (str === null || str === '') return false
else str = str.toString()
return str.replace(/(<([^>]+)>|&nbsp;)+/gi, '')
}
const { link, coverImage, title, content } = props.data const { link, coverImage, title, content } = props.data
</script> </script>
@@ -35,12 +42,16 @@ const { link, coverImage, title, content } = props.data
&>div { &>div {
@apply flex flex-col overflow-hidden font-vazir; @apply flex flex-col overflow-hidden font-vazir;
h1 { h3 {
@apply text-zinc-800 font-bold truncate; @apply text-zinc-800 font-bold truncate h-8;
} }
p { p {
@apply text-zinc-500 lg:leading-[1.9rem]; @apply text-zinc-500 lg:leading-[1.9rem];
overflow: hidden !important;
display: -webkit-box !important;
-webkit-box-orient: vertical !important;
-webkit-line-clamp: 3 !important;
} }
} }
} }
@@ -48,7 +59,7 @@ const { link, coverImage, title, content } = props.data
.post-item-normal { .post-item-normal {
article { article {
@apply w-[21.4rem] h-[4.7rem]; @apply w-[21.4rem] min-h-[4.7rem];
@apply lg:w-[55.9rem] lg:h-[11.9rem]; @apply lg:w-[55.9rem] lg:h-[11.9rem];
img { img {
@@ -59,8 +70,8 @@ const { link, coverImage, title, content } = props.data
@apply flex flex-col justify-between lg:justify-center; @apply flex flex-col justify-between lg:justify-center;
@apply gap-1 lg:gap-6; @apply gap-1 lg:gap-6;
h1 { h3 {
@apply text-xs lg:text-2xl whitespace-normal; @apply text-xs lg:text-xl whitespace-normal h-8;
} }
p { p {
@@ -68,7 +79,7 @@ const { link, coverImage, title, content } = props.data
} }
button { button {
@apply w-max h-max text-[#43E97B] py-1.5 px-3.5 -mr-3.5 -my-1.5 #{!important}; @apply w-max h-max text-[#4D88B7] py-1.5 px-3.5 -mr-3.5 -my-1.5 #{!important};
.p-button-label { .p-button-label {
@apply font-normal font-vazir text-[0.7em] lg:text-base; @apply font-normal font-vazir text-[0.7em] lg:text-base;
@@ -93,7 +104,7 @@ const { link, coverImage, title, content } = props.data
&>div { &>div {
@apply gap-2 lg:gap-0.5 justify-center; @apply gap-2 lg:gap-0.5 justify-center;
h1 { h3 {
@apply text-xs lg:text-base lg:leading-[2.8rem]; @apply text-xs lg:text-base lg:leading-[2.8rem];
} }
@@ -116,7 +127,7 @@ const { link, coverImage, title, content } = props.data
@apply w-full h-[9.9rem] lg:h-[18.3rem] object-cover; @apply w-full h-[9.9rem] lg:h-[18.3rem] object-cover;
} }
&>div h1 { &>div h3 {
@apply text-xs lg:text-base leading-6 line-clamp-3 lg:line-clamp-2 whitespace-break-spaces; @apply text-xs lg:text-base leading-6 line-clamp-3 lg:line-clamp-2 whitespace-break-spaces;
} }
} }
+2 -3
View File
@@ -25,12 +25,11 @@ export default () => {
}, },
}, },
ways: [ ways: [
{ icon: "isax-call", label: "phone", value: "67341" }, { icon: "isax-call", label: "phone", value: t("aboutUsPhone") },
{ icon: "isax-message", label: "postalCode", value: "1136834843" },
{ {
icon: "isax-location", icon: "isax-location",
label: "centeralOffice", label: "centeralOffice",
value: "تهران، میدان امام خمینی، خیابان فردوسی، خیابان سرهنگ سخائی نبش کوچه بهنیا، پلاک40، طبقه چهارم، واحد12 ", value: t("aboutUsAddress"),
}, },
], ],
map: { map: {