مدیاویکی:Common.css: تفاوت میان نسخهها
از آیتالله گنجی
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| خط ۴۵۱: | خط ۴۵۱: | ||
padding-right: 1.7em; | padding-right: 1.7em; | ||
font-size: 90%; | font-size: 90%; | ||
} | |||
/* -------------------------------------------------------------------------- */ | |||
/* ناوبری و فهرست مطالب چسبان در دسکتاپ */ | |||
/* -------------------------------------------------------------------------- */ | |||
@media (min-width: 768px) { | |||
#mw-main-container > .row { | |||
align-items: flex-start; | |||
} | |||
#mw-navigation { | |||
position: sticky !important; | |||
top: 1rem; | |||
align-self: flex-start; | |||
max-height: calc(100vh - 2rem); | |||
overflow-x: hidden; | |||
overflow-y: auto; | |||
overscroll-behavior: contain; | |||
scrollbar-width: thin; | |||
scrollbar-color: #aebfbd transparent; | |||
} | |||
#mw-navigation::-webkit-scrollbar { | |||
width: 6px; | |||
} | |||
#mw-navigation::-webkit-scrollbar-thumb { | |||
border-radius: 8px; | |||
background: #aebfbd; | |||
} | |||
} | } | ||
| خط ۴۷۰: | خط ۵۰۱: | ||
body:not(.mw-userloggedin) #footer-places, | body:not(.mw-userloggedin) #footer-places, | ||
body:not(.mw-userloggedin) #footer-icons { | body:not(.mw-userloggedin) #footer-icons { | ||
display: none !important; | |||
} | |||
/* پوسته Medik عنوان کشویی را بیرون از خود پورتلت میسازد؛ قاب والد نیز حذف شود. */ | |||
body:not(.mw-userloggedin) .dropdown:has(#p-cactions), | |||
body:not(.mw-userloggedin) .dropdown:has(#p-tb), | |||
body:not(.mw-userloggedin) .nav-item:has(#p-cactions), | |||
body:not(.mw-userloggedin) .nav-item:has(#p-tb), | |||
body:not(.mw-userloggedin) .btn-group:has(#p-cactions), | |||
body:not(.mw-userloggedin) .btn-group:has(#p-tb), | |||
body:not(.mw-userloggedin) li:has(> #p-cactions), | |||
body:not(.mw-userloggedin) li:has(> #p-tb) { | |||
display: none !important; | display: none !important; | ||
} | } | ||
نسخهٔ ۱۰ سپتامبر ۲۰۲۶، ساعت ۱۷:۴۶
/* ========================================================================== */
/* پایگاه اطلاعرسانی آیتالله گنجی — MediaWiki:Common.css */
/* سازگار با رابط فارسی، پوسته Medik و نمایش موبایل */
/* ========================================================================== */
/* -------------------------------------------------------------------------- */
/* فونت محلی */
/* فایلها باید در پوشه /fonts ریشه همین ویکی قرار داشته باشند. */
/* -------------------------------------------------------------------------- */
@font-face {
font-family: "Vazir";
src: url("/fonts/Vazir.woff2") format("woff2"),
url("/fonts/Vazir.woff") format("woff"),
url("/fonts/Vazir.ttf") format("truetype");
font-style: normal;
font-weight: 400;
font-display: swap;
}
:root {
--ganji-primary: #176b5b;
--ganji-primary-dark: #0f4c43;
--ganji-primary-soft: #eaf3f1;
--ganji-gold: #c69c42;
--ganji-text: #203b3f;
--ganji-muted: #66777b;
--ganji-link: #075c87;
--ganji-border: #d5e1df;
--ganji-surface: #ffffff;
--ganji-surface-soft: #f7faf9;
--ganji-radius: 8px;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
direction: rtl;
}
html,
body,
.mw-body,
.mw-body-content,
.mw-parser-output,
.mw-ui-button,
button,
input,
textarea,
select {
font-family: "Vazir", Tahoma, Arial, sans-serif !important;
}
body {
color: var(--ganji-text);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
/* -------------------------------------------------------------------------- */
/* متن مقاله */
/* -------------------------------------------------------------------------- */
.mw-body-content,
.mw-parser-output {
font-size: 16px;
line-height: 2.05;
}
.mw-parser-output p,
.mw-parser-output li {
overflow-wrap: anywhere;
text-align: justify;
text-justify: inter-word;
}
.mw-parser-output p {
margin-top: .55em;
margin-bottom: 1em;
}
/* عنوانها */
.mw-body h1,
.mw-body h2,
.mw-body h3,
.mw-body h4,
.mw-body h5,
.mw-body h6,
.mw-page-title-main,
.mw-headline {
color: var(--ganji-primary-dark);
font-family: "Vazir", Tahoma, Arial, sans-serif !important;
font-weight: 700;
line-height: 1.65;
}
.mw-body h2 {
margin-top: 1.8em;
padding-bottom: .35em;
border-bottom: 1px solid var(--ganji-border);
}
.mw-body h3 {
margin-top: 1.45em;
}
/* پیوندها */
.mw-body a,
.mw-parser-output a {
color: var(--ganji-link);
text-decoration-thickness: 1px;
text-underline-offset: 3px;
}
.mw-parser-output a:visited {
color: #4f6680;
}
.mw-body a:hover,
.mw-body a:focus-visible,
.mw-parser-output a:hover,
.mw-parser-output a:focus-visible {
color: var(--ganji-primary-dark);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: 2px solid rgba(23, 107, 91, .45);
outline-offset: 2px;
}
/* کد، آدرس و عبارت لاتین */
pre,
code,
kbd,
samp,
.mw-code {
direction: ltr;
font-family: Consolas, "Courier New", monospace !important;
text-align: left;
}
pre {
max-width: 100%;
overflow-x: auto;
}
/* تصاویر */
.mw-parser-output img,
.mw-file-description img,
.thumb img {
max-width: 100%;
height: auto !important;
}
.thumbinner,
.mw-default-size img {
border-radius: 6px;
}
/* نقلقول */
.mw-parser-output blockquote {
margin: 1.25em 0;
padding: .8em 1.1em;
border: 0;
border-right: 4px solid var(--ganji-primary);
border-radius: var(--ganji-radius);
background: var(--ganji-surface-soft);
}
/* منابع */
ol.references {
font-size: 92%;
line-height: 1.9;
}
li.mw-cite-dir-ltr,
.mw-content-ltr {
direction: ltr;
text-align: left;
}
/* -------------------------------------------------------------------------- */
/* جدولهای عمومی ویکی */
/* -------------------------------------------------------------------------- */
.mw-parser-output .wikitable {
max-width: 100%;
margin: 1.2em auto;
border: 1px solid var(--ganji-border);
border-collapse: collapse;
background: var(--ganji-surface);
}
.mw-parser-output .wikitable th,
.mw-parser-output .wikitable td {
padding: .6em .8em;
border: 1px solid var(--ganji-border);
text-align: right;
vertical-align: top;
}
.mw-parser-output .wikitable th {
background: var(--ganji-primary-soft);
color: var(--ganji-primary-dark);
font-weight: 700;
}
.mw-parser-output .wikitable tr:nth-child(even) td {
background: #fbfcfc;
}
.mw-parser-output .wikitable tr:hover td {
background: #f4f9f8;
}
/* -------------------------------------------------------------------------- */
/* جعبه اطلاعات و ناوبری */
/* -------------------------------------------------------------------------- */
.infobox {
float: left;
clear: left;
width: 22em;
max-width: 38%;
margin: .5em 1.25em 1em 0;
padding: .3em;
border: 1px solid var(--ganji-border);
border-radius: var(--ganji-radius);
background: var(--ganji-surface-soft);
color: var(--ganji-text);
font-size: 92%;
line-height: 1.8;
}
.infobox th,
.infobox td {
padding: .4em .55em;
text-align: right;
vertical-align: top;
}
.infobox-title,
.infobox-above,
.infobox caption {
padding: .55em;
background: var(--ganji-primary-soft);
color: var(--ganji-primary-dark);
font-weight: 700;
text-align: center;
}
.navbox {
width: 100%;
margin: 1.25em auto;
overflow: hidden;
border: 1px solid var(--ganji-border);
border-radius: var(--ganji-radius);
background: var(--ganji-surface);
font-size: 92%;
text-align: center;
}
.navbox-title,
.navbox-abovebelow,
.navbox-group {
padding: .45em .75em;
background: var(--ganji-primary-soft);
color: var(--ganji-primary-dark);
font-weight: 700;
}
.navbox-list {
padding: .55em;
line-height: 1.9;
}
/* -------------------------------------------------------------------------- */
/* گریدهای قدیمی صفحهها */
/* -------------------------------------------------------------------------- */
.portal-container-2,
.portal-container-3,
.portal-container-4,
.portal-container-5,
.portal-container-6 {
display: grid;
width: 100%;
gap: 15px;
}
.portal-container-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal-container-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-container-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-container-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.portal-container-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.portal-column-1-2,
.portal-column-1-3,
.portal-column-1-4,
.portal-column-1-5,
.portal-column-1-6 {
grid-column: span 1;
}
.portal-column-2-3,
.portal-column-2-4 {
grid-column: span 2;
}
.portal-column-3-4 {
grid-column: span 3;
}
/* -------------------------------------------------------------------------- */
/* صفحه اصلی */
/* -------------------------------------------------------------------------- */
body.page-صفحهٔ_اصلی #firstHeading,
body.page-صفحهٔ_اصلی .firstHeading {
display: none;
}
body.page-صفحهٔ_اصلی .mw-body-content {
padding-top: 0;
}
/* -------------------------------------------------------------------------- */
/* جدول آرشیو دروس */
/* -------------------------------------------------------------------------- */
.ganji-table-scroll {
width: 100%;
overflow-x: auto;
overscroll-behavior-inline: contain;
-webkit-overflow-scrolling: touch;
}
.ganji-archive-table {
width: max-content !important;
min-width: 100%;
table-layout: auto;
white-space: nowrap;
text-align: center;
vertical-align: middle;
}
.ganji-archive-table th,
.ganji-archive-table td {
white-space: nowrap;
text-align: right;
vertical-align: middle;
}
/* ثابتماندن ستون جلسه در سمت راست */
.ganji-archive-table th:nth-child(1),
.ganji-archive-table td:nth-child(1) {
position: sticky;
right: 0;
z-index: 3;
width: 64px;
min-width: 64px;
max-width: 64px;
background: #f4f9f8;
box-shadow: -1px 0 0 var(--ganji-border);
}
/* فقط سرستون جلسه بالاتر از سلولهای اسکرولشونده قرار بگیرد. */
.ganji-archive-table th:nth-child(1) {
z-index: 4;
background: var(--ganji-primary-soft);
}
.ganji-table-search {
width: min(100%, 430px);
margin: 0 0 1em;
padding: .65em .85em;
border: 1px solid #aebfbd;
border-radius: 6px;
background: #fff;
color: #173f46;
font: inherit;
}
.ganji-table-search:focus {
border-color: var(--ganji-primary);
outline: 2px solid rgba(31, 119, 112, .18);
}
.ganji-table-no-results {
margin: .5em 0 1em;
color: #8a3b32;
}
/* -------------------------------------------------------------------------- */
/* فهرست مطالب سفارشی کنار صفحه */
/* -------------------------------------------------------------------------- */
.ganji-sidebar-toc {
width: 100%;
margin-top: 1.4em;
padding-top: 1em;
border-top: 1px solid var(--ganji-border);
direction: rtl;
text-align: right;
}
.ganji-sidebar-toc-title {
margin-bottom: .55em;
color: var(--ganji-primary-dark);
font-size: 110%;
font-weight: 700;
}
.ganji-sidebar-toc ul {
margin: 0;
padding: 0;
list-style: none;
}
.ganji-sidebar-toc li {
margin: .25em 0;
line-height: 1.7;
text-align: right;
}
.ganji-sidebar-toc a {
display: block;
color: var(--ganji-muted);
text-decoration: none;
}
.ganji-sidebar-toc a:hover {
color: var(--ganji-primary);
}
.ganji-sidebar-toc .ganji-toc-level-h3 {
padding-right: .9em;
font-size: 94%;
}
.ganji-sidebar-toc .ganji-toc-level-h4 {
padding-right: 1.7em;
font-size: 90%;
}
/* -------------------------------------------------------------------------- */
/* ناوبری و فهرست مطالب چسبان در دسکتاپ */
/* -------------------------------------------------------------------------- */
@media (min-width: 768px) {
#mw-main-container > .row {
align-items: flex-start;
}
#mw-navigation {
position: sticky !important;
top: 1rem;
align-self: flex-start;
max-height: calc(100vh - 2rem);
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
scrollbar-color: #aebfbd transparent;
}
#mw-navigation::-webkit-scrollbar {
width: 6px;
}
#mw-navigation::-webkit-scrollbar-thumb {
border-radius: 8px;
background: #aebfbd;
}
}
/* -------------------------------------------------------------------------- */
/* رابط ساده برای کاربران مهمان */
/* کاربران واردشده همچنان تمام منوها و اطلاعات مدیریتی را میبینند. */
/* -------------------------------------------------------------------------- */
body:not(.mw-userloggedin) #p-namespaces,
body:not(.mw-userloggedin) #p-associated-pages,
body:not(.mw-userloggedin) #p-views,
body:not(.mw-userloggedin) #p-cactions,
body:not(.mw-userloggedin) #p-tb,
body:not(.mw-userloggedin) .page-actions,
body:not(.mw-userloggedin) .printfooter,
body:not(.mw-userloggedin) .mw-body-footer,
body:not(.mw-userloggedin) footer.mw-footer,
body:not(.mw-userloggedin) #footer-info,
body:not(.mw-userloggedin) #footer-places,
body:not(.mw-userloggedin) #footer-icons {
display: none !important;
}
/* پوسته Medik عنوان کشویی را بیرون از خود پورتلت میسازد؛ قاب والد نیز حذف شود. */
body:not(.mw-userloggedin) .dropdown:has(#p-cactions),
body:not(.mw-userloggedin) .dropdown:has(#p-tb),
body:not(.mw-userloggedin) .nav-item:has(#p-cactions),
body:not(.mw-userloggedin) .nav-item:has(#p-tb),
body:not(.mw-userloggedin) .btn-group:has(#p-cactions),
body:not(.mw-userloggedin) .btn-group:has(#p-tb),
body:not(.mw-userloggedin) li:has(> #p-cactions),
body:not(.mw-userloggedin) li:has(> #p-tb) {
display: none !important;
}
/* -------------------------------------------------------------------------- */
/* نمایش تبلت و موبایل */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
.portal-container-4,
.portal-container-5,
.portal-container-6 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.infobox {
float: none;
width: 100%;
max-width: 100%;
margin: 1em 0;
}
}
@media (max-width: 650px) {
.mw-body-content,
.mw-parser-output {
font-size: 15px;
line-height: 1.95;
}
.mw-body h1,
.mw-page-title-main {
font-size: 1.65rem;
}
.mw-body h2 {
margin-top: 1.5em;
font-size: 1.35rem;
}
.portal-container-2,
.portal-container-3,
.portal-container-4,
.portal-container-5,
.portal-container-6 {
display: block;
}
.portal-container-2 > *,
.portal-container-3 > *,
.portal-container-4 > *,
.portal-container-5 > *,
.portal-container-6 > * {
margin-bottom: 14px;
}
.portal-column-2-3,
.portal-column-2-4,
.portal-column-3-4 {
grid-column: auto;
}
/* فقط جدولهای عمومی مستقیماً اسکرول میشوند؛ جدول آرشیو پوشش جدا دارد. */
.mw-parser-output .wikitable:not(.ganji-archive-table) {
display: block;
width: 100%;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.ganji-archive-table th:nth-child(1),
.ganji-archive-table td:nth-child(1) {
width: 56px;
min-width: 56px;
max-width: 56px;
}
}
/* چاپ تمیز مقاله */
@media print {
.ganji-table-search,
.ganji-sidebar-toc {
display: none !important;
}
.mw-parser-output a {
color: #000;
text-decoration: none;
}
}