Add rich HTML course lead/body and refresh AI course media from delivery v2.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled

Course detail pages can show sanitized HTML ad copy under the hero and a structured body; posters and brochures are updated for both AI workshops.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
smhk1376andCursor committed 2026-10-20 00:54:30 +03:30
1 parent afd2b3333c
commit bd2cfa5a26
26 files changed
+801 -30

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
-- Rich HTML fields for course detail: ad lead under hero title + main body.
ALTER TABLE courses
ADD COLUMN IF NOT EXISTS lead_html TEXT NOT NULL DEFAULT '',
ADD COLUMN IF NOT EXISTS body_html TEXT NOT NULL DEFAULT '';
+2 -1
View File
@@ -121,7 +121,8 @@ async function main() {
await upsert("courses", courses.map(courseToRow), [
"id", "slug", "title", "summary", "duration_hours", "format", "price",
"registration_url", "poster_image_url", "brochure_image_url", "image_url", "seo_description", "published",
"registration_url", "poster_image_url", "brochure_image_url", "image_url",
"lead_html", "body_html", "seo_description", "published",
]);
const courseIds = courses.map((c) => c.id);
await client.query(
+512 -1
View File
@@ -12,6 +12,7 @@
"class-variance-authority": "^0.7.1",
"cn": "^0.3.2",
"embla-carousel-react": "^8.6.0",
"isomorphic-dompurify": "^4.6.0",
"lucide-react": "^1.47.0",
"next": "16.3.5",
"next-intl": "^4.14.6",
@@ -25,6 +26,7 @@
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/dompurify": "^3.0.5",
"@types/node": "^20",
"@types/pg": "^8.23.1",
"@types/react": "^19",
@@ -49,6 +51,55 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@asamuzakjp/css-color": {
"version": "7.1.7",
"resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-7.1.7.tgz",
"integrity": "sha512-Q7ioeear07HwixdIitIn9KS1LZi97CEDFCSjPNm9v+y8KNbsu9q4Lrd4zUQW4faED+E7qxvfeVnbNRW46wFKuw==",
"license": "MIT",
"dependencies": {
"@csstools/css-calc": "^3.4.3",
"@csstools/css-color-parser": "^4.2.6",
"@csstools/css-parser-algorithms": "^4.0.2",
"@csstools/css-tokenizer": "^4.0.2",
"lru-cache": "^11.5.3"
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
}
},
"node_modules/@asamuzakjp/css-color/node_modules/lru-cache": {
"version": "11.5.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
"integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/@asamuzakjp/dom-selector": {
"version": "10.0.4",
"resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-10.0.4.tgz",
"integrity": "sha512-A6f1nKy99I6tyoK82U6kBHvQQZmdHmTmPzJYPY/0eaOW0r8/qPmEOwjGHs+hL/vCgOwQTupu4LT1XtXNUuDruA==",
"license": "MIT",
"dependencies": {
"bidi-js": "^1.1.0",
"css-tree": "^3.2.1",
"is-potential-custom-element-name": "^1.0.1",
"lru-cache": "^11.5.3"
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
}
},
"node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": {
"version": "11.5.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
"integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/@babel/code-frame": {
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
@@ -523,6 +574,152 @@
}
}
},
"node_modules/@bramus/specificity": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.3.tgz",
"integrity": "sha512-0GEz8qJWokkUVYQYRukmkSHIFNoBH8QTreeHrAFbvz1XFYc3Y+puhMs8PQ5x8GNugiC2l5jvDBXKLbBIByeSBw==",
"license": "MIT",
"dependencies": {
"css-tree": "^3.2.1"
},
"bin": {
"specificity": "bin/cli.js"
}
},
"node_modules/@csstools/color-helpers": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.2.tgz",
"integrity": "sha512-grhRy3OKmniaAEKXMjua5z/EODX0MSqBGjunw8+j/3HQjOnahs2AGhvEOIYVUWcU6ScApbhLhVrQTX8XqrMrow==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"license": "MIT-0",
"engines": {
"node": ">=20.19.0"
}
},
"node_modules/@csstools/css-calc": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.4.3.tgz",
"integrity": "sha512-iex20d8CHVkyvg6B7UKV7uHnI2Bqo9g+EFfT9E0y+GvTvhZ/DwONJ+9aKb1dlqm0ZiGsL5RXjp0fCoJYnkeDjA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"license": "MIT",
"engines": {
"node": ">=20.19.0"
},
"peerDependencies": {
"@csstools/css-parser-algorithms": "^4.0.2",
"@csstools/css-tokenizer": "^4.0.2"
}
},
"node_modules/@csstools/css-color-parser": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.6.tgz",
"integrity": "sha512-iiPQ3iRWwnJkeEn6RIu6SJPr7hYrLz6XZ9s/QZl+2/LI5KQVjpl2fdmDSZKuD4xP6GMmMPgHFFXg6k1Wkz0Trg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"license": "MIT",
"dependencies": {
"@csstools/color-helpers": "^6.1.2",
"@csstools/css-calc": "^3.4.3"
},
"engines": {
"node": ">=20.19.0"
},
"peerDependencies": {
"@csstools/css-parser-algorithms": "^4.0.2",
"@csstools/css-tokenizer": "^4.0.2"
}
},
"node_modules/@csstools/css-parser-algorithms": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.2.tgz",
"integrity": "sha512-40cSKyMvK+tq4qz6Awrlye2WGuOKt3FwPgtGg6KTfbHOWNw+Rk1rzbAtZnZ6IBhsY491HLRnDXwoyBAijmmILA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"license": "MIT",
"engines": {
"node": ">=20.19.0"
},
"peerDependencies": {
"@csstools/css-tokenizer": "^4.0.2"
}
},
"node_modules/@csstools/css-syntax-patches-for-csstree": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.15.tgz",
"integrity": "sha512-J0u7HkVl2nzSlhsiTOp4AmwcUQ3D+mGEEKfBy/7To5/y7F2OHwyLrXfrhR0SMgr4p5Lo+eaMVSeai24zUcBIxA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"license": "MIT-0",
"peerDependencies": {
"css-tree": "^3.2.1"
},
"peerDependenciesMeta": {
"css-tree": {
"optional": true
}
}
},
"node_modules/@csstools/css-tokenizer": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.2.tgz",
"integrity": "sha512-OoKoR0f76dCY666JlcbhmVTs2drYj1GUXZTYTcbUgJjh9Nv41aFfZ21bPQTERm5+L5cBDo466NltB2lplS5GBw==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"license": "MIT",
"engines": {
"node": ">=20.19.0"
}
},
"node_modules/@dotenvx/dotenvx": {
"version": "1.75.1",
"resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.75.1.tgz",
@@ -959,6 +1156,23 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@exodus/bytes": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.16.0.tgz",
"integrity": "sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==",
"license": "MIT",
"engines": {
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
},
"peerDependencies": {
"@noble/hashes": "^1.8.0 || ^2.0.0"
},
"peerDependenciesMeta": {
"@noble/hashes": {
"optional": true
}
}
},
"node_modules/@floating-ui/core": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.8.0.tgz",
@@ -2995,6 +3209,16 @@
"tslib": "^2.4.0"
}
},
"node_modules/@types/dompurify": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz",
"integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/trusted-types": "*"
}
},
"node_modules/@types/estree": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
@@ -3058,6 +3282,13 @@
"@types/react": "^19.3.0"
}
},
"node_modules/@types/trusted-types": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
"devOptional": true,
"license": "MIT"
},
"node_modules/@types/validate-npm-package-name": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",
@@ -4118,6 +4349,15 @@
"node": ">=6.0.0"
}
},
"node_modules/bidi-js": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz",
"integrity": "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==",
"license": "MIT",
"dependencies": {
"require-from-string": "^2.0.2"
}
},
"node_modules/body-parser": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
@@ -4621,6 +4861,19 @@
"node": ">= 8"
}
},
"node_modules/css-tree": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz",
"integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==",
"license": "MIT",
"dependencies": {
"mdn-data": "2.27.1",
"source-map-js": "^1.2.1"
},
"engines": {
"node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
}
},
"node_modules/cssesc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
@@ -4647,6 +4900,19 @@
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/data-urls": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-8.0.0.tgz",
"integrity": "sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==",
"license": "MIT",
"dependencies": {
"whatwg-mimetype": "^5.0.0",
"whatwg-url": "^17.1.2"
},
"engines": {
"node": "^22.14.0 || >=24.0.0"
}
},
"node_modules/data-view-buffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
@@ -4733,6 +4999,12 @@
}
}
},
"node_modules/decimal.js": {
"version": "10.6.0",
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
"license": "MIT"
},
"node_modules/dedent": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz",
@@ -4879,6 +5151,15 @@
"node": ">=0.10.0"
}
},
"node_modules/dompurify": {
"version": "3.4.17",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.17.tgz",
"integrity": "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==",
"license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
}
},
"node_modules/dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
@@ -5003,6 +5284,18 @@
"node": ">=8.6"
}
},
"node_modules/entities": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz",
"integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=20.19.0"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/env-paths": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
@@ -6360,6 +6653,18 @@
"node": ">=16.9.0"
}
},
"node_modules/html-encoding-sniffer": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-7.0.0.tgz",
"integrity": "sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==",
"license": "MIT",
"dependencies": {
"@exodus/bytes": "^1.15.1"
},
"engines": {
"node": "^22.13.0 || >=24.0.0"
}
},
"node_modules/http-errors": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
@@ -6886,6 +7191,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-potential-custom-element-name": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",
"license": "MIT"
},
"node_modules/is-promise": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
@@ -7101,6 +7412,19 @@
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"license": "ISC"
},
"node_modules/isomorphic-dompurify": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/isomorphic-dompurify/-/isomorphic-dompurify-4.6.0.tgz",
"integrity": "sha512-ZLYxxq2efNUsaUMViQXML/HMBkaJSd8WAFcNJQfWOGi+KLGQyZA8Ewpcj7yWur6KzMHlrZNXTXr8trbx/bkZRw==",
"license": "MIT",
"dependencies": {
"dompurify": "^3.4.17",
"jsdom": "^30.1.3"
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
}
},
"node_modules/iterator.prototype": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",
@@ -7166,6 +7490,63 @@
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/jsdom": {
"version": "30.1.3",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.3.tgz",
"integrity": "sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==",
"license": "MIT",
"dependencies": {
"@asamuzakjp/css-color": "^7.1.3",
"@asamuzakjp/dom-selector": "^10.0.3",
"@bramus/specificity": "^2.4.2",
"@csstools/css-syntax-patches-for-csstree": "^1.1.15",
"@exodus/bytes": "^1.16.0",
"css-tree": "^3.2.1",
"data-urls": "^8.0.0",
"decimal.js": "^10.6.0",
"html-encoding-sniffer": "^7.0.0",
"is-potential-custom-element-name": "^1.0.1",
"lru-cache": "^11.5.3",
"parse5": "^8.0.1",
"saxes": "^6.0.0",
"tough-cookie": "^6.0.2",
"undici": "^8.12.1",
"w3c-xmlserializer": "^6.0.0",
"webidl-conversions": "^8.0.1",
"whatwg-mimetype": "^5.0.0",
"whatwg-url": "^17.2.0",
"xml-name-validator": "^5.0.0"
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"peerDependencies": {
"canvas": "^3.2.3"
},
"peerDependenciesMeta": {
"canvas": {
"optional": true
}
}
},
"node_modules/jsdom/node_modules/lru-cache": {
"version": "11.5.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
"integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/jsdom/node_modules/undici": {
"version": "8.12.3",
"resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz",
"integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==",
"license": "MIT",
"engines": {
"node": ">=22.19.0"
}
},
"node_modules/jsesc": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
@@ -7696,6 +8077,12 @@
"node": ">= 0.4"
}
},
"node_modules/mdn-data": {
"version": "2.27.1",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz",
"integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==",
"license": "CC0-1.0"
},
"node_modules/media-typer": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.1.tgz",
@@ -8447,6 +8834,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse5": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz",
"integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==",
"license": "MIT",
"dependencies": {
"entities": "^8.0.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -8875,7 +9274,6 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -9244,6 +9642,18 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
"node_modules/saxes": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
"integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
"license": "ISC",
"dependencies": {
"xmlchars": "^2.2.0"
},
"engines": {
"node": ">=v12.22.7"
}
},
"node_modules/scheduler": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
@@ -10125,6 +10535,24 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/tldts": {
"version": "7.4.18",
"resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.18.tgz",
"integrity": "sha512-somxA8xKAUzlAxl0TX/jMSYIbRNFIVGnI96pVGJPeMc5BsHmfVXn6mOJT6U++ELnl04eGfzpfcEuZe8WiASkXg==",
"license": "MIT",
"dependencies": {
"tldts-core": "^7.4.18"
},
"bin": {
"tldts": "bin/cli.js"
}
},
"node_modules/tldts-core": {
"version": "7.4.18",
"resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.18.tgz",
"integrity": "sha512-KI2PKvCmvQI/xD6ypPqkU0i7oxNXR/O58RLRaHR4svsgVUQ2JE/XC8BtMbG6PSehD27I8sZJRcC1ASnCy6lp3g==",
"license": "MIT"
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -10146,6 +10574,30 @@
"node": ">=0.6"
}
},
"node_modules/tough-cookie": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.2.tgz",
"integrity": "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==",
"license": "BSD-3-Clause",
"dependencies": {
"tldts": "^7.0.5"
},
"engines": {
"node": ">=16"
}
},
"node_modules/tr46": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-7.0.0.tgz",
"integrity": "sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==",
"license": "MIT",
"dependencies": {
"punycode": "^2.3.1"
},
"engines": {
"node": "^22.14.0 || >=24.0.0"
}
},
"node_modules/ts-api-utils": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
@@ -10572,6 +11024,50 @@
"integrity": "sha512-fbjNc0CMjazZpIegWzz9OHGzI1APFboT+x7ZecXlUCtDe/nkyx7gtCTZnWS/+eeXG7fbfXymCPKJI8EsnM3iqw==",
"license": "OFL"
},
"node_modules/w3c-xmlserializer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-6.0.0.tgz",
"integrity": "sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==",
"license": "MIT",
"dependencies": {
"xml-name-validator": "^5.0.0"
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
}
},
"node_modules/webidl-conversions": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz",
"integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=20"
}
},
"node_modules/whatwg-mimetype": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz",
"integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==",
"license": "MIT",
"engines": {
"node": ">=20"
}
},
"node_modules/whatwg-url": {
"version": "17.3.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-17.3.0.tgz",
"integrity": "sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==",
"license": "MIT",
"dependencies": {
"@exodus/bytes": "^1.16.0",
"tr46": "^7.0.0",
"webidl-conversions": "^8.0.1"
},
"engines": {
"node": "^22.14.0 || >=24.0.0"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@@ -10720,6 +11216,21 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/xml-name-validator": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz",
"integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
}
},
"node_modules/xmlchars": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
"license": "MIT"
},
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+2
View File
@@ -17,6 +17,7 @@
"class-variance-authority": "^0.7.1",
"cn": "^0.3.2",
"embla-carousel-react": "^8.6.0",
"isomorphic-dompurify": "^4.6.0",
"lucide-react": "^1.47.0",
"next": "16.3.5",
"next-intl": "^4.14.6",
@@ -30,6 +31,7 @@
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/dompurify": "^3.0.5",
"@types/node": "^20",
"@types/pg": "^8.23.1",
"@types/react": "^19",
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 KiB

