اطلاعیه: از همه ایران دوستان عزیز دعوت می‌کنیم در ایجاد و به‌روزرسانی صفحات جاویدنامان همیاری نمایند. در حال حاضر میتوانید بدون عضویت در ثبت تاریخ کمک نمایید.

مدیاویکی:Common.css: تفاوت میان نسخه‌ها

از ویکی‌یاد
Adminwki (بحث | مشارکت‌ها)
بدون خلاصۀ ویرایش
برچسب: برگردانده‌شده
Adminwki (بحث | مشارکت‌ها)
بدون خلاصۀ ویرایش
برچسب: برگردانده‌شده
خط ۵۴: خط ۵۴:
}
}


/* Default box style (base for all sizes) */
/* Each box - keep square but allow horizontal flow */
li.gallerybox {
li.gallerybox {
    position: relative !important;
    position: relative !important;
    overflow: hidden !important;
    overflow: hidden !important;
    margin: 8px !important;
    width: 200px !important;
    padding: 0 !important;
    height: 200px !important;
    border: none !important;
    margin: 8px !important;
    flex: 0 0 auto !important; /* don't grow, allow wrap */
    padding: 0 !important;
    display: inline-block !important; /* fallback */
    border: none !important;
    background-color: #f8f9fa; /* fallback */
    flex: 0 0 auto !important; /* important: don't grow, allow wrap */
    display: inline-block !important; /* fallback for older browsers */
    background-color: #f8f9fa; /* fallback */
}
}
/* Thumb div fills the box */
/* Thumb div fills the box */
.gallerybox .thumb {
.gallerybox .thumb {
    position: absolute !important;
    position: absolute !important;
    inset: 0 !important;
    inset: 0 !important;
    width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    padding: 0 !important;
}
}
/* Hide original image (already done by JS) */
/* Hide original image (already done by JS) */
.gallerybox .thumb img {
.gallerybox .thumb img {
    display: none !important;
    display: none !important;
}
}
/* Caption overlay at bottom - keep clickable */
/* Caption overlay at bottom - keep clickable */
.gallerybox .gallerytext {
.gallerybox .gallerytext {
    position: absolute !important;
    position: absolute !important;
    bottom: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    left: 0 !important;
    right: 0 !important;
    right: 0 !important;
    background: rgba(0,0,0,0.65) !important;
    background: rgba(0,0,0,0.65) !important;
    color: white !important;
    color: white !important;
    text-align: center !important;
    text-align: center !important;
    padding: 6px 4px !important;
    padding: 6px 4px !important;
    margin: 0 !important;
    margin: 0 !important;
    font-size: 0.9em !important;
    font-size: 0.9em !important;
    z-index: 10 !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    pointer-events: auto !important; /* FIXED: make clickable again */
    box-sizing: border-box !important;
    box-sizing: border-box !important;
}
}
/* Ensure the link inside caption is clickable */
/* Ensure the link inside caption is clickable */
.gallerybox .gallerytext a {
.gallerybox .gallerytext a {
    color: white !important;
    color: white !important;
    text-decoration: none !important;
    text-decoration: none !important;
    display: block !important;
    display: block !important;
    width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    height: 100% !important;
}
}
/* Hover effect */
/* Hover effect */
li.gallerybox:hover {
li.gallerybox:hover {
    transform: scale(1.04);
    transform: scale(1.04);
    transition: transform 0.25s ease;
    transition: transform 0.25s ease;
}
 
/* Responsive media queries - adjust sizes per screen width */
 
/* Large screens (desktop, >1200px): 200px boxes */
@media (min-width: 1201px) {
    li.gallerybox {
        width: 200px !important;
        height: 200px !important;
    }
    .gallerybox .gallerytext {
        font-size: 1em !important; /* slightly larger text */
        padding: 8px 6px !important;
    }
}
 
/* Medium screens (tablet, 768px - 1200px): 180px boxes */
@media (min-width: 769px) and (max-width: 1200px) {
    li.gallerybox {
        width: 180px !important;
        height: 180px !important;
        margin: 6px !important; /* slightly less space */
    }
}
 
/* Small screens (mobile, <768px): 150px boxes, or even smaller */
@media (max-width: 768px) {
    li.gallerybox {
        width: 150px !important;
        height: 150px !important;
        margin: 4px !important;
    }
    .gallerybox .gallerytext {
        font-size: 0.85em !important; /* smaller text for mobile */
        padding: 5px 3px !important;
    }
}
 
/* Very small screens (e.g. phones <480px): single column, full-width boxes */
@media (max-width: 480px) {
    ul.gallery, .gallery, .dplgallery {
        justify-content: center !important; /* center single column */
    }
    li.gallerybox {
        width: calc(100% - 16px) !important; /* almost full width, minus margins */
        height: calc(100% - 16px) !important; /* maintain square (adjust if you want rectangle) */
        margin: 8px auto !important; /* center */
    }
}
}

