پرش به محتوا

صفحه اصلی مغازه شما/دسته بندی موضوعی - فراغیب

از فراغیب
بدون خلاصۀ ویرایش
برچسب: واگردانی دستی
بدون خلاصۀ ویرایش
 
(۵ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۱: خط ۱:
<html>
<html>


<div class="mediawiki-category-container" style="direction: rtl; font-family: tahoma, arial; max-width: 1000px; margin: 20px auto; padding: 15px; background: #f9f9f9; border-radius: 18px; box-shadow: 0 8px 24px rgba(42, 128, 85, .14); border: 1px solid #c9e4d5;">
<div class="faraghaib-custom-container">


     <!-- بخش جستجو -->
     <!-- بخش جستجو -->
     <div class="search-box" style="margin-bottom: 15px; text-align: center;">
     <div class="fz-search-wrapper">
         <input type="text" id="categorySearch" placeholder="جستجو در دسته‌بندی‌ها..."
         <input type="text" id="categorySearch" placeholder="جستجو در دسته‌بندی‌ها...">
              style="width: 90%; padding: 10px 18px; border: 1px solid #c9e4d5; border-radius: 25px; outline: none; font-size: 14px; transition: all 0.3s ease;">
     </div>
     </div>


     <!-- بخش فیلترها -->
     <!-- بخش فیلترها -->
     <div class="filter-bar" style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px;">
     <div class="fz-filter-bar">
         <button class="filter-btn active" onclick="filterSelection('all')" style="padding: 5px 15px; border-radius: 15px; border: none; background: #16bd78; color: white; cursor: pointer; font-size: 13px;">همه</button>
         <button class="fz-filter-btn active" onclick="filterSelection(event, 'all')">همه</button>
         <button class="filter-btn" onclick="filterSelection('tech')" style="padding: 5px 15px; border-radius: 15px; border: none; background: #eee; cursor: pointer; font-size: 13px;">تکنولوژی</button>
         <button class="fz-filter-btn" onclick="filterSelection(event, 'tech')">تکنولوژی</button>
         <button class="filter-btn" onclick="filterSelection('art')" style="padding: 5px 15px; border-radius: 15px; border: none; background: #eee; cursor: pointer; font-size: 13px;">هنر</button>
         <button class="fz-filter-btn" onclick="filterSelection(event, 'art')">هنر</button>
         <button class="filter-btn" onclick="filterSelection('science')" style="padding: 5px 15px; border-radius: 15px; border: none; background: #eee; cursor: pointer; font-size: 13px;">علوم</button>
         <button class="fz-filter-btn" onclick="filterSelection(event, 'science')">علوم</button>
     </div>
     </div>


     <!-- شبکه کارت‌ها (Grid) -->
     <!-- شبکه کارت‌ها -->
     <div id="categoryGrid" class="category-grid">
     <div id="categoryGrid" class="fz-category-grid">
       
 
         <!-- کارت نمونه 1 -->
         <!-- نمونه کارت‌ها (کلاس‌ها را مطابق دسته‌بندی تغییر بده) -->
         <div class="category-card tech" style="background: white; padding: 15px 10px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-bottom: 4px solid #16bd78;">
         <div class="fz-card tech">
             <span style="font-weight: bold; color: #333; font-size: 14px; display: block;">هوش مصنوعی</span>
             <span class="fz-title">هوش مصنوعی</span>
            <span style="font-size: 11px; color: #777; background: #f0fdf4; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 5px;">۱۲ مقاله</span>
         </div>
         </div>


        <!-- کارت نمونه 2 -->
         <div class="fz-card art">
         <div class="category-card art" style="background: white; padding: 15px 10px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-bottom: 4px solid #ff9f43;">
             <span class="fz-title">نقاشی دیجیتال</span>
             <span style="font-weight: bold; color: #333; font-size: 14px; display: block;">نقاشی دیجیتال</span>
            <span style="font-size: 11px; color: #777; background: #fff7ed; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 5px;">۸ مقاله</span>
         </div>
         </div>


        <!-- کارت نمونه 3 -->
         <div class="fz-card science">
         <div class="category-card science" style="background: white; padding: 15px 10px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-bottom: 4px solid #54a0ff;">
             <span class="fz-title">فیزیک کوانتوم</span>
             <span style="font-weight: bold; color: #333; font-size: 14px; display: block;">فیزیک کوانتوم</span>
            <span style="font-size: 11px; color: #777; background: #eff6ff; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 5px;">۵ مقاله</span>
         </div>
         </div>


        <!-- کارت نمونه 4 -->
         <div class="fz-card tech">
         <div class="category-card tech" style="background: white; padding: 15px 10px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-bottom: 4px solid #16bd78;">
             <span class="fz-title">برنامه‌نویسی</span>
             <span style="font-weight: bold; color: #333; font-size: 14px; display: block;">برنامه‌نویسی</span>
            <span style="font-size: 11px; color: #777; background: #f0fdf4; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 5px;">۲۵ مقاله</span>
         </div>
         </div>


        <!-- اضافه کردن کارت‌های بیشتر برای تست نمایش ردیف‌ها -->
         <div class="fz-card art">
         <div class="category-card art" style="background: white; padding: 15px 10px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-bottom: 4px solid #ff9f43;">
             <span class="fz-title">طراحی گرافیک</span>
             <span style="font-weight: bold; color: #333; font-size: 14px; display: block;">طراحی گرافیک</span>
        </div>
             <span style="font-size: 11px; color: #777; background: #fff7ed; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 5px;">۱۰ مقاله</span>
 
        <div class="fz-card tech">
             <span class="fz-title">امنیت شبکه</span>
         </div>
         </div>


خط ۵۴: خط ۴۸:


<style>
<style>
/* تنظیمات اصلی گرید */
/* کانتینر اصلی */
.category-grid {
.faraghaib-custom-container {
     display: grid;
    direction: rtl !important;
     /* حالت دسکتاپ: ۴ ستون مساوی */
    font-family: 'IRANSans', 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
     grid-template-columns: repeat(4, 1fr);
    max-width: 1000px !important;
     gap: 15px;
    margin: 20px auto !important;
    padding: 15px !important;
    background: #f9f9f9 !important;
    border-radius: 15px !important;
    border: 1px solid #c9e4d5 !important;
     display: block !important;
    box-sizing: border-box !important;
}
 
/* استایل ورودی جستجو */
.fz-search-wrapper { margin-bottom: 15px; text-align: center; }
.fz-search-wrapper input {
    width: 90%;
    padding: 10px 18px;
    border: 1px solid #c9e4d5;
    border-radius: 25px;
    outline: none;
    font-size: 15px;
    font-family: 'IRANSans', 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
     transition: 0.3s;
}
.fz-search-wrapper input:focus { border-color: #16bd78; box-shadow: 0 0 5px rgba(22, 189, 120, 0.2); }
 
/* استایل دکمه‌های فیلتر */
.fz-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.fz-filter-btn {
    padding: 6px 18px;
    border-radius: 20px;
    border: none;
    background: #eee;
    cursor: pointer;
    font-size: 14px;
    font-family: 'IRANSans', 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
    transition: 0.3s;
}
.fz-filter-btn.active { background: #16bd78 !important; color: white !important; font-weight: bold; }
 
/* چیدمان شبکه کارت‌ها */
.fz-category-grid {
    display: grid !important;
     grid-template-columns: repeat(4, 1fr) !important;
     gap: 12px !important;
    width: 100% !important;
}
 
/* استایل کارت نهایی */
.fz-card {
    background: white !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    border-bottom: 4px solid #ddd !important; /* خط رنگی پایین */
    box-sizing: border-box !important;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 !important;
}
}


/* حالت تبلت یا موبایل‌های بزرگ (اختیاری اما برای زیبایی) */
.fz-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; }
@media (max-width: 768px) {
 
     .category-grid {
/* استایل فونت داخل کارت (بزرگ شده) */
        /* حالت موبایل: ۲ ستون مساوی */
.fz-title {
        grid-template-columns: repeat(2, 1fr);
    font-family: 'IRANSans', 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
     }
     font-weight: 500 !important;
    color: #333 !important;
    font-size: 16px !important; /* اندازه فونت بزرگ شده */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
     text-overflow: ellipsis;
}
}


/* حالت خیلی کوچک (موبایل‌های قدیمی) */
/* رنگ‌بندی دسته‌بندی‌ها */
@media (max-width: 480px) {
.fz-card.tech { border-bottom-color: #16bd78 !important; }
     .category-grid {
.fz-card.art { border-bottom-color: #ff9f43 !important; }
        grid-template-columns: repeat(2, 1fr); /* طبق درخواست تو ۲ ستونه باقی بماند */
.fz-card.science { border-bottom-color: #54a0ff !important; }
        gap: 10px;
 
    }
/* واکنش‌گرایی موبایل */
@media (max-width: 768px) {
     .fz-category-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
}


.filter-btn:hover { opacity: 0.8; }
/* کلاس مخفی‌سازی برای فیلتر و جستجو */
.category-card { transition: all 0.2s ease; cursor: pointer; }
.is-hidden { display: none !important; }
.category-card:hover { transform: translateY(-5px); }
</style>
</style>


<script>
<script>
function filterSelection(category) {
// تابع فیلتر دسته‌بندی
     const cards = document.getElementsByClassName("category-card");
function filterSelection(event, category) {
     const buttons = document.getElementsByClassName("filter-btn");
     const cards = document.getElementsByClassName("fz-card");
     const buttons = document.getElementsByClassName("fz-filter-btn");
   
    // حذف حالت فعال از همه دکمه‌ها
    for (let btn of buttons) btn.classList.remove("active");
    // اضافه کردن حالت فعال به دکمه کلیک شده
    event.currentTarget.classList.add("active");


     // تغییر استایل دکمه‌ها
     // نمایش یا عدم نمایش کارت‌ها
    for (let btn of buttons) {
        btn.style.background = "#eee";
        btn.style.color = "black";
    }
    event.currentTarget.style.background = "#16bd78";
    event.currentTarget.style.color = "white";
 
    // فیلتر کارت‌ها
     for (let card of cards) {
     for (let card of cards) {
         if (category === 'all') {
         if (category === 'all' || card.classList.contains(category)) {
             card.style.display = "block";
             card.classList.remove("is-hidden");
         } else {
         } else {
             if (card.classList.contains(category)) {
             card.classList.add("is-hidden");
                card.style.display = "block";
            } else {
                card.style.display = "none";
            }
         }
         }
     }
     }
}
}


// تابع جستجوی زنده
document.getElementById('categorySearch').addEventListener('keyup', function() {
document.getElementById('categorySearch').addEventListener('keyup', function() {
     const searchValue = this.value.toLowerCase();
     const val = this.value.toLowerCase().trim();
     const cards = document.getElementsByClassName("category-card");
     const cards = document.getElementsByClassName("fz-card");


     for (let card of cards) {
     for (let card of cards) {
         const title = card.querySelector('span').innerText.toLowerCase();
         const title = card.querySelector('.fz-title').innerText.toLowerCase();
         if (title.includes(searchValue)) {
         if (title.includes(val)) {
             card.style.display = "block";
             card.classList.remove("is-hidden");
         } else {
         } else {
             card.style.display = "none";
             card.classList.add("is-hidden");
         }
         }
     }
     }
});
});
</script>
</script>






</html>
</html>

نسخهٔ کنونی تا ‏۷ اوت ۲۰۲۶، ساعت ۱۸:۰۴

هوش مصنوعی
نقاشی دیجیتال
فیزیک کوانتوم
برنامه‌نویسی
طراحی گرافیک
امنیت شبکه