From 33b3ef06abd6d565e9c70ee3e5bdade3e809807f Mon Sep 17 00:00:00 2001 From: mohadese-nm Date: Wed, 24 Jul 2024 15:54:28 +0430 Subject: [PATCH] change adress and edit blog item --- components/blog/Item.vue | 31 +++++++++++++++++++++---------- initialize/contact-us.js | 5 ++--- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/components/blog/Item.vue b/components/blog/Item.vue index 559b185..c85260e 100644 --- a/components/blog/Item.vue +++ b/components/blog/Item.vue @@ -3,8 +3,10 @@
-

{{ title }}

-
+

{{ removeTags(title) }}

+
+

{{ removeTags(content) }}

+
@@ -19,6 +21,11 @@ const props = defineProps({ type: { default: 'normal' }, data: {}, }); +const removeTags = (str) => { + if (str === null || str === '') return false + else str = str.toString() + return str.replace(/(<([^>]+)>| )+/gi, '') +} const { link, coverImage, title, content } = props.data @@ -35,12 +42,16 @@ const { link, coverImage, title, content } = props.data &>div { @apply flex flex-col overflow-hidden font-vazir; - h1 { - @apply text-zinc-800 font-bold truncate; + h3 { + @apply text-zinc-800 font-bold truncate h-8; } p { @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 { 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]; img { @@ -59,8 +70,8 @@ const { link, coverImage, title, content } = props.data @apply flex flex-col justify-between lg:justify-center; @apply gap-1 lg:gap-6; - h1 { - @apply text-xs lg:text-2xl whitespace-normal; + h3 { + @apply text-xs lg:text-xl whitespace-normal h-8; } p { @@ -68,7 +79,7 @@ const { link, coverImage, title, content } = props.data } 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 { @apply font-normal font-vazir text-[0.7em] lg:text-base; @@ -93,7 +104,7 @@ const { link, coverImage, title, content } = props.data &>div { @apply gap-2 lg:gap-0.5 justify-center; - h1 { + h3 { @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; } - &>div h1 { + &>div h3 { @apply text-xs lg:text-base leading-6 line-clamp-3 lg:line-clamp-2 whitespace-break-spaces; } } diff --git a/initialize/contact-us.js b/initialize/contact-us.js index 75711ae..38fa72d 100644 --- a/initialize/contact-us.js +++ b/initialize/contact-us.js @@ -25,12 +25,11 @@ export default () => { }, }, ways: [ - { icon: "isax-call", label: "phone", value: "67341" }, - { icon: "isax-message", label: "postalCode", value: "1136834843" }, + { icon: "isax-call", label: "phone", value: t("aboutUsPhone") }, { icon: "isax-location", label: "centeralOffice", - value: "تهران، میدان امام خمینی، خیابان فردوسی، خیابان سرهنگ سخائی نبش کوچه بهنیا، پلاک40، طبقه چهارم، واحد12 ", + value: t("aboutUsAddress"), }, ], map: {