MediaWiki:Common.css: Difference between revisions

From Questlandia Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Base & Background
   Base & Background
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
html, body {
html, body {
  margin: 0;
  padding: 0;
   font-family: 'Cinzel', Georgia, serif;
   font-family: 'Cinzel', Georgia, serif;
   background: url('/images/wiki_background.png') center center fixed no-repeat;
   background: url('/images/wiki_background.png') center center fixed no-repeat;
   background-size: cover;
   background-size: cover;
   color: #eee;
   color: #333;
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Header (top bar)
   Header (full width)
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#mw-head {
#mw-head {
  clear: both;
   background: #4B0082;
   background: #4B0082;
   border-bottom: 3px solid #F28C28;
   border-bottom: 3px solid #F28C28;
   padding: 0.5em 2em;
   padding: 0.75em 2em;
  position: relative;
  z-index: 20;
}
}
#p-personal, #p-search { /* user links & search */
 
#p-personal, #p-search {
   background: rgba(255,255,255,0.9);
   background: rgba(255,255,255,0.9);
   border-radius: 6px;
   border-radius: 6px;
   padding: 0.4em 0.8em;
   padding: 0.5em 1em;
   margin: 0.5em;
   margin: 0.5em;
}
}
Line 33: Line 39:
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Sidebar
   Sidebar (float layout)
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#mw-panel {
#mw-panel {
   background: rgba(255,255,255,0.9);
   float: left;
   border-radius: 10px;
   width: 260px;
   box-shadow: 0 2px 8px rgba(0,0,0,0.2);
   margin: 1.5em;
  margin: 1em;
  background: rgba(255,255,255,0.95);
   padding: 1em;
   padding: 1em;
}
  border-radius: 8px;
/* add spacing between sidebar and content */
   box-shadow: 0 3px 10px rgba(0,0,0,0.2);
#mw-body {
   z-index: 10;
   display: flex;
}
#mw-content-text {
   margin-left: 1em;
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Content box
   Main Content (cleared float)
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#content {
#content {
  margin: 1.5em 2em 2em calc(260px + 1.5em);
   background: rgba(255,255,255,0.95);
   background: rgba(255,255,255,0.95);
  border-radius: 10px;
   padding: 2em;
   padding: 2em;
   box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
   margin-bottom: 2em;
   box-shadow: 0 3px 12px rgba(0,0,0,0.1);
   overflow: visible;
  clear: right;
}
}


/* ——————————————————————————————————————————
/* Ensure the inner content area text aligns properly */
#mw-content-text {
  margin: 0;
  padding: 0;
}
 
/* ─────────────────────────────────────────────────────────
   Headings & Links
   Headings & Links
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
h1, h2, h3 {
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
   color: #C0392B;
   color: #C0392B;
  margin-top: 1em;
  margin-bottom: 0.5em;
}
}
a {
a {
   color: #229C88;
   color: #229C88;
  text-decoration: none;
}
}
a:hover {
a:hover {
   color: #D645B1;
   color: #D645B1;
  text-decoration: underline;
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Tables
   Tables (RPG‑style)
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
table.wikitable {
table.wikitable {
   width: 100%;
   width: 100%;
   border-collapse: collapse;
   border-collapse: collapse;
  margin: 1.5em 0;
   background: transparent;
   background: transparent;
  margin-bottom: 2em;
}
}
table.wikitable caption {
table.wikitable caption {
Line 89: Line 105:
   padding: 0.5em;
   padding: 0.5em;
   font-weight: bold;
   font-weight: bold;
  text-align: center;
}
}
table.wikitable th {
table.wikitable th {
Line 94: Line 111:
   color: #222;
   color: #222;
   border: 1px solid #ccc;
   border: 1px solid #ccc;
   padding: 0.6em;
   padding: 0.75em;
  text-align: center;
}
}
table.wikitable td {
table.wikitable td {
   background: transparent;
   background: transparent;
   border: 1px solid #ccc;
   border: 1px solid #ccc;
   padding: 0.6em;
   padding: 0.75em;
  vertical-align: top;
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Footer
   Footer (full width)
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#footer {
#footer {
  clear: both;
   background: #4B0082;
   background: #4B0082;
   color: #ccc;
   color: #eee;
   padding: 1em;
   padding: 1em 2em;
   text-align: center;
   text-align: center;
   border-top: 2px solid #D645B1;
   border-top: 2px solid #D645B1;
  position: relative;
  z-index: 20;
}
}
#footer a {
#footer a {
   color: #eee !important;
   color: #ddd !important;
  margin: 0 0.5em;
  font-size: 0.9em;
}
}
#footer a:hover {
#footer a:hover {
Line 120: Line 144:
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Body Wrapper: side‑by‑side layout with gap
   Responsive: stack sidebar + content
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#mw-body-wrapper {
@media (max-width: 900px) {
  display: flex;
   #mw-head, #footer {
  flex-wrap: wrap;        /* allow stacking on narrow viewports */
     padding: 1em;
  gap: 20px;              /* space between sidebar and content */
  align-items: flex-start;
  margin: 0 20px;        /* overall horizontal padding */
}
 