نسخهٔ ۲۴ ژانویهٔ ۲۰۲۶، ساعت ۱۶:۵۰

/* Import Vazirmatn from Google Fonts (supports Persian/Arabic very well) */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

/* Apply Vazirmatn as the main UI font everywhere possible */
body,
#mw-page-base,
#mw-head-base,
#content,
.mw-body,
.mw-body-content,
.vector-menu,
.vector-menu-heading,
.vector-menu-content,
#p-personal ul,
#footer,
.mw-indicators,
.mw-editsection,
.mw-parser-output,
input, button, select, textarea,
.oo-ui-labelElement-label,
.skin-vector,
.skin-vector-search-vue,
.skin-vector-2022 {  /* Covers Vector 2022 skin - most common now */
    font-family: "Vazirmatn", "Noto Sans Arabic", "DejaVu Sans", Tahoma, Arial, sans-serif !important;
}

/* Headings - make them bolder or adjust if needed */
h1, h2, h3, h4, h5, h6,
.mw-first-heading,
#firstHeading {
    font-family: "Vazirmatn", "Noto Kufi Arabic", sans-serif !important;
    font-weight: 700;  /* Medium-bold for better readability */
}

/* Code / monospace elements - keep a fallback monospace font */
code, pre, .mw-code {
    font-family: "Vazirmatn", ui-monospace, monospace !important;
}

/* Optional: Improve line height and spacing for Persian text */
body {
    line-height: 1.7;
}


/* Target gallery items from DPL or core gallery *//* Parent gallery container - flex for responsive rows */
ul.gallery, .gallery, .dplgallery {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important; /* or center/space-around if you prefer */
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important; /* center the gallery if needed */
}

/* Each box - keep square but allow horizontal flow */
li.gallerybox {
    position: relative !important;
    overflow: hidden !important;
    width: 200px !important;
    height: 200px !important;
    margin: 8px !important;
    padding: 0 !important;
    border: none !important;
    flex: 0 0 auto !important; /* important: don't grow, allow wrap */
    display: inline-block !important; /* fallback for older browsers */
    background-color: #f8f9fa; /* fallback */
}
/* Thumb div fills the box */
.gallerybox .thumb {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Hide original image (already done by JS) */
.gallerybox .thumb img {
    display: none !important;
}
/* Caption overlay at bottom - keep clickable */
.gallerybox .gallerytext {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(0,0,0,0.65) !important;
    color: white !important;
    text-align: center !important;
    padding: 6px 4px !important;
    margin: 0 !important;
    font-size: 0.9em !important;
    z-index: 10 !important;
    pointer-events: auto !important; /* FIXED: make clickable again */
    box-sizing: border-box !important;
}
/* Ensure the link inside caption is clickable */
.gallerybox .gallerytext a {
    color: white !important;
    text-decoration: none !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}
/* Hover effect */
li.gallerybox:hover {
    transform: scale(1.04);
    transition: transform 0.25s ease;
}