MediaWiki:Common.css: Difference between revisions

From Questlandia Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


/*─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
   BASE & BACKGROUND
   1) Reset & Base
─────────────────────────────────────────────────────────*/
─────────────────────────────────────────────────────────*/
html, body {
html, body {
Line 13: Line 13:


/*─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
   HEADER BAR
   2) Header Bar & Menus
─────────────────────────────────────────────────────────*/
─────────────────────────────────────────────────────────*/
/* Purple background */
#mw-head {
#mw-head {
   clear: both;
   clear: both;
   background: #4B0082;
   background: #4B0082;
   border-bottom: 3px solid #F28C28;
   border-bottom: 3px solid #F28C28;
   padding: 10px 260px 10px 1.5em; /* leave space on the left for the logo/sidebar */
   padding: 0.5em 1em;
   position: relative; z-index: 100;
   position: relative; z-index: 100;
   box-sizing: border-box;
   box-sizing: border-box;
}
}


/* Page action tabs (Read/Edit/History) */
/* Float tabs (Read/Edit, etc.) */
#p-namespaces, #p-cactions {
#p-namespaces, #p-cactions {
   display: inline-block;
   float: left !important;
  vertical-align: middle;
   margin: 0.4em 0.8em !important;
   margin-right: 1em;
}
}
#p-namespaces .body, #p-cactions .body {
#p-namespaces .body, #p-cactions .body {
   background: #fff;
   background: #fff !important;
   border-radius: 4px;
   border-radius: 4px !important;
   overflow: hidden;
   padding: 0 !important;
}
}
#p-namespaces li, #p-cactions li { display: inline-block; }
#p-namespaces li, #p-cactions li {
#p-namespaces a, #p-cactions a {
   display: inline-block;
   display: inline-block;
   padding: 6px 10px;
   margin: 0 !important;
  color: #229C88;
  text-decoration: none;
}
}
#p-cactions .selected a, #p-namespaces .selected a {
#p-namespaces a, #p-cactions a {
  background: #E0D6F9;
  color: #4B0082;
}
 
/* Personal tools (login/watchlist/etc) */
#p-personal {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  right: 1.5em;
}
#p-personal .body {
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 6px;
}
#p-personal li {
   display: inline-block;
   display: inline-block;
   margin-left: 0.8em;
   padding: 5px 10px;
}
   color: #229C88 !important;
#p-personal a {
  text-decoration: none!important;
   color: #4B0082 !important; text-decoration: none;
}
}
#p-personal a:hover {
#p-namespaces .selected a,
   color: #E67E22 !important;
#p-cactions .selected a {
  background: #E0D6F9 !important;
   color: #4B0082 !important;
}
}


/* Search box */
/* Float search */
#p-search {
#p-search {
   position: absolute;
   float: right !important;
  top: 50%; transform: translateY(-50%);
   margin: 0.4em 0.8em !important;
   right: 12em; /* adjust if you add more tools */
}
}
#p-search .body {
#p-search .body {
   background: rgba(255,255,255,0.9);
   background: rgba(255,255,255,0.9) !important;
   border-radius: 4px;
   border-radius: 4px !important;
   padding: 4px;
   padding: 4px !important;
  display: flex;
  align-items: center;
}
}
#p-search input[type="search"] {
#p-search input[type="search"] {
Line 92: Line 71:
   background: #4B0082;
   background: #4B0082;
   color: #fff;
   color: #fff;
  border-radius: 0 4px 4px 0;
   padding: 4px 8px;
   padding: 4px 8px;
  border-radius: 0 4px 4px 0;
   cursor: pointer;
   cursor: pointer;
}
/* Float personal tools */
#p-personal {
  float: right !important;
  margin: 0.4em 0.8em !important;
}
#p-personal .body {
  background: rgba(255,255,255,0.9) !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
}
#p-personal li {
  display: inline-block;
  margin-left: 0.8em!important;
}
#p-personal a {
  color: #4B0082 !important;
  text-decoration: none!important;
}
#p-personal a:hover {
  color: #E67E22 !important;
}
/* Force header to wrap floats */
#mw-head:after {
  content: '';
  display: table;
  clear: both;
}
}