/* ——————————————————————————————————————————
  Sidebar
  —————————————————————————————————————————— */
#mw-panel {
  flex: 0 0 250px;        /* fixed width */
  background: rgba(255,255,255,0.95);
  border-radius: 8px;    /* rounded corners */
  padding: 1em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
 
/* ——————————————————————————————————————————
  Main Content Area
  —————————————————————————————————————————— */
#content {
   flex: 1 1 auto;        /* fill remaining space */
  background: rgba(255,255,255,0.95);
  border-radius: 8px;    /* rounded corners */
  padding: 2em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  overflow: visible;      /* prevent inner overlap */
}
 
/* ——————————————————————————————————————————
  Header & Footer Panels
  —————————————————————————————————————————— */
#mw-head, #footer {
  border-radius: 8px;     /* soften all major containers */
}
 
/* ——————————————————————————————————————————
  Ensure No Overlap on Smaller Screens
  —————————————————————————————————————————— */
@media (max-width: 800px) {
  #mw-body-wrapper {
    flex-direction: column;
    gap: 10px;
    margin: 0 10px;
   }
   }
   #mw-panel {
   #mw-panel, #content {
     width: 100% !important;
    float: none;
    margin: 1em !important;
     width: auto !important;
   }
   }
   #content {
   #content {
     width: 100% !important;
     margin-top: 0;
  }
}
 
/* 1. Make the Vector body wrapper flex instead of floats */
#mw-body {
  display: flex;
  flex-wrap: wrap;        /* allow stacking on narrow viewports */
  gap: 20px;              /* space between sidebar and content */
  align-items: flex-start;
  margin: 0 20px;
}
 
/* 2. Disable the old float on the sidebar portlet */
#mw-panel {
  float: none !important;
  flex: 0 0 250px;        /* fixed sidebar width */
}
 
/* 3. Let content fill remaining space */
#content, #mw-content-text {
  flex: 1 1 auto;
  width: auto !important; /* override any inline widths */
}
 
/* 4. Ensure inner elements don’t collapse */
#mw-body > * {
  min-width: 0;          /* allow flex children to shrink */
}
 
/* 5. Rounded corners everywhere */
#mw-panel,
#content,
#mw-head,
#footer {
  border-radius: 8px;
}
 
/* ——————————————————————————————————————————
  Vector sidebar & content layout fix
  —————————————————————————————————————————— */
 
/* 1. Sidebar: fixed width, remove any floats, add margin & rounding */
#mw-panel {
  position: relative !important;
  float: none !important;
  width: 240px !important;
  margin: 20px !important;    /* space around the panel */
  border-radius: 8px !important;
  z-index: 2;
}
 
/* 2. Push the main content over so it sits to the right of the sidebar */
#content, #mw-content-text {
  position: relative;
  margin: 20px 20px 20px 300px !important; /* left margin = sidebar width + gap */
  border-radius: 8px;                      /* match corners */
  z-index: 1;
}
 
/* 3. Ensure the header stays on top */
#mw-head {
  position: relative;
  z-index: 10;
}
 
/* 4. Responsive fallback: stack on small screens */
@media (max-width: 900px) {
  #mw-panel, #content, #mw-content-text {
    float: none !important;
    width: auto !important;
    margin: 10px !important;
  }
}
 
 
/* === RESET to float layout === */
#mw-body, #mw-body-wrapper {
  display: block !important;
}
 
