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

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

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


/* Target gallery items from DPL or core gallery */
/* Target gallery items from DPL or core gallery */
/* Make thumb div the full square cover area */
/* Gallery item container - make it the containing block for absolute caption */
.gallerybox {
li.gallerybox {
    position: relative !important;    /* THIS IS KEY: makes absolute children stay inside */
    overflow: hidden !important;
     width: 155px !important;
     width: 155px !important;
     height: 155px !important;
     height: 155px !important;         /* square */
     margin: 8px !important;
     margin: 8px !important;
     padding: 0 !important;
     padding: 0 !important;
     border: none !important;
     border: none !important;
     list-style: none !important;      /* remove bullet if any */
     list-style: none !important;
    overflow: hidden !important;
     background-color: #f8f9fa;        /* fallback */
     background-color: #f8f9fa;        /* fallback */
    display: block !important;        /* prevent float/list issues */
}
}


/* Thumb div fills the box */
.gallerybox .thumb {
.gallerybox .thumb {
    position: absolute !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;
    position: relative !important;    /* for positioning caption if needed */
}
}


/* Hide original image inside thumb */
/* Force image to cover completely (already hidden by JS) */
.gallerybox .thumb img {
.gallerybox .thumb img {
     display: none !important;
     display: none !important;         /* hidden by JS anyway */
}
}


/* Caption (gallerytext) as overlay */
/* Caption stays inside the box as overlay at bottom */
.gallerybox .gallerytext {
.gallerybox .gallerytext {
     position: absolute !important;
     position: absolute !important;
خط ۷۶: خط ۸۰:
     left: 0 !important;
     left: 0 !important;
     right: 0 !important;
     right: 0 !important;
     background: rgba(0,0,0,0.6) !important;
     background: rgba(0,0,0,0.65) !important;
     color: white !important;
     color: white !important;
     text-align: center !important;
     text-align: center !important;
خط ۸۲: خط ۸۶:
     margin: 0 !important;
     margin: 0 !important;
     font-size: 0.9em !important;
     font-size: 0.9em !important;
     z-index: 2 !important;             /* above background */
     z-index: 10 !important;           /* above background */
    pointer-events: none !important;  /* allow clicks through if needed */
    box-sizing: border-box !important;
}
}


/* Optional hover */
/* Hover effect on whole box */
.gallerybox:hover .thumb {
li.gallerybox:hover {
     transform: scale(1.04);
     transform: scale(1.04);
     transition: transform 0.25s ease;
     transition: transform 0.25s 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 */
/* Gallery item container - make it the containing block for absolute caption */
li.gallerybox {
    position: relative !important;     /* THIS IS KEY: makes absolute children stay inside */
    overflow: hidden !important;
    width: 155px !important;
    height: 155px !important;          /* square */
    margin: 8px !important;
    padding: 0 !important;
    border: none !important;
    list-style: none !important;
    background-color: #f8f9fa;         /* fallback */
    display: block !important;         /* prevent float/list issues */
}

/* 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;
}

/* Force image to cover completely (already hidden by JS) */
.gallerybox .thumb img {
    display: none !important;          /* hidden by JS anyway */
}

/* Caption stays inside the box as overlay at bottom */
.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;            /* above background */
    pointer-events: none !important;   /* allow clicks through if needed */
    box-sizing: border-box !important;
}

/* Hover effect on whole box */
li.gallerybox:hover {
    transform: scale(1.04);
    transition: transform 0.25s ease;
}