/*─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
   SIDEBAR (float)
   3) Sidebar & Content
─────────────────────────────────────────────────────────*/
─────────────────────────────────────────────────────────*/
/* Sidebar */
#mw-panel {
#mw-panel {
   float: left;
   float: left;
   width: 260px;
   width: 260px;
   margin: 1.5em 1em 1.5em 1em;
   margin: 1.5em 1em 1.5em 1.5em;
   background: rgba(255,255,255,0.95);
   background: rgba(255,255,255,0.95);
   padding: 1em;
   padding: 1em;
   border-radius: 8px;
   border-radius: 8px;
   box-shadow: 0 3px 10px rgba(0,0,0,0.2);
   box-shadow: 0 3px 10px rgba(0,0,0,0.2);
   z-index: 50;
   z-index: 10;
}
.mw-portlet {
  margin-bottom: 1.5em;
}
.mw-portlet-heading, .mw-portlet h3 {
  font-weight: bold;
  margin-bottom: 0.5em;
}
.mw-portlet ul {
  list-style: none; margin: 0; padding: 0;
}
.mw-portlet li {
  margin: 0.4em 0;
}
.mw-portlet a {
  color: #4B0082; text-decoration: none;
}
.mw-portlet a:hover {
  color: #E67E22;
}
}


/*─────────────────────────────────────────────────────────
/* Main content offset to clear sidebar */
  MAIN CONTENT (cleared float)
─────────────────────────────────────────────────────────*/
#content {
#content {
   margin: 1.5em 1em 2em calc(260px + 1.5em);
   margin: 1.5em 1.5em 2em calc(260px + 1.5em);
   background: rgba(255,255,255,0.95);
   background: rgba(255,255,255,0.95);
   padding: 2em;
   padding: 2em;
Line 140: Line 128:
   box-shadow: 0 3px 12px rgba(0,0,0,0.1);
   box-shadow: 0 3px 12px rgba(0,0,0,0.1);
   clear: right;
   clear: right;
   position: relative; z-index: 10;
   position: relative; z-index: 5;
}
#mw-content-text {
  margin: 0; padding: 0;
}
 
/*─────────────────────────────────────────────────────────
  HEADINGS & LINKS
─────────────────────────────────────────────────────────*/
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  color: #C0392B;
  margin: 1em 0 0.5em;
}
a {
  color: #229C88; text-decoration: none;
}
a:hover {
  color: #D645B1; text-decoration: underline;
}
}


/*─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
   TABLES
   4) Footer
─────────────────────────────────────────────────────────*/
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
─────────────────────────────────────────────────────────*/
─────────────────────────────────────────────────────────*/
#footer {
#footer {
Line 215: Line 155:


/*─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
   RESPONSIVE (stack on narrow screens)
   5) Responsive
─────────────────────────────────────────────────────────*/
─────────────────────────────────────────────────────────*/
@media (max-width: 900px) {
@media (max-width: 900px) {
   #mw-head {
   /* Stack everything */
    padding: 10px 1em;
   #p-namespaces, #p-cactions, #p-search, #p-personal {
  }
     float: none!important;
   #p-namespaces, #p-cactions {
     margin: 0.5em !important;
    display: block; text-align: center; margin: 0.5em 0;
    text-align: center;
  }
  #p-personal, #p-search {
     position: relative; transform: none; top: auto; right: auto;
     margin: 0.5em auto; display: block;
   }
   }
   #mw-panel, #content {
   #mw-panel, #content {
     float: none; width: auto; margin: 1em !important;
     float: none!important;
    width: auto!important;
    margin: 1em!important;
   }
   }
   #content {
   #content {
     clear: none;
     clear: none;
   }
   }
}
/* ─────────────────────────────────────────────────────────
  FIX VECTOR HEADER: FLOAT PORTLETS BACK IN PLACE
─────────────────────────────────────────────────────────*/
/* Ensure header is positioned correctly */
#mw-head {
  position: relative;
  overflow: visible;
  padding: 0.75em 1.5em; /* adjust to taste */
}
/* Namespaces (Read/Edit tabs) & actions (History) */
#p-namespaces, #p-cactions {
  float: left !important;
  margin: 0.6em 0.8em !important;
}
#p-namespaces .body, #p-cactions .body {
  background: #fff !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
