Jump to content

MediaWiki:Common.css: Difference between revisions

From ZelocoreCMS Wiki
v2.0: Global styling β€” wikitable, code blocks, callout boxes, infobox, dark mode, back-to-top, progress bar
v3.1: Move all Main Page CSS here (body.page-Main_Page scope) β€” bypasses TemplateStyles sanitizer; global wikitable/code/callout styles
Line 1: Line 1:
/* ── Hide Main Page title (scoped safely) ──────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════
Β  ZelocoreCMS Wiki β€” MediaWiki:Common.css
Β  Global styles + Main Page full design (v3.1 final)
Β  Loaded as standard stylesheet β€” no TemplateStyles sanitizer
Β  ════════════════════════════════════════════════════════════════════ */
Β 
/* ── GLOBAL: Hide Main Page title ──────────────────────────────────── */
body.page-Main_Page h1#firstHeading,
body.page-Main_Page h1#firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page .mw-page-title-main { display: none !important; }
body.page-Main_Page .mw-page-title-main { display: none !important; }


/* ── Typography improvements ───────────────────────────────────────────────── */
/* ── GLOBAL: Better wikitable ──────────────────────────────────────── */
#mw-content-text h2 {
Β  border-bottom: 2px solid #2563eb;
Β  padding-bottom: 4px;
Β  margin-top: 1.5em;
Β  color: #1e1b4b;
}
#mw-content-text h3 {
Β  color: #2563eb;
Β  margin-top: 1.2em;
}
Β 
/* ── Better wikitable styling ──────────────────────────────────────────────── */
table.wikitable {
table.wikitable {
Β Β  border-radius: 8px;
Β Β  border-radius: 8px;
Β Β  overflow: hidden;
Β Β  overflow: hidden;
Β Β  border-collapse: separate !important;
Β Β  border-collapse: separate;
Β Β  border-spacing: 0 !important;
Β Β  border-spacing: 0;
Β Β  border: 1px solid #e2e8f0;
Β Β  border: 1px solid #e2e8f0;
Β Β  box-shadow: 0 2px 12px rgba(37,99,235,.07);
Β Β  box-shadow: 0 2px 12px rgba(37,99,235,.07);
Β  width: 100%;
}
}
table.wikitable th {
table.wikitable th {
Β Β  background: linear-gradient(90deg, #1e1b4b, #2563eb) !important;
Β Β  background: linear-gradient(90deg, #1e1b4b, #2563eb) !important;
Β Β  color: #fff !important;
Β Β  color: #ffffff !important;
Β Β  font-weight: 700;
Β Β  font-weight: 700;
Β  letter-spacing: .2px;
Β Β  border: none !important;
Β Β  border: none !important;
Β Β  padding: 10px 12px !important;
Β Β  padding: 10px 12px !important;
Line 42: Line 36:
table.wikitable tr:last-child td { border-bottom: none !important; }
table.wikitable tr:last-child td { border-bottom: none !important; }


/* ── Code & syntax highlight improvements ──────────────────────────────────── */
/* ── GLOBAL: Code blocks ───────────────────────────────────────────── */
code, tt, kbd {
code, tt, kbd {
Β Β  background: #f1f5f9;
Β Β  background: #f1f5f9;
Line 60: Line 54:
Β Β  line-height: 1.6;
Β Β  line-height: 1.6;
Β Β  overflow-x: auto;
Β Β  overflow-x: auto;
Β Β  box-shadow: 0 4px 16px rgba(0,0,0,.2);
Β Β  position: relative;
}
Β 
/* ── GLOBAL: Article headings ──────────────────────────────────────── */
#mw-content-text h2 {
Β  border-bottom: 2px solid #2563eb;
Β  padding-bottom: 4px;
Β  margin-top: 1.5em;
Β  color: #1e1b4b;
}
}
.mw-highlight pre { background: #0f172a; border-radius: 8px; }
#mw-content-text h3 { color: #2563eb; }


/* ── Callout boxes (used by templates) ─────────────────────────────────────── */
/* ── GLOBAL: Callout boxes (used by templates) ─────────────────────── */
.cms-note, .cms-warning, .cms-tip, .cms-caution {
.cms-note, .cms-warning, .cms-tip, .cms-caution {
Β Β  border-radius: 8px;
Β Β  border-radius: 8px;
Line 70: Line 72:
Β Β  margin: 14px 0;
Β Β  margin: 14px 0;
Β Β  border-left: 4px solid;
Β Β  border-left: 4px solid;
Β  display: flex;
Β  gap: 12px;
Β  align-items: flex-start;
Β Β  font-size: .92em;
Β Β  font-size: .92em;
Β Β  line-height: 1.6;
Β Β  line-height: 1.6;
Line 80: Line 79:
.cms-tipΒ  Β  { background: #f0fdf4; border-color: #059669; color: #064e3b; }
.cms-tipΒ  Β  { background: #f0fdf4; border-color: #059669; color: #064e3b; }
.cms-caution { background: #fef2f2; border-color: #dc2626; color: #7f1d1d; }
.cms-caution { background: #fef2f2; border-color: #dc2626; color: #7f1d1d; }
.cms-note-icon, .cms-warning-icon, .cms-tip-icon, .cms-caution-icon { font-size: 1.4em; flex-shrink: 0; }
.cms-note-bodyΒ  Β  strong { color: #1d4ed8; }
.cms-warning-body strong { color: #92400e; }
.cms-tip-bodyΒ  Β  strong { color: #065f46; }
.cms-caution-body strong { color: #991b1b; }
/* ── Infobox styling ───────────────────────────────────────────────────────── */
.cms-infobox {
Β  float: right;
Β  clear: right;
Β  margin: 0 0 16px 20px;
Β  background: #f8fafc;
Β  border: 1px solid #e2e8f0;
Β  border-radius: 10px;
Β  overflow: hidden;
Β  font-size: .88em;
Β  min-width: 220px;
Β  max-width: 280px;
Β  box-shadow: 0 2px 12px rgba(37,99,235,.07);
}
.cms-infobox-header {
Β  background: linear-gradient(90deg, #1e1b4b, #2563eb);
Β  color: #fff;
Β  text-align: center;
Β  padding: 10px 12px;
Β  font-weight: 800;
Β  font-size: 1.05em;
}
.cms-infobox-logo { text-align: center; padding: 12px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.cms-infobox table { width: 100%; border-collapse: collapse; }
.cms-infobox td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.cms-infobox td:first-child { font-weight: 700; color: #334155; width: 45%; }
.cms-infobox td:last-child { color: #0f172a; }
.cms-infobox tr:last-child td { border-bottom: none; }
/* ── Stub notice ───────────────────────────────────────────────────────────── */
.cms-stub {
.cms-stub {
Β Β  background: #fefce8;
Β Β  background: #fefce8; border: 1px solid #fde047;
Β  border: 1px solid #fde047;
Β Β  border-radius: 8px; padding: 10px 14px;
Β Β  border-radius: 8px;
Β Β  margin: 16px 0; font-size: .88em; color: #713f12;
Β  padding: 10px 14px;
Β Β  margin: 16px 0;
Β  font-size: .88em;
Β  color: #713f12;
Β  display: flex;
Β  align-items: center;
Β  gap: 10px;
}
Β 
/* ── Dark mode support (toggled via JS) ────────────────────────────────────── */
body.cms-dark-mode {
Β  background: #0f172a !important;
Β  color: #e2e8f0 !important;
}
}
body.cms-dark-mode #content,
body.cms-dark-mode .mw-body { background: #1e293b !important; color: #e2e8f0 !important; }
body.cms-dark-mode .vector-body { background: #1e293b !important; }
body.cms-dark-mode table.wikitable th { background: linear-gradient(90deg,#312e81,#1d4ed8) !important; }
body.cms-dark-mode table.wikitable td { border-color: #334155 !important; color: #e2e8f0 !important; }
body.cms-dark-mode table.wikitable tr:hover td { background: #1e3a5f !important; }
body.cms-dark-mode code, body.cms-dark-mode tt { background: #1e293b; border-color: #334155; color: #a78bfa; }
body.cms-dark-mode h2 { border-color: #3b82f6; color: #93c5fd; }
body.cms-dark-mode h3 { color: #60a5fa; }
body.cms-dark-mode a { color: #60a5fa; }


/* ── Dark mode toggle button ───────────────────────────────────────────────── */
/* ── GLOBAL: Dark mode toggle button ───────────────────────────────── */
#cms-dark-toggle {
#cms-dark-toggle {
Β Β  position: fixed; bottom: 80px; right: 18px;
Β Β  position: fixed; bottom: 80px; right: 18px;
Line 154: Line 94:
Β Β  box-shadow: 0 4px 16px rgba(0,0,0,.3);
Β Β  box-shadow: 0 4px 16px rgba(0,0,0,.3);
Β Β  z-index: 9999;
Β Β  z-index: 9999;
Β  transition: transform .2s, background .2s;
Β  display: flex; align-items: center; justify-content: center;
}
}
#cms-dark-toggle:hover { transform: scale(1.1); background: #2563eb; }
/* ── Back to top button ────────────────────────────────────────────────────── */
#cms-back-top {
#cms-back-top {
Β Β  position: fixed; bottom: 24px; right: 18px;
Β Β  position: fixed; bottom: 24px; right: 18px;
Line 168: Line 103:
Β Β  box-shadow: 0 4px 16px rgba(37,99,235,.4);
Β Β  box-shadow: 0 4px 16px rgba(37,99,235,.4);
Β Β  z-index: 9999; opacity: 0; pointer-events: none;
Β Β  z-index: 9999; opacity: 0; pointer-events: none;
Β  transition: opacity .3s, transform .2s;
Β  display: flex; align-items: center; justify-content: center;
}
}
#cms-back-top.visible { opacity: 1; pointer-events: all; }
#cms-back-top.visible { opacity: 1; pointer-events: all; }
#cms-back-top:hover { transform: scale(1.1); }
/* ── Reading progress bar ──────────────────────────────────────────────────── */
#cms-progress {
#cms-progress {
Β Β  position: fixed; top: 0; left: 0;
Β Β  position: fixed; top: 0; left: 0;
Line 180: Line 110:
Β Β  background: linear-gradient(90deg, #2563eb, #7c3aed);
Β Β  background: linear-gradient(90deg, #2563eb, #7c3aed);
Β Β  z-index: 99999;
Β Β  z-index: 99999;
Β  transition: width .1s linear;
}
}


/* ── "Was this helpful?" widget ────────────────────────────────────────────── */
/* ── GLOBAL: Helpful widget ────────────────────────────────────────── */
#cms-helpful {
#cms-helpful {
Β Β  background: #f8fafc;
Β Β  background: #f8fafc; border: 1px solid #e2e8f0;
Β  border: 1px solid #e2e8f0;
Β Β  border-radius: 10px; padding: 14px 18px;
Β Β  border-radius: 10px;
Β Β  margin: 24px 0 8px; font-size: .9em; color: #334155;
Β  padding: 14px 18px;
Β Β  margin: 24px 0 8px;
Β  display: flex; align-items: center; gap: 14px;
Β  font-size: .9em; color: #334155;
Β  flex-wrap: wrap;
}
}
#cms-helpful-label { font-weight: 700; }
.cms-helpful-btn {
.cms-helpful-btn {
Β Β  background: #fff; border: 1.5px solid #e2e8f0;
Β Β  background: #fff; border: 1.5px solid #e2e8f0;
Β Β  border-radius: 20px; padding: 5px 16px;
Β Β  border-radius: 20px; padding: 5px 16px;
Β Β  cursor: pointer; font-size: .88em; font-weight: 600;
Β Β  cursor: pointer; font-size: .88em; font-weight: 600;
Β Β  transition: background .2s, border-color .2s, transform .15s;
Β Β  margin: 0 4px;
}
}
.cms-helpful-btn:hover { transform: translateY(-1px); }
.cms-helpful-btn.yes:hover { background: #dcfce7; border-color: #059669; color: #065f46; }
.cms-helpful-btn.yes:hover { background: #dcfce7; border-color: #059669; color: #065f46; }
.cms-helpful-btn.no:hoverΒ  { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
.cms-helpful-btn.no:hoverΒ  { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
.cms-helpful-btn.activeΒ  Β  { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }
#cms-helpful-thanks { color: #059669; font-weight: 700; display: none; }


/* ── Responsive nav ────────────────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════════
@media (max-width: 720px) {
Β  MAIN PAGE STYLES β€” scoped to body.page-Main_Page
Β Β  .cms-infobox { float: none; max-width: 100%; margin: 0 0 16px; }
Β  ══════════════════════════════════════════════════════════════════════ */
Β 
/* ── Top banner ────────────────────────────────────────────────────── */
body.page-Main_Page #mp-topbanner {
Β  background: linear-gradient(90deg, #eff6ff, #f5f3ff);
Β  border: 1px solid #c7d2fe;
Β  border-radius: 12px;
Β  padding: 10px 20px;
Β  margin-bottom: 18px;
Β  text-align: center;
Β  font-size: 1em;
Β  color: #1e1b4b;
}
body.page-Main_Page #mp-topbanner a { color: #2563eb; font-weight: 600; }
Β 
/* ── HERO ──────────────────────────────────────────────────────────── */
body.page-Main_Page #mp-hero {
Β  background: linear-gradient(135deg, #1e1b4b 0%, #2563eb 55%, #7c3aed 100%);
Β  border-radius: 12px;
Β  padding: 52px 32px 40px;
Β  margin-bottom: 28px;
Β  text-align: center;
Β  overflow: hidden;
}
body.page-Main_Page #mp-hero-title {
Β  font-size: 2.5em;
Β  font-weight: 800;
Β  color: #ffffff;
Β  margin: 0 0 14px;
Β  text-shadow: 0 2px 12px rgba(0,0,0,.35);
Β  letter-spacing: -1px;
}
body.page-Main_Page #mp-hero-subtitle {
Β  font-size: 1.06em;
Β  color: rgba(255,255,255,.85);
Β  max-width: 600px;
Β  margin: 0 auto 28px;
Β  line-height: 1.65;
}
Β 
/* Stats row */
body.page-Main_Page #mp-hero-stats {
Β  display: flex;
Β  justify-content: center;
Β  flex-wrap: wrap;
Β  gap: 14px;
Β  margin-bottom: 28px;
}
body.page-Main_Page .mp-stat {
Β  display: flex;
Β  flex-direction: column;
Β  align-items: center;
Β  background: rgba(255,255,255,.12);
Β  border: 1px solid rgba(255,255,255,.22);
Β  border-radius: 10px;
Β  padding: 12px 22px;
Β  min-width: 84px;
}
body.page-Main_Page .mp-stat-num {
Β  font-size: 1.7em;
Β  font-weight: 800;
Β  color: #ffffff;
Β  line-height: 1;
}
body.page-Main_Page .mp-stat-label {
Β  font-size: .72em;
Β  color: rgba(255,255,255,.72);
Β  margin-top: 4px;
Β  text-transform: uppercase;
Β  letter-spacing: .5px;
}
Β 
/* Hero actions */
body.page-Main_Page #mp-hero-actions {
Β  display: flex;
Β  flex-direction: column;
Β  align-items: center;
Β  gap: 12px;
}
body.page-Main_Page #mp-hero-links a {
Β  display: inline-block;
Β  background: rgba(255,255,255,.15);
Β  color: #ffffff !important;
Β  border: 1px solid rgba(255,255,255,.3);
Β  border-radius: 20px;
Β  padding: 7px 16px;
Β  margin: 3px;
Β  font-size: .9em;
Β  font-weight: 700;
Β  text-decoration: none !important;
}
body.page-Main_Page #mp-hero-links a:hover {
Β  background: rgba(255,255,255,.28);
}
Β 
/* InputBox search inside hero */
body.page-Main_Page #mp-hero .cdx-search-input,
body.page-Main_Page #mp-hero .mw-inputbox-centered { margin: 0 auto; }
body.page-Main_Page #mp-hero input[name="search"] {
Β  border-radius: 24px !important;
Β  background: rgba(255,255,255,.18) !important;
Β  border: 2px solid rgba(255,255,255,.4) !important;
Β  color: #ffffff !important;
Β  padding: 10px 20px !important;
}
Β 
/* ── Category cards ────────────────────────────────────────────────── */
body.page-Main_Page #mp-categories { margin-bottom: 26px; }
body.page-Main_Page .mp-section-title {
Β  font-size: 1.1em;
Β  font-weight: 800;
Β  color: #0f172a;
Β  margin-bottom: 14px;
Β  padding-bottom: 8px;
Β  border-bottom: 3px solid #2563eb;
Β  display: inline-block;
}
body.page-Main_Page .mp-cat-grid {
Β  display: flex;
Β  flex-wrap: wrap;
Β  gap: 12px;
}
body.page-Main_Page .mp-cat-card {
Β  flex: 1 1 140px;
Β  border-radius: 12px;
Β  padding: 20px 12px;
Β  text-align: center;
Β  border: 1.5px solid #e2e8f0;
Β  transition: transform .22s, box-shadow .22s;
}
body.page-Main_Page .mp-cat-card:hover {
Β  transform: translateY(-5px);
Β  box-shadow: 0 8px 30px rgba(37,99,235,.18);
}
body.page-Main_Page .mp-cat-card a {
Β  display: flex;
Β  flex-direction: column;
Β  align-items: center;
Β  gap: 5px;
Β  text-decoration: none !important;
Β  color: inherit !important;
}
body.page-Main_Page .mp-cat-icon { font-size: 2.2em; line-height: 1; display: block; }
body.page-Main_Page .mp-cat-name { font-size: .88em; font-weight: 800; display: block; margin-top: 4px; }
body.page-Main_Page .mp-cat-desc { font-size: .73em; color: #64748b; display: block; line-height: 1.3; }
Β 
/* Card colour themes */
body.page-Main_Page .mp-cat-bloggingΒ  { background: linear-gradient(135deg,#fef3c7,#fde68a); border-color: #f59e0b; }
body.page-Main_Page .mp-cat-headlessΒ  { background: linear-gradient(135deg,#ede9fe,#ddd6fe); border-color: #7c3aed; }
body.page-Main_Page .mp-cat-ecommerceΒ  { background: linear-gradient(135deg,#dcfce7,#bbf7d0); border-color: #059669; }
body.page-Main_Page .mp-cat-enterprise { background: linear-gradient(135deg,#dbeafe,#bfdbfe); border-color: #2563eb; }
body.page-Main_Page .mp-cat-opensource { background: linear-gradient(135deg,#fee2e2,#fecaca); border-color: #dc2626; }
body.page-Main_Page .mp-cat-saasΒ  Β  Β  { background: linear-gradient(135deg,#e0f2fe,#bae6fd); border-color: #0891b2; }
body.page-Main_Page .mp-cat-wikiΒ  Β  Β  { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border-color: #16a34a; }
body.page-Main_Page .mp-cat-allΒ  Β  Β  Β  { background: linear-gradient(135deg,#f1f5f9,#e2e8f0); border-color: #94a3b8; }
Β 
/* ── Two-column layout ─────────────────────────────────────────────── */
body.page-Main_Page #mp-upper {
Β  display: flex;
Β  flex-wrap: wrap;
Β  gap: 20px;
Β  margin-bottom: 28px;
Β  align-items: flex-start;
}
body.page-Main_Page #mp-leftΒ  { flex: 1 1 55%; min-width: 300px; }
body.page-Main_Page #mp-right { flex: 1 1 38%; min-width: 280px; }
Β 
/* ── Content cards ─────────────────────────────────────────────────── */
body.page-Main_Page .mp-card {
Β  background: #ffffff;
Β  border: 1px solid #e2e8f0;
Β  border-radius: 12px;
Β  overflow: hidden;
Β  margin-bottom: 18px;
Β  box-shadow: 0 2px 14px rgba(37,99,235,.07);
Β  transition: box-shadow .22s, transform .22s;
}
body.page-Main_Page .mp-card:hover {
Β  box-shadow: 0 8px 30px rgba(37,99,235,.16);
Β  transform: translateY(-2px);
}
body.page-Main_Page .mp-card-header {
Β  padding: 11px 16px;
Β  font-weight: 800;
Β  font-size: .95em;
Β  border-bottom: 1px solid #e2e8f0;
}
body.page-Main_Page .mp-card-header-blueΒ  { background: linear-gradient(90deg,#dbeafe,#eff6ff); color: #1d4ed8; }
body.page-Main_Page .mp-card-header-yellow { background: linear-gradient(90deg,#fef9c3,#fefce8); color: #92400e; }
body.page-Main_Page .mp-card-header-greenΒ  { background: linear-gradient(90deg,#dcfce7,#f0fdf4); color: #065f46; }
body.page-Main_Page .mp-card-header-purple { background: linear-gradient(90deg,#ede9fe,#f5f3ff); color: #5b21b6; }
body.page-Main_Page .mp-card-header-grayΒ  { background: linear-gradient(90deg,#f1f5f9,#f8fafc); color: #334155; }
body.page-Main_Page .mp-card-body { padding: 14px 16px; font-size: .9em; line-height: 1.65; color: #0f172a; }
body.page-Main_Page .mp-card-body ul { margin: 0; padding-left: 1.4em; }
body.page-Main_Page .mp-card-body li { margin-bottom: 5px; }
body.page-Main_Page .mp-card-body .wikitable { font-size: .92em; }
Β 
/* ── Portal grid ───────────────────────────────────────────────────── */
body.page-Main_Page #mp-portals {
Β  background: #ffffff;
Β  border: 1px solid #e2e8f0;
Β  border-radius: 12px;
Β  overflow: hidden;
Β  margin-top: 24px;
Β  box-shadow: 0 2px 14px rgba(37,99,235,.07);
}
body.page-Main_Page #mp-portals-header {
Β  background: linear-gradient(90deg, #1e1b4b, #2563eb);
Β  color: #ffffff;
Β  padding: 13px 18px;
Β  font-weight: 800;
Β  font-size: 1em;
}
body.page-Main_Page .mp-portal-grid {
Β  display: flex;
Β  flex-wrap: wrap;
Β  background: #ffffff;
}
body.page-Main_Page .mp-portal-cell {
Β  flex: 1 1 140px;
Β  border-right: 1px solid #e2e8f0;
Β  border-bottom: 1px solid #e2e8f0;
Β  padding: 18px 10px;
Β  text-align: center;
Β  font-size: .85em;
Β  transition: background .18s;
}
body.page-Main_Page .mp-portal-cell:hover { background: #eff6ff; }
body.page-Main_Page .mp-portal-cell a { color: #2563eb !important; font-weight: 700; display: block; text-decoration: none; }
body.page-Main_Page .mp-portal-icon { font-size: 2em; display: block; margin-bottom: 6px; }
body.page-Main_Page .mp-portal-desc { display: block; color: #64748b; font-size: .8em; margin-top: 3px; font-weight: 400; }
Β 
/* ── Contribute CTA ────────────────────────────────────────────────── */
body.page-Main_Page #mp-contribute {
Β  background: linear-gradient(135deg, #059669, #065f46);
Β  border-radius: 12px;
Β  padding: 32px 24px;
Β  text-align: center;
Β  margin-top: 28px;
Β  color: #ffffff;
}
body.page-Main_Page #mp-contribute-title { font-size: 1.3em; font-weight: 800; color: #ffffff; margin-bottom: 10px; }
body.page-Main_Page #mp-contribute-descΒ  { color: rgba(255,255,255,.85); margin-bottom: 20px; line-height: 1.6; }
body.page-Main_Page #mp-contribute a {
Β  display: inline-block;
Β  background: #ffffff;
Β  color: #065f46 !important;
Β  border-radius: 22px;
Β  padding: 9px 22px;
Β  font-weight: 700;
Β  font-size: .92em;
Β  text-decoration: none;
Β  margin: 5px;
}
body.page-Main_Page #mp-contribute a:hover { opacity: .9; }
Β 
/* ── Responsive ────────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
Β Β  body.page-Main_Page #mp-hero { padding: 32px 16px 26px; }
Β  body.page-Main_Page #mp-hero-title { font-size: 1.75em; }
Β  body.page-Main_Page #mp-hero-stats { gap: 10px; }
Β  body.page-Main_Page .mp-stat { padding: 10px 14px; min-width: 68px; }
Β  body.page-Main_Page #mp-upper { display: block; }
Β  body.page-Main_Page #mp-left,
Β  body.page-Main_Page #mp-right { width: 100%; min-width: 0; }
Β  body.page-Main_Page .mp-cat-card { flex: 1 1 calc(50% - 12px); }
Β  body.page-Main_Page .mp-portal-cell { flex: 1 1 calc(50% - 0px); }
}
}

Revision as of 21:48, 29 July 2026

/* ════════════════════════════════════════════════════════════════════
   ZelocoreCMS Wiki β€” MediaWiki:Common.css
   Global styles + Main Page full design (v3.1 final)
   Loaded as standard stylesheet β€” no TemplateStyles sanitizer
   ════════════════════════════════════════════════════════════════════ */

/* ── GLOBAL: Hide Main Page title ──────────────────────────────────── */
body.page-Main_Page h1#firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page .mw-page-title-main { display: none !important; }

/* ── GLOBAL: Better wikitable ──────────────────────────────────────── */
table.wikitable {
  border-radius: 8px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(37,99,235,.07);
  width: 100%;
}
table.wikitable th {
  background: linear-gradient(90deg, #1e1b4b, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 700;
  border: none !important;
  padding: 10px 12px !important;
}
table.wikitable td {
  border: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 8px 12px !important;
  vertical-align: middle !important;
}
table.wikitable tr:hover td { background: #eff6ff !important; }
table.wikitable tr:last-child td { border-bottom: none !important; }

/* ── GLOBAL: Code blocks ───────────────────────────────────────────── */
code, tt, kbd {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .88em;
  color: #7c3aed;
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: .875em;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}

/* ── GLOBAL: Article headings ──────────────────────────────────────── */
#mw-content-text h2 {
  border-bottom: 2px solid #2563eb;
  padding-bottom: 4px;
  margin-top: 1.5em;
  color: #1e1b4b;
}
#mw-content-text h3 { color: #2563eb; }

/* ── GLOBAL: Callout boxes (used by templates) ─────────────────────── */
.cms-note, .cms-warning, .cms-tip, .cms-caution {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 14px 0;
  border-left: 4px solid;
  font-size: .92em;
  line-height: 1.6;
}
.cms-note    { background: #eff6ff; border-color: #2563eb; color: #1e3a5f; }
.cms-warning { background: #fff7ed; border-color: #f59e0b; color: #7c2d12; }
.cms-tip     { background: #f0fdf4; border-color: #059669; color: #064e3b; }
.cms-caution { background: #fef2f2; border-color: #dc2626; color: #7f1d1d; }
.cms-stub {
  background: #fefce8; border: 1px solid #fde047;
  border-radius: 8px; padding: 10px 14px;
  margin: 16px 0; font-size: .88em; color: #713f12;
}

/* ── GLOBAL: Dark mode toggle button ───────────────────────────────── */
#cms-dark-toggle {
  position: fixed; bottom: 80px; right: 18px;
  width: 42px; height: 42px;
  background: #1e1b4b; color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.2em; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  z-index: 9999;
}
#cms-back-top {
  position: fixed; bottom: 24px; right: 18px;
  width: 42px; height: 42px;
  background: #2563eb; color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.2em; cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
  z-index: 9999; opacity: 0; pointer-events: none;
}
#cms-back-top.visible { opacity: 1; pointer-events: all; }
#cms-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  z-index: 99999;
}

/* ── GLOBAL: Helpful widget ────────────────────────────────────────── */
#cms-helpful {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 14px 18px;
  margin: 24px 0 8px; font-size: .9em; color: #334155;
}
.cms-helpful-btn {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 20px; padding: 5px 16px;
  cursor: pointer; font-size: .88em; font-weight: 600;
  margin: 0 4px;
}
.cms-helpful-btn.yes:hover { background: #dcfce7; border-color: #059669; color: #065f46; }
.cms-helpful-btn.no:hover  { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }

/* ══════════════════════════════════════════════════════════════════════
   MAIN PAGE STYLES β€” scoped to body.page-Main_Page
   ══════════════════════════════════════════════════════════════════════ */

/* ── Top banner ────────────────────────────────────────────────────── */
body.page-Main_Page #mp-topbanner {
  background: linear-gradient(90deg, #eff6ff, #f5f3ff);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 10px 20px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 1em;
  color: #1e1b4b;
}
body.page-Main_Page #mp-topbanner a { color: #2563eb; font-weight: 600; }

/* ── HERO ──────────────────────────────────────────────────────────── */
body.page-Main_Page #mp-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #2563eb 55%, #7c3aed 100%);
  border-radius: 12px;
  padding: 52px 32px 40px;
  margin-bottom: 28px;
  text-align: center;
  overflow: hidden;
}
body.page-Main_Page #mp-hero-title {
  font-size: 2.5em;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  letter-spacing: -1px;
}
body.page-Main_Page #mp-hero-subtitle {
  font-size: 1.06em;
  color: rgba(255,255,255,.85);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* Stats row */
body.page-Main_Page #mp-hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
body.page-Main_Page .mp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  padding: 12px 22px;
  min-width: 84px;
}
body.page-Main_Page .mp-stat-num {
  font-size: 1.7em;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
body.page-Main_Page .mp-stat-label {
  font-size: .72em;
  color: rgba(255,255,255,.72);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Hero actions */
body.page-Main_Page #mp-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
body.page-Main_Page #mp-hero-links a {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 7px 16px;
  margin: 3px;
  font-size: .9em;
  font-weight: 700;
  text-decoration: none !important;
}
body.page-Main_Page #mp-hero-links a:hover {
  background: rgba(255,255,255,.28);
}

/* InputBox search inside hero */
body.page-Main_Page #mp-hero .cdx-search-input,
body.page-Main_Page #mp-hero .mw-inputbox-centered { margin: 0 auto; }
body.page-Main_Page #mp-hero input[name="search"] {
  border-radius: 24px !important;
  background: rgba(255,255,255,.18) !important;
  border: 2px solid rgba(255,255,255,.4) !important;
  color: #ffffff !important;
  padding: 10px 20px !important;
}

/* ── Category cards ────────────────────────────────────────────────── */
body.page-Main_Page #mp-categories { margin-bottom: 26px; }
body.page-Main_Page .mp-section-title {
  font-size: 1.1em;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid #2563eb;
  display: inline-block;
}
body.page-Main_Page .mp-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
body.page-Main_Page .mp-cat-card {
  flex: 1 1 140px;
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  border: 1.5px solid #e2e8f0;
  transition: transform .22s, box-shadow .22s;
}
body.page-Main_Page .mp-cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(37,99,235,.18);
}
body.page-Main_Page .mp-cat-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none !important;
  color: inherit !important;
}
body.page-Main_Page .mp-cat-icon { font-size: 2.2em; line-height: 1; display: block; }
body.page-Main_Page .mp-cat-name { font-size: .88em; font-weight: 800; display: block; margin-top: 4px; }
body.page-Main_Page .mp-cat-desc { font-size: .73em; color: #64748b; display: block; line-height: 1.3; }

/* Card colour themes */
body.page-Main_Page .mp-cat-blogging   { background: linear-gradient(135deg,#fef3c7,#fde68a); border-color: #f59e0b; }
body.page-Main_Page .mp-cat-headless   { background: linear-gradient(135deg,#ede9fe,#ddd6fe); border-color: #7c3aed; }
body.page-Main_Page .mp-cat-ecommerce  { background: linear-gradient(135deg,#dcfce7,#bbf7d0); border-color: #059669; }
body.page-Main_Page .mp-cat-enterprise { background: linear-gradient(135deg,#dbeafe,#bfdbfe); border-color: #2563eb; }
body.page-Main_Page .mp-cat-opensource { background: linear-gradient(135deg,#fee2e2,#fecaca); border-color: #dc2626; }
body.page-Main_Page .mp-cat-saas       { background: linear-gradient(135deg,#e0f2fe,#bae6fd); border-color: #0891b2; }
body.page-Main_Page .mp-cat-wiki       { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border-color: #16a34a; }
body.page-Main_Page .mp-cat-all        { background: linear-gradient(135deg,#f1f5f9,#e2e8f0); border-color: #94a3b8; }

/* ── Two-column layout ─────────────────────────────────────────────── */
body.page-Main_Page #mp-upper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}
body.page-Main_Page #mp-left  { flex: 1 1 55%; min-width: 300px; }
body.page-Main_Page #mp-right { flex: 1 1 38%; min-width: 280px; }

/* ── Content cards ─────────────────────────────────────────────────── */
body.page-Main_Page .mp-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 2px 14px rgba(37,99,235,.07);
  transition: box-shadow .22s, transform .22s;
}
body.page-Main_Page .mp-card:hover {
  box-shadow: 0 8px 30px rgba(37,99,235,.16);
  transform: translateY(-2px);
}
body.page-Main_Page .mp-card-header {
  padding: 11px 16px;
  font-weight: 800;
  font-size: .95em;
  border-bottom: 1px solid #e2e8f0;
}
body.page-Main_Page .mp-card-header-blue   { background: linear-gradient(90deg,#dbeafe,#eff6ff); color: #1d4ed8; }
body.page-Main_Page .mp-card-header-yellow { background: linear-gradient(90deg,#fef9c3,#fefce8); color: #92400e; }
body.page-Main_Page .mp-card-header-green  { background: linear-gradient(90deg,#dcfce7,#f0fdf4); color: #065f46; }
body.page-Main_Page .mp-card-header-purple { background: linear-gradient(90deg,#ede9fe,#f5f3ff); color: #5b21b6; }
body.page-Main_Page .mp-card-header-gray   { background: linear-gradient(90deg,#f1f5f9,#f8fafc); color: #334155; }
body.page-Main_Page .mp-card-body { padding: 14px 16px; font-size: .9em; line-height: 1.65; color: #0f172a; }
body.page-Main_Page .mp-card-body ul { margin: 0; padding-left: 1.4em; }
body.page-Main_Page .mp-card-body li { margin-bottom: 5px; }
body.page-Main_Page .mp-card-body .wikitable { font-size: .92em; }

/* ── Portal grid ───────────────────────────────────────────────────── */
body.page-Main_Page #mp-portals {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 24px;
  box-shadow: 0 2px 14px rgba(37,99,235,.07);
}
body.page-Main_Page #mp-portals-header {
  background: linear-gradient(90deg, #1e1b4b, #2563eb);
  color: #ffffff;
  padding: 13px 18px;
  font-weight: 800;
  font-size: 1em;
}
body.page-Main_Page .mp-portal-grid {
  display: flex;
  flex-wrap: wrap;
  background: #ffffff;
}
body.page-Main_Page .mp-portal-cell {
  flex: 1 1 140px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 10px;
  text-align: center;
  font-size: .85em;
  transition: background .18s;
}
body.page-Main_Page .mp-portal-cell:hover { background: #eff6ff; }
body.page-Main_Page .mp-portal-cell a { color: #2563eb !important; font-weight: 700; display: block; text-decoration: none; }
body.page-Main_Page .mp-portal-icon { font-size: 2em; display: block; margin-bottom: 6px; }
body.page-Main_Page .mp-portal-desc { display: block; color: #64748b; font-size: .8em; margin-top: 3px; font-weight: 400; }

/* ── Contribute CTA ────────────────────────────────────────────────── */
body.page-Main_Page #mp-contribute {
  background: linear-gradient(135deg, #059669, #065f46);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  margin-top: 28px;
  color: #ffffff;
}
body.page-Main_Page #mp-contribute-title { font-size: 1.3em; font-weight: 800; color: #ffffff; margin-bottom: 10px; }
body.page-Main_Page #mp-contribute-desc  { color: rgba(255,255,255,.85); margin-bottom: 20px; line-height: 1.6; }
body.page-Main_Page #mp-contribute a {
  display: inline-block;
  background: #ffffff;
  color: #065f46 !important;
  border-radius: 22px;
  padding: 9px 22px;
  font-weight: 700;
  font-size: .92em;
  text-decoration: none;
  margin: 5px;
}
body.page-Main_Page #mp-contribute a:hover { opacity: .9; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
  body.page-Main_Page #mp-hero { padding: 32px 16px 26px; }
  body.page-Main_Page #mp-hero-title { font-size: 1.75em; }
  body.page-Main_Page #mp-hero-stats { gap: 10px; }
  body.page-Main_Page .mp-stat { padding: 10px 14px; min-width: 68px; }
  body.page-Main_Page #mp-upper { display: block; }
  body.page-Main_Page #mp-left,
  body.page-Main_Page #mp-right { width: 100%; min-width: 0; }
  body.page-Main_Page .mp-cat-card { flex: 1 1 calc(50% - 12px); }
  body.page-Main_Page .mp-portal-cell { flex: 1 1 calc(50% - 0px); }
}