/* === Sidebar float-based layout === */
#mw-panel {
  float: left !important;
  width: 250px !important;
  margin: 1em !important;        /* space around the panel */
  border-radius: 8px !important;  /* rounded corners */
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
  z-index: 2;
}
 
/* === Content cleared to right of sidebar === */
#mw-content-text, #content {
  margin: 1em 1em 2em calc(250px + 1em) !important; /* left = sidebar width + sidebar left margin */
  border-radius: 8px !important;
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1) !important;
  z-index: 1;
}
 
/* === Ensure header/footer stay full width on top/back === */
#mw-head, #footer {
  clear: both;
  position: relative;
  z-index: 10;
}
 
/* === Mobile stack fallback === */
@media (max-width: 800px) {
  #mw-panel, #mw-content-text, #content {
    float: none !important;
    width: auto !important;
    margin: 1em !important;
   }
   }
}
}

Revision as of 15:03, 19 April 2025

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');

/* ─────────────────────────────────────────────────────────
   Base & Background
───────────────────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Cinzel', Georgia, serif;
  background: url('/images/wiki_background.png') center center fixed no-repeat;
  background-size: cover;
  color: #333;
}

/* ─────────────────────────────────────────────────────────
   Header (full width)
───────────────────────────────────────────────────────── */
#mw-head {
  clear: both;
  background: #4B0082;
  border-bottom: 3px solid #F28C28;
  padding: 0.75em 2em;
  position: relative;
  z-index: 20;
}

#p-personal, #p-search {
  background: rgba(255,255,255,0.9);
  border-radius: 6px;
  padding: 0.5em 1em;
  margin: 0.5em;
}
#p-personal a, #p-search a {
  color: #4B0082 !important;
  text-decoration: none;
}
#p-personal a:hover, #p-search a:hover {
  color: #E67E22 !important;
}

/* ─────────────────────────────────────────────────────────
   Sidebar (float layout)
───────────────────────────────────────────────────────── */
#mw-panel {
  float: left;
  width: 260px;
  margin: 1.5em;
  background: rgba(255,255,255,0.95);
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  z-index: 10;
}

/* ─────────────────────────────────────────────────────────
   Main Content (cleared float)
───────────────────────────────────────────────────────── */
#content {
  margin: 1.5em 2em 2em calc(260px + 1.5em);
  background: rgba(255,255,255,0.95);
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  overflow: visible;
  clear: right;
}

/* Ensure the inner content area text aligns properly */
#mw-content-text {
  margin: 0;
  padding: 0;
}

/* ─────────────────────────────────────────────────────────
   Headings & Links
───────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  color: #C0392B;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

a {
  color: #229C88;
  text-decoration: none;
}
a:hover {
  color: #D645B1;
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────
   Tables (RPG‑style)
───────────────────────────────────────────────────────── */
table.wikitable {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background: transparent;
}
table.wikitable caption {
  background: #4B0082;
  color: #fff;
  padding: 0.5em;
  font-weight: bold;
  text-align: center;
}
table.wikitable th {
  background: #E0D6F9;
  color: #222;
  border: 1px solid #ccc;
  padding: 0.75em;
  text-align: center;
}
table.wikitable td {
  background: transparent;
  border: 1px solid #ccc;
  padding: 0.75em;
  vertical-align: top;
}

/* ─────────────────────────────────────────────────────────
   Footer (full width)
───────────────────────────────────────────────────────── */
#footer {
  clear: both;
  background: #4B0082;
  color: #eee;
  padding: 1em 2em;
  text-align: center;
  border-top: 2px solid #D645B1;
  position: relative;
  z-index: 20;
}
#footer a {
  color: #ddd !important;
  margin: 0 0.5em;
  font-size: 0.9em;
}
#footer a:hover {
  color: #fff !important;
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────
   Responsive: stack sidebar + content
───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #mw-head, #footer {
    padding: 1em;
  }
  #mw-panel, #content {
    float: none;
    margin: 1em !important;
    width: auto !important;
  }
  #content {
    margin-top: 0;
  }
}