/* Search box */
#p-search {
  float: right !important;
  margin: 0.6em 0.8em !important;
}
#p-search .body {
  background: rgba(255,255,255,0.9) !important;
  border-radius: 4px !important;
  padding: 4px !important;
}
/* Personal tools (login/watchlist/etc) */
#p-personal {
  float: right !important;
  margin: 0.6em 0.4em !important;
}
#p-personal .body {
  background: rgba(255,255,255,0.9) !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
}
#p-personal li {
  display: inline-block !important;
  margin-left: 0.8em !important;
}
/* Clear floats so header doesn’t collapse */
#mw-head .portal {
  clear: none !important;
}
/* Make sure header height expands to contain floats */
#mw-head:after {
  content: '';
  display: table;
  clear: both;
}
/* Adjust content margin (sidebar still floats at left) */
#content {
  margin-left: calc(260px + 1.5em) !important;
}
}

Revision as of 15:11, 19 April 2025

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

/*─────────────────────────────────────────────────────────
  1) Reset & Base
─────────────────────────────────────────────────────────*/
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;
}

/*─────────────────────────────────────────────────────────
  2) Header Bar & Menus
─────────────────────────────────────────────────────────*/
/* Purple background */
#mw-head {
  clear: both;
  background: #4B0082;
  border-bottom: 3px solid #F28C28;
  padding: 0.5em 1em;
  position: relative; z-index: 100;
  box-sizing: border-box;
}

/* Float tabs (Read/Edit, etc.) */
#p-namespaces, #p-cactions {
  float: left !important;
  margin: 0.4em 0.8em !important;
}
#p-namespaces .body, #p-cactions .body {
  background: #fff !important;
  border-radius: 4px !important;
  padding: 0 !important;
}
#p-namespaces li, #p-cactions li {
  display: inline-block;
  margin: 0 !important;
}
#p-namespaces a, #p-cactions a {
  display: inline-block;
  padding: 5px 10px;
  color: #229C88 !important;
  text-decoration: none!important;
}
#p-namespaces .selected a,
#p-cactions .selected a {
  background: #E0D6F9 !important;
  color: #4B0082 !important;
}

/* Float search */
#p-search {
  float: right !important;
  margin: 0.4em 0.8em !important;
}
#p-search .body {
  background: rgba(255,255,255,0.9) !important;
  border-radius: 4px !important;
  padding: 4px !important;
}
#p-search input[type="search"] {
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  padding: 4px 8px;
}
#p-search button {
  border: 1px solid #ccc;
  border-left: none;
  background: #4B0082;
  color: #fff;
  border-radius: 0 4px 4px 0;
  padding: 4px 8px;
  cursor: pointer;
}

/* Float personal tools */
#p-personal {
  float: right !important;
  margin: 0.4em 0.8em !important;
}
#p-personal .body {
  background: rgba(255,255,255,0.9) !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
}
#p-personal li {
  display: inline-block;
  margin-left: 0.8em!important;
}
#p-personal a {
  color: #4B0082 !important;
  text-decoration: none!important;
}
#p-personal a:hover {
  color: #E67E22 !important;
}

/* Force header to wrap floats */
#mw-head:after {
  content: '';
  display: table;
  clear: both;
}

/*─────────────────────────────────────────────────────────
  3) Sidebar & Content
─────────────────────────────────────────────────────────*/
/* Sidebar */
#mw-panel {
  float: left;
  width: 260px;
  margin: 1.5em 1em 1.5em 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 offset to clear sidebar */
#content {
  margin: 1.5em 1.5em 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);
  clear: right;
  position: relative; z-index: 5;
}

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

/*─────────────────────────────────────────────────────────
  5) Responsive
─────────────────────────────────────────────────────────*/
@media (max-width: 900px) {
  /* Stack everything */
  #p-namespaces, #p-cactions, #p-search, #p-personal {
    float: none!important;
    margin: 0.5em !important;
    text-align: center;
  }
  #mw-panel, #content {
    float: none!important;
    width: auto!important;
    margin: 1em!important;
  }
  #content {
    clear: none;
  }
}