After

Width:  |  Height:  |  Size: 698 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 KiB

After

Width:  |  Height:  |  Size: 769 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 6.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 KiB

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 4.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 KiB

After

Width:  |  Height:  |  Size: 625 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 4.6 MiB

+2
View File
@@ -43,6 +43,8 @@ const COURSE_COLUMNS: Record<string, string> = {
registrationUrl: "registration_url",
posterImageUrl: "poster_image_url",
brochureImageUrl: "brochure_image_url",
leadHtml: "lead_html",
bodyHtml: "body_html",
seoDescription: "seo_description",
published: "published",
};
+5 -2
View File
@@ -64,8 +64,9 @@ export async function POST(request: NextRequest) {
await query(
`INSERT INTO courses
(id, slug, title, summary, duration_hours, format, price,
registration_url, poster_image_url, brochure_image_url, image_url, seo_description, published)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13)`,
registration_url, poster_image_url, brochure_image_url, image_url,
lead_html, body_html, seo_description, published)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15)`,
[
id,
d.slug,
@@ -78,6 +79,8 @@ export async function POST(request: NextRequest) {
d.posterImageUrl,
d.brochureImageUrl,
d.posterImageUrl,
d.leadHtml,
d.bodyHtml,
d.seoDescription,
d.published,
],
+10 -4
View File
@@ -1,3 +1,4 @@
import type { ReactNode } from "react";
import Image from "next/image";
import { Container } from "@/components/atoms/Container";
import { Heading } from "@/components/atoms/Heading";
@@ -14,7 +15,8 @@ export function PageHero({
showField = true,
}: {
title: string;
intro?: string;
/** Plain string or rich content (e.g. sanitized HTML) under the title. */
intro?: ReactNode;
eyebrow?: string;
imageUrl?: string;
actions?: React.ReactNode;
@@ -71,9 +73,13 @@ export function PageHero({
{title}
</Heading>
{intro ? (
<p className="mt-5 max-w-2xl border-t border-secondary/50 pt-5 text-base leading-7 text-pretty text-primary-foreground/70 sm:text-lg sm:leading-8">
{intro}
</p>
<div className="mt-5 max-w-2xl border-t border-secondary/50 pt-5 text-pretty text-primary-foreground/70">
{typeof intro === "string" ? (
<p className="text-base leading-7 sm:text-lg sm:leading-8">{intro}</p>
) : (
intro
)}
</div>
) : null}
{actions ? (
<div className="mt-8 flex flex-wrap gap-3">{actions}</div>
@@ -0,0 +1,53 @@
import { cn } from "@/lib/utils";
import { sanitizeCourseHtml } from "@/lib/sanitize-html";
type RichHtmlTone = "default" | "onPrimary";
const toneClass: Record<RichHtmlTone, string> = {
default: cn(
"max-w-none text-base leading-7 text-foreground/90",
"[&_h2]:mt-8 [&_h2]:mb-3 [&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground",
"[&_h3]:mt-6 [&_h3]:mb-2 [&_h3]:text-base [&_h3]:font-bold [&_h3]:text-foreground",
"[&_h4]:mt-4 [&_h4]:mb-2 [&_h4]:text-sm [&_h4]:font-semibold",
"[&_p]:mb-3 [&_p:last-child]:mb-0",
"[&_ul]:my-3 [&_ul]:list-disc [&_ul]:ps-5 [&_ul]:space-y-1.5",
"[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:ps-5 [&_ol]:space-y-1.5",
"[&_li]:leading-7",
"[&_a]:font-medium [&_a]:text-primary [&_a]:underline [&_a]:underline-offset-4",
"[&_strong]:font-semibold [&_strong]:text-foreground",
"[&_hr]:my-6 [&_hr]:border-border",
),
onPrimary: cn(
"max-w-none text-base leading-7 text-primary-foreground/75 sm:text-lg sm:leading-8",
"[&_h2]:mt-4 [&_h2]:mb-2 [&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-primary-foreground",
"[&_h3]:mt-3 [&_h3]:mb-2 [&_h3]:text-base [&_h3]:font-bold [&_h3]:text-primary-foreground",
"[&_p]:mb-3 [&_p:last-child]:mb-0",
"[&_ul]:my-3 [&_ul]:list-disc [&_ul]:ps-5 [&_ul]:space-y-1.5",
"[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:ps-5 [&_ol]:space-y-1.5",
"[&_li]:leading-7",
"[&_a]:font-medium [&_a]:text-secondary [&_a]:underline [&_a]:underline-offset-4",
"[&_strong]:font-semibold [&_strong]:text-primary-foreground",
"[&_br]:leading-8",
),
};
/** Renders sanitized HTML with typography styles. */
export function RichHtmlContent({
html,
tone = "default",
className,
}: {
html: string;
tone?: RichHtmlTone;
className?: string;
}) {
const clean = sanitizeCourseHtml(html);
if (!clean) return null;
return (
<div
className={cn(toneClass[tone], className)}
dangerouslySetInnerHTML={{ __html: clean }}
/>
);
}
@@ -37,6 +37,8 @@ type Payload = {
registrationUrl: string;
posterImageUrl: string;
brochureImageUrl: string;
leadHtml: string;
bodyHtml: string;
seoDescription: string;
published: boolean;
};
@@ -73,6 +75,8 @@ export function CourseForm({
registrationUrl: initial?.registrationUrl ?? "/register/",
posterImageUrl: initial?.posterImageUrl ?? "",
brochureImageUrl: initial?.brochureImageUrl ?? "",
leadHtml: initial?.leadHtml ?? "",
bodyHtml: initial?.bodyHtml ?? "",
seoDescription: initial?.seoDescription ?? "",
published: initial?.published ?? true,
});
@@ -176,7 +180,7 @@ export function CourseForm({
/>
</div>
<div className="space-y-1.5 sm:col-span-2">
<Label htmlFor="summary">خلاصه *</Label>
<Label htmlFor="summary">خلاصه کارت *</Label>
<Textarea
id="summary"
value={form.summary}
@@ -184,6 +188,33 @@ export function CourseForm({
required
rows={3}
/>
<p className="text-xs text-muted-foreground">
متن کوتاه برای کارت‌های فهرست؛ آگهی زیر عنوان جداگانه است.
</p>
</div>
<div className="space-y-1.5 sm:col-span-2">
<Label htmlFor="leadHtml">آگهی زیر عنوان (HTML)</Label>
<Textarea
id="leadHtml"
value={form.leadHtml}
onChange={(e) => set("leadHtml", e.target.value)}
rows={8}
className="font-mono text-xs"
placeholder="<p><strong>شعار</strong></p><p>متن آگهی…</p>"
dir="ltr"
/>
</div>
<div className="space-y-1.5 sm:col-span-2">
<Label htmlFor="bodyHtml">بدنه دوره (HTML)</Label>
<Textarea
id="bodyHtml"
value={form.bodyHtml}
onChange={(e) => set("bodyHtml", e.target.value)}
rows={12}
className="font-mono text-xs"
placeholder="<h2>درباره</h2><p>…</p><h2>سرفصل‌ها</h2><ol><li>…</li></ol>"
dir="ltr"
/>
</div>
</div>
</section>
@@ -7,6 +7,7 @@ import { TextLink } from "@/components/atoms/TextLink";
import { CourseMediaFigure } from "@/components/molecules/CourseMediaFigure";
import { DetailList, type DetailItem } from "@/components/molecules/DetailList";
import { PageHero } from "@/components/molecules/PageHero";
import { RichHtmlContent } from "@/components/molecules/RichHtmlContent";
import { SurfaceCard } from "@/components/molecules/SurfaceCard";
import { CourseRegisterGate } from "@/components/organisms/CourseRegisterGate";
import { Badge } from "@/components/ui/badge";
@@ -64,13 +65,20 @@ export function CourseDetailTemplate({
];
const hasTaxonomy = course.categories.length > 0 || course.tags.length > 0;
const brochureUrl = course.brochureImageUrl?.trim() || undefined;
const leadHtml = course.leadHtml?.trim() ?? "";
const bodyHtml = course.bodyHtml?.trim() ?? "";
const heroIntro = leadHtml ? (
<RichHtmlContent html={leadHtml} tone="onPrimary" />
) : (
course.summary
);
return (
<main id="main-content">
<JsonLd data={courseJsonLd(course)} />
<PageHero
title={course.title}
intro={course.summary}
intro={heroIntro}
eyebrow={course.categories[0]?.label ?? course.tags[0]?.label}
/>
@@ -87,14 +95,20 @@ export function CourseDetailTemplate({
/>
) : null}
<section className="space-y-4">
<Heading level={3} as="h2">
{labels.aboutTitle}
</Heading>
<p className="text-base leading-7 text-foreground/90">
{course.seoDescription || course.summary}
</p>
</section>
{bodyHtml || course.seoDescription ? (
<section className="space-y-4">
<Heading level={3} as="h2">
{labels.aboutTitle}
</Heading>
{bodyHtml ? (
<RichHtmlContent html={bodyHtml} />
) : (
<p className="text-base leading-7 text-foreground/90">
{course.seoDescription}
</p>
)}
</section>
) : null}
{hasTaxonomy ? (
<section className="space-y-4">
+6
View File
@@ -50,6 +50,8 @@ export interface CourseRow {
poster_image_url: string;
brochure_image_url: string;
image_url?: string;
lead_html?: string;
body_html?: string;
seo_description: string;
published: boolean;
/** Present when SELECT aggregates taxonomy as JSON. */
@@ -72,6 +74,8 @@ export function courseToRow(course: Course): CourseRow {
poster_image_url: course.posterImageUrl ?? "",
brochure_image_url: course.brochureImageUrl ?? "",
image_url: course.posterImageUrl ?? "",
lead_html: course.leadHtml ?? "",
body_html: course.bodyHtml ?? "",
seo_description: course.seoDescription,
published: true,
};
@@ -381,6 +385,8 @@ export function rowToCourse(row: CourseRow): Course {
// Banner and brochure stay distinct; do not reuse image_url as brochure.
posterImageUrl: row.poster_image_url || row.image_url || "",
brochureImageUrl: row.brochure_image_url || "",
leadHtml: row.lead_html ?? "",
bodyHtml: row.body_html ?? "",
seoDescription: row.seo_description,
};
}
+82
View File
@@ -0,0 +1,82 @@
/** Rich HTML fragments from delivery/v2 (article body only; no page chrome / h1). */
export const AI_FLUENCY_LEAD_HTML = `
<p><strong>از یک دستور دقیق تا سبک کاری حرفه ای متمایز</strong></p>
<p>پاسخ های کلی هوش مصنوعی را به خروجی قابل استفاده در کار تبدیل کنید. در این کارگاه شش ساعته، یاد می گیرید خواسته خود را دقیق بیان کنید، کیفیت پاسخ را هدایت کنید و دستورهای موثر را برای استفاده دوباره نگه دارید.</p>
<p>با مثال هایی از خرید، منابع انسانی و پشتیبانی، یک کاربرد کوچک را تمرین می کنید؛ از نوشتن Prompt تا تنظیم الگوهای کاری و تست دستیار شخصی. با تفاوت Chatbot، Workflow و Agent نیز آشنا می شوید و اجرای Agent را تا حد امکان، با نظارت انسان تجربه می کنید.</p>
<p><strong>با تدریس دکتر هراتی نیک و همراهی دستیاران صنعتی</strong><br>مدت: ۶ ساعت</p>
<p>برگزارکننده: مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر</p>
`.trim();
export const AI_FLUENCY_BODY_HTML = `
<h2>درباره کارگاه</h2>
<p>هوش مصنوعی امروز یک ابزار کار لازم است؛ برای استفاده موثر از آن باید بدانید چه بخواهید، چگونه هدایتش کنید و چگونه خروجی مفید بگیرید. در این کارگاه، از Prompt شروع می کنیم، با Skills دستورها و قواعد هر کار را برای استفاده مجدد تنظیم می کنیم و به سمت دستیار هوشمند شخصی پیش می رویم.</p>
<p>با ابزارهای رایگان و در دسترس عموم، یک کاربرد کوچک را با مثال هایی از خرید، منابع انسانی و پشتیبانی تست می کنید. در ادامه، تفاوت Workflow و Agent را می شناسید؛ تجربه اجرای Agent نیز تا حد امکان، با Tool عمومی و نظارت انسان دنبال می شود.</p>
<p>اول یک تجربه واقعی؛ بعد راهکاری متناسب با نیاز شما.</p>
<h2>سرفصل های کارگاه</h2>
<ol>
<li><strong>اصول پایه Prompt:</strong> دقیق کردن هدف، زمینه، منبع و قالب خروجی.</li>
<li><strong>Prompt حرفه ای:</strong> تعیین نقش، لحن و حدود پاسخ با Role، Persona و Guardrail.</li>
<li><strong>Skills و Prompt Card:</strong> تنظیم دستورها و قواعد هر کار برای استفاده مجدد.</li>
<li><strong>دستیار شخصی · Chatbot:</strong> تست دستیار با دستور ثابت و دانش محدود.</li>
<li><strong>از دستیار تا Agent:</strong> شناخت Workflow و Agent و تجربه اجرا تا حد امکان.</li>
</ol>
<h2>دستاوردهای کارگاه</h2>
<ul>
<li>تست یک کاربرد حداقلی با ابزار رایگان.</li>
<li>نوشتن دستورهای بهتر برای وظیفه مشخص خودتان.</li>
<li>شناخت Skills و قالب های قابل استفاده مجدد.</li>
<li>انتخاب سطح مناسب راه حل: Prompt، Chatbot یا Agent.</li>
</ul>
<p>نمایش و بررسی خروجی ها، جمع بندی و شناخت نیاز تخصصی نیز بخشی از برنامه کارگاه است.</p>
<h2>مشخصات کارگاه</h2>
<ul>
<li><strong>مدت:</strong> ۶ ساعت</li>
<li><strong>تاریخ برگزاری:</strong> با دانشکده در تماس باشید</li>
<li><strong>مدرس:</strong> دکتر هراتی نیک</li>
<li><strong>همراهان:</strong> دستیاران صنعتی</li>
<li><strong>برگزارکننده:</strong> مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر</li>
</ul>
`.trim();
export const AI_ORG_LEAD_HTML = `
<p><strong>از مسئله کسب و کار تا انتخاب مسیر تحول</strong></p>
<p>هوش مصنوعی در کدام بخش از کار سازمان شما می تواند ارزش ایجاد کند؟ شناخت کاربرد مناسب، آمادگی سازمان و الزامات اجرا، نقطه شروع یک تصمیم سنجیده است.</p>
<p>در این دوره دو روزه، تجربه های موفق را بررسی می کنیم، مسئله کسب و کار را به ارزش مورد انتظار پیوند می دهیم و نقش انسان و حاکمیت داده را در مسیر تحول روشن می کنیم. تجربه عملی نیز کمک می کند قابلیت ها و محدودیت های هوش مصنوعی را از نزدیک بشناسید.</p>
<p>با دید روشن تری درباره انتخاب کاربرد تصمیم بگیرید؛ کاربردی که با نیاز واقعی سازمان، کیفیت داده و نقش انسان در فرایند سازگار باشد.</p>
<p><strong>با تدریس دکتر هراتی نیک و همراهی دستیاران صنعتی</strong><br>تاریخ: ۴ و ۵ آذر ۱۴۰۵<br>مدت: دو روز<br>قیمت: ۲۱٬۵۰۰٬۰۰۰ تومان</p>
<p>برگزارکننده و محل برگزاری: مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر</p>
`.trim();
export const AI_ORG_BODY_HTML = `
<h2>درباره دوره</h2>
<p>فشار برای ورود هوش مصنوعی به سازمان، اغلب از وضوح درباره ارزش و الزامات آن جلوتر است. کدام کاربرد ارزش پیگیری دارد و سازمان برای بهره گیری از آن به چه تغییراتی نیاز دارد؟</p>
<p>دوره از آمادگی سازمان و تجربه های موفق آغاز می شود و با بررسی مسئله، نقش انسان و حاکمیت داده به تجربه عملی می رسد؛ تا انتخاب کاربرد بر نیاز واقعی سازمان استوار باشد.</p>
<p>هدف، قضاوت دقیق تر درباره ارزش، الزامات و تناسب کاربرد هوش مصنوعی است.</p>
<h2>محورهای دوره</h2>
<ol>
<li><strong>آماده سازی سازمان برای عصر AI:</strong> شناخت آمادگی ها و تغییرات لازم برای ورود سازمان به عصر AI.</li>
<li><strong>نمونه های کاربردی موفق و چشم اندازها:</strong> الهام از نمونه های کاربردی موفق برای دیدن فرصت های پیش رو و چشم انداز تحول.</li>
<li><strong>مسئله و ارزش سازمان:</strong> پیوند مسئله کسب و کار با ارزش مورد انتظار و روشن کردن نقش انسان در تصمیم، هدایت و نظارت.</li>
<li><strong>حاکمیت داده به عنوان الزام و شتابدهنده:</strong> شناخت نقش داده قابل اتکا و حاکمیت آن در کیفیت نتیجه و شتاب حرکت سازمان.</li>
<li><strong>انتخاب کاربرد مناسب و تجربه موفق:</strong> انتخاب راه حل متناسب با نیاز سازمان، همراه با تجربه عملی برای شناخت قابلیت ها و محدودیت ها.</li>
</ol>
<h2>دستاوردهای تجربه عملی</h2>
<ul>
<li><strong>تبدیل نیاز به خروجی روشن:</strong> بیان دقیق انتظار و سنجش تناسب پاسخ با نیاز کسب و کار.</li>
<li><strong>هدایت کیفیت و حدود پاسخ:</strong> شناخت شیوه هدایت هوش مصنوعی و حدود اتکا به خروجی آن.</li>
<li><strong>استفاده مجدد از تجربه های موفق:</strong> تبدیل دستورها و روش های موثر به الگوهای قابل تکرار در کار.</li>
<li><strong>شناخت کاربرد دستیارهای هوشمند:</strong> تجربه دستیار با اطلاعات مشخص و درک ظرفیت آن برای پشتیبانی از کار.</li>
<li><strong>درک ظرفیت واگذاری کار:</strong> شناخت تفاوت اجرای مراحل ثابت و عملکرد مستقل تر، با نظارت انسان.</li>
</ul>
<p><strong>حاصل دوره:</strong> زمینه مناسب شکل گیری نمونه کاربردهای درآمدآفرین مناسب AI با شناخت الزامات تحول موثر سازمانی.</p>
<h2>مشخصات دوره</h2>
<ul>
<li><strong>تاریخ برگزاری:</strong> ۴ و ۵ آذر ۱۴۰۵</li>
<li><strong>مدت:</strong> دو روز</li>
<li><strong>قیمت:</strong> ۲۱٬۵۰۰٬۰۰۰ تومان</li>
<li><strong>مدرس:</strong> دکتر هراتی نیک</li>
<li><strong>همراهان:</strong> دستیاران صنعتی</li>
<li><strong>برگزارکننده و محل برگزاری:</strong> مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر</li>
</ul>
`.trim();
+18 -7
View File
@@ -1,4 +1,10 @@
import type { Course, TaxonomyRef } from "@/lib/types";
import {
AI_FLUENCY_BODY_HTML,
AI_FLUENCY_LEAD_HTML,
AI_ORG_BODY_HTML,
AI_ORG_LEAD_HTML,
} from "@/lib/mock/course-rich-html";
const C = {
technology: {
@@ -56,36 +62,41 @@ export const courses: Course[] = [
{
id: "crs-ai-org-transform",
slug: "ai-organizational-transformation",
title: "تحول سازمانی با هوش مصنوعی",
title: "دوره جامع تحول دیجیتال با هوش مصنوعی",
summary:
"دوره تخصصی دو روزه؛ درک روشن از اینکه هوش مصنوعی کجا و چگونه به سازمان کمک می کند.",
"دوره دو روزه؛ از آمادگی سازمان تا انتخاب کاربرد و تجربه عملی — ۴ و ۵ آذر ۱۴۰۵.",
categories: [C.technology],
tags: [T.workshops],
durationHours: null,
format: "in-person",
price: 21_500_000,
registrationUrl: "/register/ai-organizational-transformation",
posterImageUrl:
"/images/courses/ai-organizational-transformation-poster.webp",
brochureImageUrl:
"/images/courses/ai-organizational-transformation-brochure.webp",
leadHtml: AI_ORG_LEAD_HTML,
bodyHtml: AI_ORG_BODY_HTML,
seoDescription:
"دوره تخصصی دو روزه تحول سازمانی با هوش مصنوعی. مسیر یادگیری از مسئله سازمانی تا نقش انسان و AI، انتخاب مسیر، مدیریت محصول AI، داده و حاکمیت، ساخت و آزمون و تشخیص کاربرد مناسب. محور ها: آمادگی سازمان برای عصر AI، نمونه های کاربردی موفق و چشم اندازها، مسئله و ارزش سازمان با نقش انسان، حاکمیت داده، و انتخاب کاربرد مناسب و تجربه موفق. شعار دوره: هوش مصنوعی در خدمت اولویت های سازمان.",
"دوره دو روزه تحول دیجیتال با هوش مصنوعی، ۴ و ۵ آذر ۱۴۰۵، با تدریس دکتر هراتی نیک و همراهی دستیاران صنعتی؛ از آمادگی سازمان تا انتخاب کاربرد و تجربه عملی.",
},
{
id: "crs-ai-fluency",
slug: "ai-fluency",
title: "AI Fluency؛ کارگاه عملی کاربرد هوش مصنوعی",
title: "AI fluency | تسلط بر هوش مصنوعی",
summary:
"از پرامپت دقیق تا ایجنت قابل اعتماد — یاد بگیرید، بسازید، ارزیابی کنید.",
"کارگاه عملی شش ساعته؛ از دستور دقیق و الگوهای قابل استفاده مجدد تا دستیار شخصی و Agent.",
categories: [C.technology],
tags: [T.workshops],
durationHours: null,
durationHours: 6,
format: "in-person",
registrationUrl: "/register/ai-fluency",
posterImageUrl: "/images/courses/ai-fluency-poster.webp",
brochureImageUrl: "/images/courses/ai-fluency-brochure.webp",
leadHtml: AI_FLUENCY_LEAD_HTML,
bodyHtml: AI_FLUENCY_BODY_HTML,
seoDescription:
"کارگاه عملی کاربرد هوش مصنوعی با شعار «از پرامپت دقیق تا ایجنت قابل اعتماد». پنج گام مسیر یادگیری: ۱) مهندسی پرامپت — درخواست شفاف، پاسخ هدفمند؛ مشخص کردن هدف، زمینه و قالب خروجی؛ ۲) طراحی دستورالعمل (Prompt Card / Skill) — دستور شفاف، اجرای منسجم؛ تعریف گام ها و قوانین انجام کار؛ ۳) چت بات اختصاصی — دانش شما، دستیار شما؛ تعیین نقش، منابع و مرز های پاسخ؛ ۴) ایجنت — از پاسخ دادن تا انجام کار؛ اتصال ابزار ها با نظارت انسان؛ ۵) ارزیابی و کنترل — بسنجید، اصلاح کنید، اعتماد کنید؛ آزمون پاسخ ها و کنترل خطا. در پایان کارگاه، از ایده به یک دستیار کاربردی می رسید: پرامپت دقیق، مهارت قابل تکرار، چت بات اختصاصی و ایجنت قابل ارزیابی.",
"کارگاه عملی شش ساعته AI fluency با تدریس دکتر هراتی نیک و همراهی دستیاران صنعتی؛ از دستور دقیق و الگوهای قابل استفاده مجدد تا شناخت دستیار و Agent.",
},
{
id: "crs-hr-prompt",
+5 -5
View File
@@ -73,15 +73,15 @@ export const intersections: IntersectionTopic[] = [
{
id: "int-01",
slug: "ai-organizational-transformation",
title: "تحول سازمانی با هوش مصنوعی",
title: "دوره جامع تحول دیجیتال با هوش مصنوعی",
description:
"دوره تخصصی دو روزه؛ درک روشن از اینکه هوش مصنوعی کجا و چگونه به سازمان کمک می کند.",
"این دوره دو روزه (۴ و ۵ آذر ۱۴۰۵)، مسیر تحول با هوش مصنوعی را از آمادگی سازمان و تجربه های موفق تا بررسی مسئله، نقش انسان، حاکمیت داده و تجربه عملی دنبال می کند؛ تا انتخاب کاربرد بر نیاز واقعی سازمان استوار باشد.",
href: "/register/ai-organizational-transformation",
imageUrl: "/images/courses/ai-organizational-transformation-poster.webp",
body: "پنج محور: آمادگی سازمان برای عصر AI، نمونه های کاربردی موفق و چشم اندازها، مسئله و ارزش سازمان با نقش انسان، حاکمیت داده، و انتخاب کاربرد مناسب و تجربه موفق. مسیر از مسئله سازمانی تا تشخیص کاربرد متناسب با نیاز واقعی سازمان.",
body: "از مسئله کسب و کار تا انتخاب مسیر تحول. پنج محور: آماده سازی سازمان برای عصر AI، نمونه های کاربردی موفق و چشم اندازها، مسئله و ارزش سازمان با نقش انسان، حاکمیت داده، و انتخاب کاربرد مناسب و تجربه عملی. تاریخ: ۴ و ۵ آذر ۱۴۰۵؛ قیمت: ۲۱٬۵۰۰٬۰۰۰ تومان؛ مدرس دکتر هراتی نیک با همراهی دستیاران صنعتی.",
highlights: [
"دوره تخصصی دو روزه",
"از مسئله سازمانی تا تشخیص کاربرد مناسب",
"۴ و ۵ آذر ۱۴۰۵ · ۲۱٬۵۰۰٬۰۰۰ تومان",
"از مسئله کسب و کار تا انتخاب کاربرد",
"تجربه عملی با همراهی دستیاران صنعتی",
],
},
+35
View File
@@ -0,0 +1,35 @@
import DOMPurify from "isomorphic-dompurify";
/** Allowed tags for course lead/body HTML from admin. */
const ALLOWED_TAGS = [
"p",
"br",
"strong",
"b",
"em",
"i",
"u",
"s",
"ul",
"ol",
"li",
"h2",
"h3",
"h4",
"a",
"blockquote",
"hr",
"span",
];
const ALLOWED_ATTR = ["href", "title", "target", "rel", "class"];
/** Sanitize untrusted HTML for safe rendering in React. */
export function sanitizeCourseHtml(dirty: string): string {
if (!dirty?.trim()) return "";
return DOMPurify.sanitize(dirty, {
ALLOWED_TAGS,
ALLOWED_ATTR,
ALLOW_DATA_ATTR: false,
});
}
+4
View File
@@ -36,6 +36,10 @@ export interface Course {
posterImageUrl?: string;
/** Detail-page brochure; empty = omit brochure block. */
brochureImageUrl?: string;
/** HTML ad copy under the hero title; empty = fall back to summary. */
leadHtml?: string;
/** HTML main body on the course detail page; empty = omit body section. */
bodyHtml?: string;
seoDescription: string;
}
+6
View File
@@ -41,6 +41,10 @@ const courseFields = {
/** Local upload path (/uploads/...) or legacy path/URL; empty clears. */
posterImageUrl: z.union([urlOrPath, z.literal("")]),
brochureImageUrl: z.union([urlOrPath, z.literal("")]),
/** HTML ad under hero title. */
leadHtml: z.string(),
/** HTML course body. */
bodyHtml: z.string(),
seoDescription: z.string(),
published: z.boolean(),
};
@@ -93,6 +97,8 @@ export const courseTagPatchSchema = z
export const courseCreateSchema = z.object({
...courseFields,
leadHtml: z.string().default(""),
bodyHtml: z.string().default(""),
seoDescription: z.string().default(""),
published: z.boolean().default(true),
});