الگو:صفحه اصلی مغازه شما/دسته بندی موضوعی: تفاوت میان نسخهها
Esfandiari (بحث | مشارکتها) صفحهای تازه حاوی «<html> <html> <!-- بخش استایلهای اختصاصی و واکنشگرا --> <style> .wiki-province-container { direction: rtl; margin: 5px auto; max-width: 1200px; padding: 10px; } .wiki-province-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 15px !important; } .wiki-province-card { background: #ffffff; border: 1.5px solid #8ee0d8; /*...» ایجاد کرد |
Esfandiari (بحث | مشارکتها) بدون خلاصۀ ویرایش |
||
| (۱۲ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد) | |||
| خط ۱: | خط ۱: | ||
<html> | <html> | ||
< | |||
<!-- بخش | <div class="faraghaib-custom-container"> | ||
<!-- بخش جستجو --> | |||
<div class="fz-search-wrapper"> | |||
<input type="text" id="categorySearch" placeholder="جستجو در دستهبندیها..."> | |||
</div> | |||
<!-- بخش فیلترها --> | |||
<div class="fz-filter-bar"> | |||
<button class="fz-filter-btn active" onclick="filterSelection(event, 'all')">همه</button> | |||
<button class="fz-filter-btn" onclick="filterSelection(event, 'tech')">تکنولوژی</button> | |||
<button class="fz-filter-btn" onclick="filterSelection(event, 'art')">هنر</button> | |||
<button class="fz-filter-btn" onclick="filterSelection(event, 'science')">علوم</button> | |||
</div> | |||
<!-- شبکه کارتها --> | |||
<div id="categoryGrid" class="fz-category-grid"> | |||
<!-- نمونه کارتها (کلاسها را مطابق دستهبندی تغییر بده) --> | |||
<div class="fz-card tech"> | |||
<span class="fz-title">هوش مصنوعی</span> | |||
</div> | |||
<div class="fz-card art"> | |||
<span class="fz-title">نقاشی دیجیتال</span> | |||
</div> | |||
<div class="fz-card science"> | |||
<span class="fz-title">فیزیک کوانتوم</span> | |||
</div> | |||
<div class="fz-card tech"> | |||
<span class="fz-title">برنامهنویسی</span> | |||
</div> | |||
<div class="fz-card art"> | |||
<span class="fz-title">طراحی گرافیک</span> | |||
</div> | |||
<div class="fz-card tech"> | |||
<span class="fz-title">امنیت شبکه</span> | |||
</div> | |||
</div> | |||
</div> | |||
<style> | <style> | ||
/* کانتینر اصلی */ | |||
direction: rtl; | .faraghaib-custom-container { | ||
margin: | direction: rtl !important; | ||
font-family: 'IRANSans', 'IRANSansWeb', Tahoma, Arial, sans-serif !important; | |||
padding: 10px; | max-width: 1000px !important; | ||
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; | display: grid !important; | ||
grid-template-columns: repeat(4, 1fr) !important; | grid-template-columns: repeat(4, 1fr) !important; | ||
gap: | gap: 12px !important; | ||
width: 100% !important; | |||
} | |||
background: | |||
border: | /* استایل کارت نهایی */ | ||
border- | .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; } | |||
/* استایل فونت داخل کارت (بزرگ شده) */ | |||
.fz-title { | |||
font-family: 'IRANSans', 'IRANSansWeb', Tahoma, Arial, sans-serif !important; | |||
font-weight: 500 !important; | |||
color: #333 !important; | |||
font-size: 16px !important; /* اندازه فونت بزرگ شده */ | |||
text-align: center; | text-align: center; | ||
white-space: nowrap; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
} | |||
/* رنگبندی دستهبندیها */ | |||
.fz-card.tech { border-bottom-color: #16bd78 !important; } | |||
.fz-card.art { border-bottom-color: #ff9f43 !important; } | |||
.fz-card.science { border-bottom-color: #54a0ff !important; } | |||
/* واکنشگرایی موبایل */ | |||
@media (max-width: 768px) { | |||
.fz-category-grid { grid-template-columns: repeat(2, 1fr) !important; } | |||
} | |||
/* کلاس مخفیسازی برای فیلتر و جستجو */ | |||
.is-hidden { display: none !important; } | |||
</style> | |||
<script> | |||
// تابع فیلتر دستهبندی | |||
function filterSelection(event, category) { | |||
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 card of cards) { | |||
if (category === 'all' || card.classList.contains(category)) { | |||
card.classList.remove("is-hidden"); | |||
} else { | |||
card.classList.add("is-hidden"); | |||
} | |||
} | } | ||
. | } | ||
// تابع جستجوی زنده | |||
document.getElementById('categorySearch').addEventListener('keyup', function() { | |||
const val = this.value.toLowerCase().trim(); | |||
const cards = document.getElementsByClassName("fz-card"); | |||
for (let card of cards) { | |||
const title = card.querySelector('.fz-title').innerText.toLowerCase(); | |||
if (title.includes(val)) { | |||
card.classList.remove("is-hidden"); | |||
} else { | |||
card.classList.add("is-hidden"); | |||
} | |||
} | } | ||
}); | |||
</script> | |||
</html> | </html> | ||