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

بدون خلاصۀ ویرایش
صفحه را خالی کرد
برچسب: خالی کردن
خط ۱: خط ۱:
/* global mw, $ */


/* اجرای کد بعد از لود صفحه */
mw.loader.using(['mediawiki.util'], function () {
$(function () {
/* ------------------------------------------------ */
/* جداول تاشو (collapsible tables) */
/* ------------------------------------------------ */
$('.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 ||
    mw.config.get("wgUserEditCount") < 100) {
    mw.util.addCSS("#ca-wikilove { display:none; }");
}
/* ------------------------------------------------ */
/* بارگذاری اسکریپت فقط در حالت ویرایش */
/* ------------------------------------------------ */
if (mw.config.get("wgAction") === "edit" || mw.config.get("wgAction") === "submit") {
    mw.loader.load("/wiki/MediaWiki:Edit.js?action=raw&ctype=text/javascript");
}
});
});
/* حذف کامل اجزای پوسته */
#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-page-container,
.mw-page-container-inner{
grid-template-columns:1fr !important;
max-width:100% !important;
}
/* صفحه کاملاً خالی */
#content{
margin:0 !important;
padding:0 !important;
max-width:100% !important;
}
.mw-body{
margin:0 !important;
padding:0 !important;
}
/* حذف حاشیه‌ها */
.vector-body{
padding:0 !important;
}
/* فضای تمیز برای طراحی */
#mw-content-text{
width:100%;
margin:0 auto;
}
#wikiMenuButton{
position:fixed;
top:20px;
right:20px;
background:#111;
color:white;
padding:10px 14px;
font-size:20px;
cursor:pointer;
border-radius:6px;
z-index:9999;
}
#wikiMenu{
display:none;
position:fixed;
top:60px;
right:20px;
background:white;
border-radius:8px;
box-shadow:0 10px 30px rgba(0,0,0,0.2);
overflow:hidden;
z-index:9999;
}
#wikiMenu a{
display:block;
padding:12px 20px;
text-decoration:none;
color:#333;
font-size:14px;
}
#wikiMenu a:hover{
background:#f3f3f3;
}