diff --git a/assets/haditha/images/mobile/backgorund.png b/assets/haditha/images/mobile/backgorund.png
new file mode 100644
index 0000000..75d33d7
Binary files /dev/null and b/assets/haditha/images/mobile/backgorund.png differ
diff --git a/assets/haditha/images/mobile/section-three-bgi_md.png b/assets/haditha/images/mobile/section-three-bgi_md.png
new file mode 100644
index 0000000..7f296b6
Binary files /dev/null and b/assets/haditha/images/mobile/section-three-bgi_md.png differ
diff --git a/assets/haditha/images/mobile/section-three-bgi_sm.png b/assets/haditha/images/mobile/section-three-bgi_sm.png
new file mode 100644
index 0000000..3b62cd3
Binary files /dev/null and b/assets/haditha/images/mobile/section-three-bgi_sm.png differ
diff --git a/assets/haditha/scss/haditha.css b/assets/haditha/scss/haditha.css
index 8e49802..99270c9 100644
--- a/assets/haditha/scss/haditha.css
+++ b/assets/haditha/scss/haditha.css
@@ -19,6 +19,12 @@
@theme {
--font-sans: "IRANSansX", "Public Sans", sans-serif;
+ --breakpoint-sm: 360px;
+ --breakpoint-md: 720px;
+ --breakpoint-lg: 992px;
+ --breakpoint-xl: 1280px;
+ --breakpoint-2xl: 1536px;
+ --breakpoint-3xl: 1900px;
}
@layer {
@@ -44,12 +50,14 @@ html {
direction: rtl;
text-align: right;
font-family: IRANSansX;
+ scroll-behavior: smooth;
body {
height: 100%;
direction: rtl;
text-align: right;
font-family: IRANSansX;
+ scroll-behavior: smooth;
}
}
.haditha-system {
@@ -65,3 +73,5 @@ html {
scrollbar-width: thin;
scrollbar-color: #ccc #eee;
}
+
+@import "./responsive/responsive.css";
diff --git a/assets/haditha/scss/responsive/responsive.css b/assets/haditha/scss/responsive/responsive.css
new file mode 100644
index 0000000..e69de29
diff --git a/components/haditha/AutoComplation.vue b/components/haditha/AutoComplation.vue
index a1abf17..c184877 100644
--- a/components/haditha/AutoComplation.vue
+++ b/components/haditha/AutoComplation.vue
@@ -25,6 +25,9 @@ const props = defineProps({
showPrevSearch: {
default: false,
},
+ autoRedirection: {
+ default: true,
+ },
});
// #endregion props
@@ -172,7 +175,7 @@ const onKeyDown = () => {
const onKeyUp = () => {
clearTimeout(typingTimer.value);
typingTimer.value = setTimeout(() => {
- sendQuery();
+ if (props.autoRedirection) sendQuery();
}, doneTypingInterval.value);
};
@@ -225,7 +228,7 @@ const sendQuery = async (payload = {}) => {
emit("response-ready", {
res: res,
searchQuery: searchTerm.value,
- disableAutoRedirect:true
+ disableAutoRedirect: true,
});
loading.value = false;
@@ -581,7 +584,7 @@ onMounted(() => {
-
+
+import { useAuthStore } from "@stores/authStore";
+
const items = ref([
{
label: "حانه",
@@ -39,8 +41,20 @@ const items = ref([
{
label: "دیگر",
icon: "i-haditha-menu",
- class: "flex flex-col lg:hidden justify-center items-center hide-chevron",
+
+ class:
+ "flex flex-col lg:hidden justify-center items-center hide-chevron other /haditha/other",
children: [
+ {
+ label: "ورود / ثبت نام",
+ icon: "i-haditha-user",
+ to: "/haditha/login",
+ },
+ {
+ label: "کتابخانه",
+ icon: "i-haditha-library",
+ to: "/haditha/library",
+ },
{
label: "در باره ما",
icon: "i-haditha-about-us",
@@ -110,13 +124,36 @@ const leftItem = computed(() => [
const isMobile = ref(false);
const rerenderNavigation = ref(1);
+const { isAuthenticatedGetter } = useAuthStore();
+
+const setMenu = () => {
+ if (isAuthenticatedGetter) {
+ let otherItem = items.value.find((item) => {
+ return item.class.includes("/haditha/other");
+ });
+
+ let otherItemChildren = otherItem.children.filter(
+ (i) => i.to != "/haditha/login"
+ );
+ otherItem.children = otherItemChildren;
+ } else {
+ let otherItem = items.value.find((item) => {
+ return item.class.includes("/haditha/other");
+ });
+
+ let otherItemChildren = otherItem.children.filter(
+ (i) => i.icon != "i-haditha-logout"
+ );
+ otherItem.children = otherItemChildren;
+ }
+};
+
+setMenu();
onMounted(() => {
- if (window?.outerWidth < 576) {
+ if (window?.outerWidth < 991) {
isMobile.value = true;
- console.info("is less than 576");
-
- items.value = items.value.filter((item) => item.to != "/haditha/favorites");
+ items.value = items.value.filter((item) => item.to != "/haditha/library");
rerenderNavigation.value++;
}
});
@@ -124,15 +161,15 @@ onMounted(() => {
-
+
{
- // // Use $img to generate an optimized image URL
- // const optimizedImageUrl = img("/img/haditha/background.webp", {
- // quality: 80,
- // fit: "auto",
- // });
- // return {
- // backgroundImage: `url(${optimizedImageUrl}), linear-gradient(199.05deg, #ffffff 9.99%, #e4fff7 42.07%, #ffffff 97.12%)`,
- // };
- return {
- backgroundImage: `url(/img/haditha/background.webp), linear-gradient(199.05deg, #ffffff 9.99%, #e4fff7 42.07%, #ffffff 97.12%)`,
- };
-});
+// const backgroundImageStyle = computed(() => {
+// // // Use $img to generate an optimized image URL
+// // const optimizedImageUrl = img("/img/haditha/background.webp", {
+// // quality: 80,
+// // fit: "auto",
+// // });
+// // return {
+// // backgroundImage: `url(${optimizedImageUrl}), linear-gradient(199.05deg, #ffffff 9.99%, #e4fff7 42.07%, #ffffff 97.12%)`,
+// // };
+// return {
+// backgroundImage: `url(/img/haditha/background.webp), linear-gradient(199.05deg, #ffffff 9.99%, #e4fff7 42.07%, #ffffff 97.12%)`,
+// };
+// });
const searchPhrase = useStorage("searchPhrase", "");
-searchPhrase.value = '';
+searchPhrase.value = "";
const handleResponseReady = (payload) => {
-
router.push({
name: "hadithaSearch",
query: {
@@ -39,16 +38,11 @@ const AutoComplation = defineAsyncComponent(() =>
-
+
-

+
کاوش با
هوش مصنوعی
@@ -58,6 +52,7 @@ const AutoComplation = defineAsyncComponent(() =>
@@ -67,10 +62,12 @@ const AutoComplation = defineAsyncComponent(() =>
diff --git a/components/haditha/hero-page/SectionThree.vue b/components/haditha/hero-page/SectionThree.vue
index 680116d..ae90075 100644
--- a/components/haditha/hero-page/SectionThree.vue
+++ b/components/haditha/hero-page/SectionThree.vue
@@ -1,23 +1,23 @@
-