124 lines
8.0 KiB
JavaScript
124 lines
8.0 KiB
JavaScript
import { existsSync, mkdirSync, copyFileSync, readFileSync } from 'node:fs'
|
|||
|
|
import { dirname, join } from 'node:path'
|
||
|
|
import { fileURLToPath } from 'node:url'
|
||
|
|
import { writeDb } from './db.js'
|
||
|
|
|
||
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||
|
|
const UPLOADS = join(__dirname, '..', 'uploads')
|
||
|
|
const NUXT = join(__dirname, '..', '..', 'nuxt-tailwind-app')
|
||
|
|
|
||
|
|
function asset(rel, name) {
|
||
|
|
const src = join(NUXT, 'src', 'assets', 'images', rel)
|
||
|
|
if (!existsSync(UPLOADS)) mkdirSync(UPLOADS, { recursive: true })
|
||
|
|
if (existsSync(src)) {
|
||
|
|
copyFileSync(src, join(UPLOADS, name))
|
||
|
|
return `/uploads/${name}`
|
||
|
|
}
|
||
|
|
return ''
|
||
|
|
}
|
||
|
|
|
||
|
|
export function runSeed() {
|
||
|
|
const cover = asset('portfolio/madar-biscuit-poster.png', 'portfolio-cover.png')
|
||
|
|
|
||
|
|
const services = JSON.parse(
|
||
|
|
readFileSync(join(__dirname, 'services.seed.json'), 'utf-8')
|
||
|
|
).map((s) => ({
|
||
|
|
...s,
|
||
|
|
iconUrl: asset(`services/${s.id === 'ui' ? 'ui' : s.id === 'graphic-design' ? 'graphic-design' : s.id === 'brand-identity' ? 'brand-identity' : s.id === 'social' ? 'social' : s.id === 'photography' ? 'photography' : 'video'}.png`, `icon-${s.id}.png`),
|
||
|
|
backgroundUrl: asset(`services/backgrounds/${s.id === 'ui' ? 'ui' : s.id === 'graphic-design' ? 'graphic-design' : s.id === 'brand-identity' ? 'brand-identity' : s.id === 'social' ? 'social' : s.id === 'photography' ? 'photography' : 'video'}.png`, `bg-${s.id}.png`),
|
||
|
|
portfolioCategorySlugs:
|
||
|
|
{
|
||
|
|
ui: ['uiux'],
|
||
|
|
'graphic-design': ['graphic'],
|
||
|
|
'brand-identity': ['logo', 'identity'],
|
||
|
|
social: ['social'],
|
||
|
|
photography: [],
|
||
|
|
video: ['motion']
|
||
|
|
}[s.id] || []
|
||
|
|
}))
|
||
|
|
|
||
|
|
writeDb({
|
||
|
|
site: {
|
||
|
|
name: 'استودیو نورو',
|
||
|
|
nameEn: 'Noro Studio',
|
||
|
|
tagline: 'استودیوی طراحی دیجیتال',
|
||
|
|
description:
|
||
|
|
'استودیو نورو با تمرکز بر هویت بصری، UI/UX، طراحی سوشال مدیا و محتوای دیجیتال، برند شما را به تجربهای مدرن و حرفهای تبدیل میکند.',
|
||
|
|
email: 'hello@norostudio.ir',
|
||
|
|
website: 'noro.vision',
|
||
|
|
phone: '۰۹۳۳ ۲۰۶ ۱۶۶۷',
|
||
|
|
phoneTel: '+989332061667',
|
||
|
|
location: 'اصفهان، ایران',
|
||
|
|
messengerHandle: '@noro_vision',
|
||
|
|
messengersLabel: 'پیامرسانها و شبکههای اجتماعی',
|
||
|
|
messengers: [
|
||
|
|
{ id: 'telegram', name: 'تلگرام', url: 'https://t.me/noro_vision', iconUrl: asset('messengers/telegram.png', 'tg.png') },
|
||
|
|
{ id: 'bale', name: 'بله', url: 'https://ble.ir/noro_vision', iconUrl: asset('messengers/bale.png', 'bale.png') },
|
||
|
|
{ id: 'rubika', name: 'روبیکا', url: 'https://rubika.ir/noro_vision', iconUrl: asset('messengers/rubika.png', 'rubika.png') },
|
||
|
|
{ id: 'instagram', name: 'اینستاگرام', url: 'https://www.instagram.com/noro.vision?igsh=MXF1NGE2NGMxOGxncA==', iconUrl: asset('messengers/instagram.svg', 'ig.svg') }
|
||
|
|
],
|
||
|
|
seo: {
|
||
|
|
defaultTitle: 'استودیو نورو | Noro Studio',
|
||
|
|
defaultDescription: 'استودیو نورو — طراحی هویت بصری، UI/UX، سوشال مدیا و محتوای دیجیتال'
|
||
|
|
},
|
||
|
|
hero: {
|
||
|
|
darkImageUrl: asset('hero/studio-background.png', 'hero-dark.png'),
|
||
|
|
lightImageUrl: asset('hero/studio-background-light.png', 'hero-light.png')
|
||
|
|
}
|
||
|
|
},
|
||
|
|
navigation: [
|
||
|
|
{ label: 'خانه', to: '/' },
|
||
|
|
{ label: 'نمونهکارها', to: '/portfolio' },
|
||
|
|
{ label: 'خدمات', to: '/services' },
|
||
|
|
{ label: 'وبلاگ', to: '/blog' },
|
||
|
|
{ label: 'تماس', to: '/contact' }
|
||
|
|
],
|
||
|
|
portfolioCategories: [
|
||
|
|
{ slug: 'graphic', label: 'طراحی گرافیک' },
|
||
|
|
{ slug: 'logo', label: 'طراحی لوگو' },
|
||
|
|
{ slug: 'identity', label: 'هویت بصری' },
|
||
|
|
{ slug: 'uiux', label: 'UI/UX' },
|
||
|
|
{ slug: 'social', label: 'طراحی سوشال مدیا' },
|
||
|
|
{ slug: 'motion', label: 'تدوین و موشن گرافیک' }
|
||
|
|
],
|
||
|
|
projects: [
|
||
|
|
{ id: '1', title: 'طراحی پوستر تبلیغاتی بیسکویت مادر', category: 'graphic', description: 'این پوستر به سفارش شرکت بیسکویت مادر طراحی شده است.', longDescription: 'پروژه پوستر تبلیغاتی بیسکویت مادر با هدف معرفی خواص غذایی و ارزشهای برند طراحی شد.', year: 'خرداد ۱۴۰۴', featured: true, imageUrl: cover, galleryUrls: [cover, cover], client: 'بیسکویت مادر', deliverables: ['پوستر تبلیغاتی'], seoTitle: '', seoDescription: '' },
|
||
|
|
{ id: '2', title: 'اپلیکیشن فینتک', category: 'uiux', description: 'طراحی رابط و تجربه کاربری اپ موبایل مالی', longDescription: 'طراحی کامل UI/UX اپلیکیشن موبایل فینتک.', year: '۱۴۰۴', featured: true, imageUrl: cover, galleryUrls: [cover], client: 'استارتاپ فینتک', deliverables: ['طراحی UI'], seoTitle: '', seoDescription: '' },
|
||
|
|
{ id: '3', title: 'لوگو استارتاپ نوا', category: 'logo', description: 'طراحی لوگوتایپ مینیمال', longDescription: 'لوگوتایپ استارتاپ نوا با رویکرد مینیمال طراحی شد.', year: '۱۴۰۳', featured: true, imageUrl: cover, galleryUrls: [cover], client: 'استارتاپ نوا', deliverables: ['لوگوتایپ'], seoTitle: '', seoDescription: '' },
|
||
|
|
{ id: '4', title: 'کمپین اینستاگرام', category: 'social', description: 'طراحی قالب و محتوای بصری', longDescription: 'کمپین بصری اینستاگرام برای فروش فصلی.', year: '۱۴۰۳', featured: false, imageUrl: cover, galleryUrls: [cover], client: 'برند خردهفروشی', deliverables: ['قالب پست'], seoTitle: '', seoDescription: '' },
|
||
|
|
{ id: '5', title: 'موشن معرفی محصول', category: 'motion', description: 'تدوین و موشن گرافیک', longDescription: 'ویدیوی موشن گرافیک ۶۰ ثانیهای.', year: '۱۴۰۳', featured: false, imageUrl: cover, galleryUrls: [cover], client: 'برند لوازم خانگی', deliverables: ['انیمیشن'], seoTitle: '', seoDescription: '' },
|
||
|
|
{ id: '6', title: 'پنل مدیریت SaaS', category: 'uiux', description: 'طراحی داشبورد SaaS', longDescription: 'طراحی داشبورد مدیریتی SaaS.', year: '۱۴۰۲', featured: false, imageUrl: cover, galleryUrls: [cover], client: 'پلتفرم SaaS', deliverables: ['داشبورد'], seoTitle: '', seoDescription: '' }
|
||
|
|
],
|
||
|
|
services,
|
||
|
|
serviceProjectCategories: {
|
||
|
|
ui: ['uiux'],
|
||
|
|
'graphic-design': ['graphic'],
|
||
|
|
'brand-identity': ['logo', 'identity'],
|
||
|
|
social: ['social'],
|
||
|
|
photography: [],
|
||
|
|
video: ['motion']
|
||
|
|
},
|
||
|
|
clients: [
|
||
|
|
{ id: 'chehelsotoun-souleh', name: 'چهلستون سوله اصفهان', logoUrl: asset('clients/chehelsotoun-souleh.png', 'c1.png') },
|
||
|
|
{ id: 'montzar', name: 'منتظر', logoUrl: asset('clients/montzar.png', 'c2.png') },
|
||
|
|
{ id: 'madar', name: 'مادر', logoUrl: asset('clients/madar.png', 'c3.png') },
|
||
|
|
{ id: 'azad-khorasgan', name: 'دانشگاه آزاد اسلامی — واحد خوراسگان', logoUrl: asset('clients/azad-khorasgan.png', 'c4.png') },
|
||
|
|
{ id: 'isfahan', name: 'اصفهان', logoUrl: asset('clients/isfahan.png', 'c5.png') },
|
||
|
|
{ id: 'montech', name: 'منتک', logoUrl: asset('clients/montech.png', 'c6.png') },
|
||
|
|
{ id: 'farshchin', name: 'فرشچین', logoUrl: asset('clients/farshchin.png', 'c7.png') },
|
||
|
|
{ id: 'rouyesh', name: 'رویش — گروه توسعه نرمافزاری', logoUrl: asset('clients/rouyesh.png', 'c8.png') }
|
||
|
|
],
|
||
|
|
stats: [
|
||
|
|
{ value: '۵۰+', label: 'پروژه انجامشده' },
|
||
|
|
{ value: '۳۰+', label: 'مشتری راضی' },
|
||
|
|
{ value: '۶', label: 'حوزه تخصصی' }
|
||
|
|
],
|
||
|
|
blogPosts: [],
|
||
|
|
media: []
|
||
|
|
})
|
||
|
|
|
||
|
|
console.log('Seed completed.')
|
||
|
|
}
|
||
|
|
|
||
|
|
runSeed()
|