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

admin>Esfandiari
بدون خلاصۀ ویرایش
جز ۵۶ نسخه واردشده
 
(۴۷ نسخهٔ میانی ویرایش شده توسط ۲ کاربر نشان داده نشد)
خط ۱: خط ۱:
/* global mw, $ */
/* --------------------- Begin Font Style ----------------- */
 
@font-face {
/* اجرای کد بعد از لود صفحه */
    font-family: 'IRANSansXFaNum';
mw.loader.using(['mediawiki.util'], function () {
font-style: normal;
$(function () {
font-weight: 400;
 
font-display: swap;
/* ------------------------------------------------ */
src: url('/w/resources/fonts/IRANSansXFaNum-Regular.woff2') format('woff2'),
/* جداول تاشو (collapsible tables) */
url('/w/resources/fonts/IRANSansXFaNum-Regular.woff') format('woff');
/* ------------------------------------------------ */
}
 
$('.mw-collapsible').each(function () {
    $(this).makeCollapsible();
});
 
 
/* ------------------------------------------------ */
/* برجسته کردن رفرنس کلیک شده */
/* ------------------------------------------------ */
 
$('sup.reference').on('click', function () {
    var citeId = $(this).attr('id');
    $('sup > a[href="#' + citeId + '"]')
        .css('color', '#2a4b8d')
        .css('font-weight', 'bold');
});
 
 
/* ------------------------------------------------ */
/* اصلاح جهت فرمول‌های ریاضی */
/* ------------------------------------------------ */
 
$('span.mwe-math-mathml-inline').each(function () {
    var parent = $(this).parent().parent();
    if (parent.text().trim() === $(this).parent().text().trim()) {
        parent.css({
            direction: "ltr",
            padding: "1em 0"
        });
    }
});
 
 
/* ------------------------------------------------ */
/* مخفی کردن WikiLove برای کاربران تازه */
/* ------------------------------------------------ */


if ($.inArray("autoconfirmed", mw.config.get("wgUserGroups")) === -1 ||
body {
    mw.config.get("wgUserEditCount") < 100) {
font-family: IRANSansXFaNum, Tahoma, 'Noto Serif', 'Droid Arabic Naskh', 'DejaVu Sans', serif !important;
    mw.util.addCSS("#ca-wikilove { display:none; }");
}
}


 
#content.mw-body  h1, #content.mw-body  h2, #content.mw-body  #firstHeading,
/* ------------------------------------------------ */
#content.mw-body  .mw-editsection, .mw-body .mw-editsection-like,
/* بارگذاری اسکریپت فقط در حالت ویرایش */
#content.mw-body  #toc h2, #content.mw-body  .toc h2, .vector-sticky-header-context-bar-primary,
/* ------------------------------------------------ */
#template-documentation, #documentation-meta-data{
 
font-family: Shabnam, Tahoma, 'Noto Serif', 'Droid Arabic Naskh', 'DejaVu Sans', serif !important;
if (mw.config.get("wgAction") === "edit" || mw.config.get("wgAction") === "submit") {
line-height: 1.6;
    mw.loader.load("/wiki/MediaWiki:Edit.js?action=raw&ctype=text/javascript");
}
}


});
textarea {
});
font-family: IRANSansXFaNum, 'Courier New', monospace;
/* حذف کامل اجزای پوسته */
#mw-panel,
.vector-sidebar,
.vector-header-container,
.vector-header,
.vector-sticky-header,
.vector-page-toolbar,
.vector-page-tools,
.mw-header,
#footer,
.mw-footer,
#catlinks {
display:none !important;
}
}


/* حذف محدودیت عرض */
.mw-body-content {
.mw-page-container,
font-kerning: auto;
.mw-page-container-inner{
font-size: 16px;
grid-template-columns:1fr !important;
line-height: 2.0;
max-width:100% !important;
}
}


/* صفحه کاملاً خالی */
/* Ace editor now supports RTL editing but a monospace font with Arabic should be set for correct functionality */
#content{
.ace_editor { font-family: 'Courier New', monospace!important; }
margin:0 !important;
padding:0 !important;
max-width:100% !important;
}


.mw-body{
/* force these to use inherited font configuration */
margin:0 !important;
.ui-widget, .ui-widget *, button, input, select, optgroup {
padding:0 !important;
font-family: inherit;
}
}
/* end */


/* حذف حاشیه‌ها */
dfn {
.vector-body{
font-style: inherit;  /* Reset default styling for <dfn> */
padding:0 !important;
}
}
 
sup, sub {
/* فضای تمیز برای طراحی */
line-height: 1em;    /* Reduce line-height for <sup> and <sub> */
#mw-content-text{
width:100%;
margin:0 auto;
}
}
/* --------------------- End Font Style ----------------- */