diff --git a/app.vue b/app.vue index 46e1ad0..da2e0c1 100644 --- a/app.vue +++ b/app.vue @@ -1,5 +1,5 @@ - @@ -66,7 +67,7 @@ export default { - + --> diff --git a/assets/background.png b/assets/background.png new file mode 100644 index 0000000..7ec7756 Binary files /dev/null and b/assets/background.png differ diff --git a/assets/common/scss/_IRANSansX.scss b/assets/common/scss/_IRANSansX.scss new file mode 100644 index 0000000..13f8099 --- /dev/null +++ b/assets/common/scss/_IRANSansX.scss @@ -0,0 +1,11 @@ +@font-face { + font-family: IRANSansX; + src: url("../fonts/iransans/woff/IRANSansXFaNum-Bold.woff") format("woff"), + url("../fonts/iransans/woff2/IRANSansXFaNum-Bold.woff2") format("woff2"); +} + +@font-face { + font-family: IRANSansX; + src: url("../fonts/iransans/woff/IRANSansXFaNum-Regular.woff") format("woff"), + url("../fonts/iransans/woff2/IRANSansXFaNum-Regular.woff2") format("woff2"); +} \ No newline at end of file diff --git a/assets/common/scss/_fonts.scss b/assets/common/scss/_fonts.scss index f0a918f..9d1b98a 100644 --- a/assets/common/scss/_fonts.scss +++ b/assets/common/scss/_fonts.scss @@ -1,158 +1,2 @@ -//@import "fonts/niafam/style.scss"; @import "../fonts/tavasi/style"; @import "../img/icomoon/style"; - -// @font-face { -// font-family: 'yekan-regular'; -// src: url('../fonts/iranyekan/fonts/ttf/IRANYekanWebRegular.ttf'); -// src: url('../fonts/iranyekan/fonts/eot/IRANYekanWebRegular.eot') format('embedded-opentype'), -// url('../fonts/iranyekan/fonts/ttf/IRANYekanWebRegular.ttf') format('truetype'), -// url('../fonts/iranyekan/fonts/woff/IRANYekanWebRegular.woff') format('woff'), -// url('../fonts/iranyekan/fonts/woff2/IRANYekanWebRegular.woff2') format('woff'); - -// } -// @font-face { -// font-family: 'yekan-medium'; -// src: url('../fonts/iranyekan/fonts/ttf/IRANYekanWebMedium.ttf'); -// src: url('../fonts/iranyekan/fonts/eot/IRANYekanWebMedium.eot') format('embedded-opentype'), -// url('../fonts/iranyekan/fonts/ttf/IRANYekanWebMedium.ttf') format('truetype'), -// url('../fonts/iranyekan/fonts/woff/IRANYekanWebMedium.woff') format('woff'), -// url('../fonts/iranyekan/fonts/woff2/IRANYekanWebMedium.woff2') format('woff'); -// } - -// @font-face { -// font-family: 'niafam'; -// src: url('../fonts/niafam.eot'); -// src: url('../fonts/niafam.eot?2cp7ya#iefix') format('embedded-opentype'), -// url('../fonts/niafam.ttf?2cp7ya') format('truetype'), -// url('../fonts/niafam.woff?2cp7ya') format('woff'), -// url('../fonts/niafam.svg?2cp7ya#niafam') format('svg'); -// font-weight: normal; -// font-style: normal; -// font-display: block; -// } - -@font-face { - font-family: IRANSansX; - font-style: normal; - font-weight: bold; - src: url("../fonts/iransans/woff/IRANSansXFaNum-Bold.woff") format("woff"), - url("../fonts/iransans/woff2/IRANSansXFaNum-Bold.woff2") format("woff2"); -} - -@font-face { - font-family: IRANSansX; - font-style: normal; - font-weight: normal; - src: url("../fonts/iransans/woff/IRANSansXFaNum-Regular.woff") format("woff"), - url("../fonts/iransans/woff2/IRANSansXFaNum-Regular.woff2") format("woff2"); -} - -@font-face { - font-family: sahel; - src: url("../fonts/sahel/Farsi-Digits/Sahel-FD.eot"); - src: url("../fonts/sahel/Farsi-Digits/Sahel-FD.eot?#iefix") - format("embedded-opentype"), - url("../fonts/sahel/Farsi-Digits/Sahel-FD.woff2") format("woff2"), - url("../fonts/sahel/Farsi-Digits/Sahel-FD.woff") format("woff"), - url("../fonts/sahel/Farsi-Digits/Sahel-FD.ttf") format("truetype"); - font-weight: normal; -} - -@font-face { - font-family: sahel-bold; - src: url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.eot"); - src: url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.eot?#iefix") - format("embedded-opentype"), - url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.woff2") format("woff2"), - url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.woff") format("woff"), - url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.ttf") format("truetype"); - font-weight: bold; -} - -@font-face { - font-family: sahel-light; - src: url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.eot"); - src: url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.eot?#iefix") - format("embedded-opentype"), - url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.woff2") format("woff2"), - url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.woff") format("woff"), - url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.ttf") format("truetype"); - font-weight: 300; -} - -@font-face { - font-family: sahel-semi-bold; - src: url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.eot"); - src: url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.eot?#iefix") - format("embedded-opentype"), - url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.woff2") format("woff2"), - url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.woff") format("woff"), - url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.ttf") format("truetype"); - font-weight: 600; -} - -@font-face { - font-family: sahel-black; - src: url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.eot"); - src: url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.eot?#iefix") - format("embedded-opentype"), - url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.woff2") format("woff2"), - url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.woff") format("woff"), - url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.ttf") format("truetype"); - font-weight: 900; -} - -// @font-face { -// font-family: sahel; -// src: url("../fonts/sahel/Sahel.ttf"); -// src: url("../fonts/sahel/Sahel.eot") format("embedded-opentype"), -// url("../fonts/sahel/Sahel.ttf") format("truetype"), -// url("../fonts/sahel/Sahel.woff") format("woff"); -// } - -// @font-face { -// font-family: "sahel-bold"; -// src: url("../fonts/sahel/Sahel-Bold.ttf"); -// src: url("../fonts/sahel/Sahel-Bold.eot") format("embedded-opentype"), -// url("../fonts/sahel/Sahel-Bold.woff") format("woff"); -// } - -// @font-face { -// font-family: "sahel-black"; -// src: url("../fonts/sahel/Sahel-Black.ttf"); -// src: url("../fonts/sahel/Sahel-Black.eot") format("embedded-opentype"), -// url("../fonts/sahel/Sahel-Black.woff") format("woff"); -// } - -// @font-face { -// font-family: "sahel-light"; -// src: url("../fonts/sahel/Sahel-Light.ttf"); -// } - -// @font-face { -// font-family: "sahel-semi-bold"; -// src: url("../fonts/sahel/Sahel-SemiBold.ttf"); -// } - -// anjoman - -// @font-face { -// font-family: 'Anjoman'; -// src: url('../fonts/anjoman/Anjoman-Medium/Anjoman-Medium.eot'); -// src: url('../fonts/anjoman/Anjoman-Medium/Anjoman-Medium.eot?2cp7ya#iefix') format('embedded-opentype'), -// url('../fonts/anjoman/Anjoman-Medium/Anjoman-Medium.ttf?2cp7ya') format('truetype'), -// url('../fonts/anjoman/Anjoman-Medium/Anjoman-Medium.woff?2cp7ya') format('woff'), -// } -.sahel-semi-bold { - font-family: sahel-semi-bold; -} -.sahel-bold { - font-family: sahel-bold; -} -.sahel-light { - font-family: sahel-light; -} -.sahel-black { - font-family: sahel-black; -} diff --git a/assets/common/scss/_sahel.scss b/assets/common/scss/_sahel.scss new file mode 100644 index 0000000..67a51dd --- /dev/null +++ b/assets/common/scss/_sahel.scss @@ -0,0 +1,67 @@ +@font-face { + font-family: sahel; + src: url("../fonts/sahel/Farsi-Digits/Sahel-FD.eot"); + src: url("../fonts/sahel/Farsi-Digits/Sahel-FD.eot?#iefix") + format("embedded-opentype"), + url("../fonts/sahel/Farsi-Digits/Sahel-FD.woff2") format("woff2"), + url("../fonts/sahel/Farsi-Digits/Sahel-FD.woff") format("woff"), + url("../fonts/sahel/Farsi-Digits/Sahel-FD.ttf") format("truetype"); + font-weight: normal; +} + +@font-face { + font-family: sahel-bold; + src: url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.eot"); + src: url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.eot?#iefix") + format("embedded-opentype"), + url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.woff2") format("woff2"), + url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.woff") format("woff"), + url("../fonts/sahel/Farsi-Digits/Sahel-Bold-FD.ttf") format("truetype"); + font-weight: bold; +} + +@font-face { + font-family: sahel-light; + src: url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.eot"); + src: url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.eot?#iefix") + format("embedded-opentype"), + url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.woff2") format("woff2"), + url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.woff") format("woff"), + url("../fonts/sahel/Farsi-Digits/Sahel-Light-FD.ttf") format("truetype"); + font-weight: 300; +} + +@font-face { + font-family: sahel-semi-bold; + src: url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.eot"); + src: url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.eot?#iefix") + format("embedded-opentype"), + url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.woff2") format("woff2"), + url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.woff") format("woff"), + url("../fonts/sahel/Farsi-Digits/Sahel-SemiBold-FD.ttf") format("truetype"); + font-weight: 600; +} + +@font-face { + font-family: sahel-black; + src: url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.eot"); + src: url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.eot?#iefix") + format("embedded-opentype"), + url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.woff2") format("woff2"), + url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.woff") format("woff"), + url("../fonts/sahel/Farsi-Digits/Sahel-Black-FD.ttf") format("truetype"); + font-weight: 900; +} + +.sahel-semi-bold { + font-family: sahel-semi-bold; +} +.sahel-bold { + font-family: sahel-bold; +} +.sahel-light { + font-family: sahel-light; +} +.sahel-black { + font-family: sahel-black; +} diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css deleted file mode 100644 index eee7236..0000000 --- a/assets/css/tailwind.css +++ /dev/null @@ -1,12 +0,0 @@ -/* @import "tailwindcss/tailwind.css"; */ - -@import "tailwindcss"; -@import "@nuxt/ui"; - -@theme { - --font-sans: "Public Sans", sans-serif; -} -/* @variant { - -} */ -/* @source */ \ No newline at end of file diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..5cad894 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/events/readme.md b/contents/server/events/readme.md similarity index 100% rename from server/events/readme.md rename to contents/server/events/readme.md diff --git a/server/middleware/readme.md b/contents/server/middleware/readme.md similarity index 100% rename from server/middleware/readme.md rename to contents/server/middleware/readme.md diff --git a/server/plugins/readme.md b/contents/server/plugins/readme.md similarity index 100% rename from server/plugins/readme.md rename to contents/server/plugins/readme.md diff --git a/server/readme.md b/contents/server/readme.md similarity index 100% rename from server/readme.md rename to contents/server/readme.md diff --git a/server/utils/readme.md b/contents/server/utils/readme.md similarity index 100% rename from server/utils/readme.md rename to contents/server/utils/readme.md diff --git a/nuxt.config.ts b/nuxt.config.ts index 8e158f1..7768c70 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,4 +1,6 @@ // import { fileURLToPath } from "url"; +import fs from 'fs-extra'; +import path from 'path'; let sassEnvVariables = ""; for (let e in import.meta.env) { @@ -12,10 +14,23 @@ const buildName = import.meta.env.VITE_BUILD_NAME; let mainStyle = `~/assets/common/scss/${buildName}-styles.scss`; if (buildName == "hadith") - mainStyle = `~/systems/${buildName}_ui/assets/${buildName}/scss/${buildName}.scss`; + mainStyle = `~/systems/${buildName}_ui/assets/${buildName}/scss/${buildName}.css`; export default defineNuxtConfig({ hooks: { + 'build:before': () => { + const sourceDir = path.resolve(__dirname, `systems/${buildName}_ui/assets/${buildName}/images`); // Source folder (e.g., assets/images) + const targetDir = path.resolve(__dirname, 'public/img'); // Target folder (e.g., public/images) + + // Ensure the target directory exists + fs.ensureDirSync(targetDir); + + // Copy files from source to target + fs.copySync(sourceDir, targetDir); + + console.log('Files copied successfully!'); + }, + "pages:extend"(pages) { // Add custom routes pages.push( @@ -122,6 +137,7 @@ export default defineNuxtConfig({ // mode: 'init' // }, image: { + inject: true, quality: 80, format: ["webp", "jpeg", "jpg", "png", "gif", "avif"], @@ -170,8 +186,7 @@ export default defineNuxtConfig({ }, css: [ mainStyle, - "~/assets/css/tailwind.css", - "vue3-persian-datetime-picker/src/picker/assets/scss/style.scss", + // "vue3-persian-datetime-picker/src/picker/assets/scss/style.scss", ], alias: { "@apis": "~/apis", diff --git a/package-lock.json b/package-lock.json index 96b3f9e..4ce424d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "export-from-json": "^1.7.4", "file-saver": "^2.0.5", "floating-vue": "^5.2.2", + "fs-extra": "^11.3.0", "i18next-browser-languagedetector": "^8.0.0", "i18next-vue": "^5.0.0", "jalali-moment": "^3.3.11", @@ -8774,9 +8775,9 @@ "optional": true }, "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", diff --git a/package.json b/package.json index a1f1dd3..617ddf3 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "export-from-json": "^1.7.4", "file-saver": "^2.0.5", "floating-vue": "^5.2.2", + "fs-extra": "^11.3.0", "i18next-browser-languagedetector": "^8.0.0", "i18next-vue": "^5.0.0", "jalali-moment": "^3.3.11", diff --git a/public/img/background.png b/public/img/background.png new file mode 100644 index 0000000..7ec7756 Binary files /dev/null and b/public/img/background.png differ diff --git a/public/img/background.svg b/public/img/background.svg new file mode 100644 index 0000000..82fef6b --- /dev/null +++ b/public/img/background.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/chevron-down.svg b/public/img/chevron-down.svg new file mode 100644 index 0000000..69abfa2 --- /dev/null +++ b/public/img/chevron-down.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/img/logo.svg b/public/img/logo.svg new file mode 100644 index 0000000..5cad894 --- /dev/null +++ b/public/img/logo.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/stores/commonStore.ts b/stores/commonStore.ts index 8d3b6b7..4fa93c7 100644 --- a/stores/commonStore.ts +++ b/stores/commonStore.ts @@ -22,12 +22,16 @@ import type { import type { researchTerms } from "~/types/researchTypes"; import type { ActiveEntityViewSchema, ActiveTab } from "~/types/entityType"; +import type { Domain } from "~/types/searchTypes"; export const useCommonStore = defineStore("commonStore", { persist: { storage: piniaPluginPersistedstate.localStorage(), }, state: () => ({ + // from search + domainActive: undefined as Domain | undefined, + diffType: undefined, activeTab: undefined as ActiveTab | undefined, @@ -82,6 +86,11 @@ export const useCommonStore = defineStore("commonStore", { sidebarMenu: {}, }), getters: { + // from search + domainActiveGetter(state) { + return state.domainActive; + }, + diffTypeGetter(diffType) { return diffType; }, @@ -136,6 +145,10 @@ export const useCommonStore = defineStore("commonStore", { isShowHilightGetter: (state) => state.isShowHilight, }, actions: { + // from search + domainActiveSetter(domain = undefined) { + this.domainActive = domain; + }, diffTypeSetter(diffType) { this.diffType = diffType; }, diff --git a/systems/hadith_ui b/systems/hadith_ui index d1bab36..631e6cc 160000 --- a/systems/hadith_ui +++ b/systems/hadith_ui @@ -1 +1 @@ -Subproject commit d1bab369112740397eadb89aa3439b713aafad64 +Subproject commit 631e6cce32be9fb2ffe572fe35e5543d3597ba80 diff --git a/systems/search_ui b/systems/search_ui index e70f3d7..79d854a 160000 --- a/systems/search_ui +++ b/systems/search_ui @@ -1 +1 @@ -Subproject commit e70f3d742249d7bc0ca196abe9c4a05303d01474 +Subproject commit 79d854a9912878646da9eba6a06eedb0bbd0bf90 diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..fee7a5f --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,24 @@ +module.exports = { + prefix: 'tw-', + content: [ + './components/**/*.{js,vue,ts}', + './layouts/**/*.vue', + './pages/**/*.vue', + './plugins/**/*.{js,ts}', + './nuxt.config.{js,ts}', + ], + theme: { + extend: {}, + }, + plugins: [], + purge: { + enabled: process.env.NODE_ENV === 'production', + content: [ + './components/**/*.{js,vue,ts}', + './layouts/**/*.vue', + './pages/**/*.vue', + './plugins/**/*.{js,ts}', + './nuxt.config.{js,ts}', + ], + }, + }; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 89bb1a8..725c4a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4166,10 +4166,10 @@ fs-constants@^1.0.0: resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^11.1.0, fs-extra@^11.2.0: - version "11.2.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz" - integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== +fs-extra@^11.1.0, fs-extra@^11.2.0, fs-extra@^11.3.0: + version "11.3.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz" + integrity sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1"