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

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

از ویکی‌یاد
Adminwki (بحث | مشارکت‌ها)
بدون خلاصۀ ویرایش
Adminwki (بحث | مشارکت‌ها)
بدون خلاصۀ ویرایش
خط ۴۶: خط ۴۶:
/* Target gallery items from DPL or core gallery */
/* Target gallery items from DPL or core gallery */
.gallerybox {
.gallerybox {
     position: relative;
     position: relative !important;
     overflow: hidden;
     overflow: hidden !important;
     width: 155px !important;
     width: 155px !important;           /* your current width - keep or change */
     height: 155px !important;
     height: 155px !important;         /* same height = perfect square */
     margin: 8px !important;
     margin: 8px !important;
     padding: 0 !important;
     padding: 0 !important;
     border: none !important;
     border: none !important;
    background-color: #f8f9fa;        /* fallback if image fails to load */
}
}


/* Make the thumb container fill the box completely */
.gallerybox .thumb {
.gallerybox .thumb {
     position: absolute;
     position: absolute !important;
     inset: 0;                     /* fill parent */
     inset: 0 !important;               /* fill all sides */
     width: 100% !important;
     width: 100% !important;
     height: 100% !important;
     height: 100% !important;
    margin: 0 !important;
}
}


/* Force the <img> to cover the whole area (crop if needed) */
.gallerybox img {
.gallerybox img {
     width: 100% !important;
     width: 100% !important;
     height: 100% !important;
     height: 100% !important;
     object-fit: cover !important; /* this crops to fill square */
     object-fit: cover !important;     /* THIS IS THE KEY: crops to fill, no empty space */
     object-position: center;
     object-position: center center !important;
    display: block !important;         /* ensure it's visible */
}
}


.gallerytext {
/* Hide any unwanted spacing or borders inside */
    position: absolute;
.gallerybox .thumb span,
    bottom: 0;
.gallerybox .thumb a {
    left: 0;
     display: block !important;
    right: 0;
     width: 100% !important;
    background: rgba(0,0,0,0.6);
     height: 100% !important;
    color: white;
     text-align: center;
     padding: 6px;
     margin: 0 !important;
}
}


/* Optional: Caption as semi-transparent overlay at bottom */
/* Caption overlay at bottom (optional, but looks good with cover) */
.gallerytext {
.gallerytext {
     position: absolute;
     position: absolute !important;
     bottom: 0;
     bottom: 0 !important;
     left: 0;
     left: 0 !important;
     right: 0;
     right: 0 !important;
     background: rgba(0, 0, 0, 0.6);
     background: rgba(0, 0, 0, 0.65) !important;
     color: white;
     color: white !important;
     text-align: center;
     text-align: center !important;
     padding: 6px 4px;
     padding: 6px 4px !important;
     margin: 0 !important;
     margin: 0 !important;
     font-size: 0.9em;
     font-size: 0.9em !important;
     overflow: hidden;
     overflow: hidden !important;
     text-overflow: ellipsis;
     text-overflow: ellipsis !important;
     white-space: nowrap;
     white-space: nowrap !important;
}
}


/* Optional: Hover zoom effect */
/* Optional: subtle hover zoom */
.gallerybox:hover {
.gallerybox:hover {
     transform: scale(1.05);
     transform: scale(1.04);
     transition: transform 0.2s ease;
     transition: transform 0.2s ease;
}
}

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

/* 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 */
.gallerybox {
    position: relative !important;
    overflow: hidden !important;
    width: 155px !important;           /* your current width - keep or change */
    height: 155px !important;          /* same height = perfect square */
    margin: 8px !important;
    padding: 0 !important;
    border: none !important;
    background-color: #f8f9fa;         /* fallback if image fails to load */
}

/* Make the thumb container fill the box completely */
.gallerybox .thumb {
    position: absolute !important;
    inset: 0 !important;               /* fill all sides */
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* Force the <img> to cover the whole area (crop if needed) */
.gallerybox img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;      /* THIS IS THE KEY: crops to fill, no empty space */
    object-position: center center !important;
    display: block !important;         /* ensure it's visible */
}

/* Hide any unwanted spacing or borders inside */
.gallerybox .thumb span,
.gallerybox .thumb a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* Caption overlay at bottom (optional, but looks good with cover) */
.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;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Optional: subtle hover zoom */
.gallerybox:hover {
    transform: scale(1.04);
    transition: transform 0.2s ease;
}