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

از ویکی‌مهدی
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
خط ۲۵۷: خط ۲۵۷:
   margin-bottom: 8px;
   margin-bottom: 8px;
}
}
#mw-toc-heading{border-bottom:none}


.vm-home .vm-sidebar #toc ul {
.vm-home .vm-sidebar #toc ul {

نسخهٔ کنونی تا ‏۵ نوامبر ۲۰۲۶، ساعت ۱۹:۴۰

/* دستورات این بخش همهٔ کاربران را تحت تاثیر قرار می‌دهند. */
@import url( 'resources/assets/font/wm/wm.css');

/* Changes the default font used for MediaWiki to Noto Sans (does not include headings or monospaced text): */
body {
  font-family: 'wm', sans-serif;
}
/* Changes the default font used for MediaWiki headings to Noto Serif: */
#content h1, 
#content h2 {
  font-family: 'wm', serif;
}

/* ===== طراحی صفحه اصلی ویکی‌مهدی ===== */

.vm-home {
  --vm-primary: #24577a;
  --vm-primary-dark: #173d59;
  --vm-accent: #d8e9f2;
  --vm-border: #cbd9e2;
  --vm-bg: #f6f9fb;
  color: #202b33;
  line-height: 1.9;
}

.vm-home .vm-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px;
  margin: 12px 0 28px;
  border: 1px solid var(--vm-border);
  border-radius: 14px;
  background: linear-gradient(135deg, #edf6fb, #ffffff);
}

.vm-home .vm-hero-logo {
  flex: 0 0 120px;
  text-align: center;
}

.vm-home .vm-hero-logo .mw-file-element {
  max-width: 100%;
  height: auto;
}

.vm-home .vm-hero-title {
  color: var(--vm-primary-dark);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.5;
}

.vm-home .vm-hero-subtitle {
  color: var(--vm-primary);
  font-size: 1.12rem;
  font-weight: 600;
}

.vm-home .vm-hero-content p {
  margin: 8px 0 0;
}

.vm-home .vm-section {
  margin: 28px 0;
}

.vm-home .vm-section > h2,
.vm-home .vm-article > h2 {
  padding-bottom: 9px;
  margin: 0 0 18px;
  color: var(--vm-primary-dark);
  border-bottom: 2px solid var(--vm-accent);
  font-size: 1.35rem;
}

.vm-home .vm-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.vm-home .vm-topic-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--vm-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.vm-home .vm-topic-card:hover {
  border-color: #80a9c3;
  box-shadow: 0 3px 12px rgba(28, 68, 94, 0.09);
}

.vm-home .vm-topic-grid > .vm-topic-card {
	background-color: var(--vm-bg);
	transition:all .5s;
}

.vm-home .vm-topic-grid > .vm-topic-card:hover {
    background-color:#fff;
    transition:all .25s;
}
.vm-home .vm-topic-grid > .vm-topic-card:after {
    content: "";
    display: flex;
    width: 106px;
    height: 52px;
    background-image: url(/resources/assets/sun-100.webp);
    background-size: contain;
    position: absolute;
    top: 0;
    transform: rotate(180deg);
    left: 7px;
    filter: opacity(0);
    transition:all .5s;
}

.vm-home .vm-topic-grid > .vm-topic-card:hover::after {
    filter: opacity(100%);
    transition:all .25s;
}

.vm-home .vm-topic-card > a {
  display: block;
  color: var(--vm-primary);
  font-weight: 700;
  text-decoration: none;
}

.vm-home .vm-topic-card > a:hover {
  text-decoration: underline;
}

.vm-home .vm-topic-card span {
  display: block;
  margin-top: 3px;
  color: #5c6b75;
  font-size: 0.88rem;
}

.vm-home .vm-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.vm-home .vm-info-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--vm-border);
  border-radius: 10px;
  background:#fff;
}

.vm-info-grid > .vm-info-card{
    transform: scale(1);
    transition:all .5s;
}

.vm-info-grid > .vm-info-card:hover{
    transform: scale(1.07);
    transition:all .25s;
    background:var(--vm-bg);
}

.vm-home .vm-info-card h2 {
  margin: 0 0 8px;
  color: var(--vm-primary-dark);
  font-size: 1.1rem;
}

.vm-home .vm-info-card p {
  margin: 0 0 10px;
}

.vm-home .vm-info-card > a {
  font-weight: 600;
}

.vm-home .vm-article {
  /*margin-top: 30px;*/
  padding: 22px;
  border: 1px solid var(--vm-border);
  border-radius: 10px;
  background: #fff;
}

@media screen and (max-width: 900px) {
  .vm-home .vm-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vm-home .vm-info-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  .vm-home .vm-hero {
    flex-direction: column;
    text-align: center;
    padding: 18px;
  }

  .vm-home .vm-topic-grid {
    grid-template-columns: 1fr;
  }

  .vm-home .vm-article {
    padding: 14px;
  }
}

/* ===== چیدمان دو ستونی صفحه اصلی ===== */

.vm-home .vm-layout {
  display: grid;
  direction: ltr;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

/* ستون فهرست در سمت چپ */

.vm-home .vm-sidebar {
  direction: rtl;
  grid-column: 1;
  min-width: 0;
  position: sticky;
  top: 70px;
}

.vm-home .vm-sidebar #toc {
  display: table;
  float: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px;
  border: 1px solid #cbd9e2;
  border-radius: 10px;
  background: #f6f9fb;
  font-size: 90%;
}

.vm-home .vm-sidebar #toc .toctitle {
  border-bottom: 1px solid #d6e2e9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

#mw-toc-heading{border-bottom:none}

.vm-home .vm-sidebar #toc ul {
  margin: 0;
  padding-right: 18px;
}

/* ستون محتوای اصلی */

.vm-home .vm-main-column {
  direction: rtl;
  grid-column: 2;
  min-width: 0;
}

/* نمایش در موبایل و صفحات باریک */

@media screen and (max-width: 900px) {
  .vm-home .vm-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .vm-home .vm-sidebar {
    position: static;
    width: 100%;
  }

  .vm-home .vm-sidebar #toc {
    width: 100%;
  }

  .vm-home .vm-main-column {
    width: 100%;
  }
}