|
|
| (۴۸ نسخهٔ میانی ویرایش شده توسط ۲ کاربر نشان داده نشد) |
| خط ۱: |
خط ۱: |
| /* 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 ||
| |
| mw.config.get("wgUserEditCount") < 100) {
| |
| mw.util.addCSS("#ca-wikilove { display:none; }");
| |
| } | | } |
|
| |
|
| | | body { |
| /* ------------------------------------------------ */
| | font-family: IRANSansXFaNum, Tahoma, 'Noto Serif', 'Droid Arabic Naskh', 'DejaVu Sans', serif !important; |
| /* بارگذاری اسکریپت فقط در حالت ویرایش */
| |
| /* ------------------------------------------------ */
| |
| | |
| if (mw.config.get("wgAction") === "edit" || mw.config.get("wgAction") === "submit") {
| |
| mw.loader.load("/wiki/MediaWiki:Edit.js?action=raw&ctype=text/javascript");
| |
| } | | } |
|
| |
|
| });
| | #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{ |
| #mw-panel, | | font-family: Shabnam, Tahoma, 'Noto Serif', 'Droid Arabic Naskh', 'DejaVu Sans', serif !important; |
| .vector-sidebar, | | line-height: 1.6; |
| .vector-header, | |
| .mw-header, | |
| #footer,
| |
| .mw-footer, | |
| .vector-page-toolbar, | |
| .vector-page-tools, | |
| .vector-sticky-header { | |
| display: none !important;
| |
| } | | } |
|
| |
|
| /* صفحه خالی */
| | textarea { |
| .mw-page-container,
| | font-family: IRANSansXFaNum, 'Courier New', monospace; |
| .mw-page-container-inner {
| |
| grid-template-columns: 1fr !important;
| |
| } | | } |
|
| |
|
| #content,
| | .mw-body-content { |
| .mw-body { | | font-kerning: auto; |
| margin: 0 !important;
| | font-size: 16px; |
| padding: 0 !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 */ |
| | .ace_editor { font-family: 'Courier New', monospace!important; } |
|
| |
|
| | | /* force these to use inherited font configuration */ |
| #customMenuButton{
| | .ui-widget, .ui-widget *, button, input, select, optgroup { |
| position:fixed;
| | font-family: inherit; |
| top:20px;
| |
| right:20px;
| |
| background:#222;
| |
| color:white;
| |
| padding:10px 14px;
| |
| font-size:20px; | |
| cursor:pointer;
| |
| border-radius:6px;
| |
| z-index:9999;
| |
| }
| |
| | |
| #customMenu{
| |
| display:none;
| |
| position:fixed;
| |
| top:60px;
| |
| right:20px;
| |
| background:white;
| |
| border:1px solid #ddd;
| |
| box-shadow:0 5px 20px rgba(0,0,0,0.2);
| |
| z-index:9999;
| |
| } | | } |
| | /* end */ |
|
| |
|
| #customMenu a{
| | dfn { |
| display:block;
| | font-style: inherit; /* Reset default styling for <dfn> */ |
| padding:10px 20px;
| |
| text-decoration:none;
| |
| color:#333;
| |
| } | | } |
| | | sup, sub { |
| #customMenu a:hover{
| | line-height: 1em; /* Reduce line-height for <sup> and <sub> */ |
| background:#f5f5f5;
| |
| } | | } |
| | /* --------------------- End Font Style ----------------- */ |