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;
   margin: 0; padding: 0;
Line 12: Line 12:
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Header (top bar)
  HEADER BAR
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
#mw-head {
#mw-head {
   clear: both;
   clear: both;
   background: #4B0082;
   background: #4B0082;
   border-bottom: 3px solid #F28C28;
   border-bottom: 3px solid #F28C28;
   padding: 0.75em 2em;
   padding: 10px 260px 10px 1.5em; /* leave space on the left for the logo/sidebar */
   position: relative; z-index: 20;
   position: relative; z-index: 100;
  box-sizing: border-box;
}
}
/* Page action tabs (Read/Edit/History) */
#p-namespaces, #p-cactions {
  display: inline-block;
  vertical-align: middle;
  margin-right: 1em;
}
#p-namespaces .body, #p-cactions .body {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
#p-namespaces li, #p-cactions li { display: inline-block; }
#p-namespaces a, #p-cactions a {
  display: inline-block;
  padding: 6px 10px;
  color: #229C88;
  text-decoration: none;
}
#p-cactions .selected a, #p-namespaces .selected a {
  background: #E0D6F9;
  color: #4B0082;
}
/* Personal tools (login/watchlist/etc) */
/* Personal tools (login/watchlist/etc) */
#p-personal ul {
#p-personal {
   display: flex; list-style: none;
   position: absolute;
   margin: 0; padding: 0.5em;
  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;
  margin-left: 0.8em;
}
}
#p-personal li + li { margin-left: 1em; }
#p-personal a {
#p-personal a {
   color: #4B0082 !important;
   color: #4B0082 !important; text-decoration: none;
  text-decoration: none;
}
}
#p-personal a:hover {
#p-personal a:hover {
Line 36: Line 69:
}
}


/* Search */
/* Search box */
#p-search {
#p-search {
   float: right;
   position: absolute;
   padding: 0.5em;
  top: 50%; transform: translateY(-50%);
   right: 12em; /* adjust if you add more tools */
}
}
#p-search form {
#p-search .body {
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 4px;
   display: flex;
   display: flex;
  align-items: center;
}
}
#p-search input[type="search"] {
#p-search input[type="search"] {
  padding: 0.3em 0.5em;
   border: 1px solid #ccc;
   border: 1px solid #ccc;
   border-radius: 4px 0 0 4px;
   border-radius: 4px 0 0 4px;
  padding: 4px 8px;
}
}
#p-search button {
#p-search button {
  padding: 0.3em 0.6em;
   border: 1px solid #ccc;
   border: 1px solid #ccc;
   border-left: none;
   border-left: none;
  border-radius: 0 4px 4px 0;
   background: #4B0082;
   background: #4B0082;
   color: #fff;
   color: #fff;
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
   cursor: pointer;
   cursor: pointer;
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Page action tabs (View/Edit/History)
   SIDEBAR (float)
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
#p-cactions ul {
  display: flex; list-style: none;
  margin: 1em 2em; padding: 0;
}
#p-cactions li + li { margin-left: 0.5em; }
#p-cactions a {
  display: block;
  padding: 0.3em 0.6em;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #229C88;
  text-decoration: none;
}
#p-cactions li.selected a {
  background: #E0D6F9;
  border-color: #4B0082;
   color: #4B0082;
}
 
/* ─────────────────────────────────────────────────────────
  Sidebar (float layout)
───────────────────────────────────────────────────────── */
#mw-panel {
#mw-panel {
   float: left;
   float: left;
   width: 260px;
   width: 260px;
   margin: 1.5em;
   margin: 1.5em 1em 1.5em 1em;
   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: 10;
   z-index: 50;
}
}
.mw-portlet {
.mw-portlet {
   margin-bottom: 1.5em;
   margin-bottom: 1.5em;
}
}
.mw-portlet .mw-portlet-heading {
.mw-portlet-heading, .mw-portlet h3 {
   font-weight: bold;
   font-weight: bold;
   margin-bottom: 0.5em;
   margin-bottom: 0.5em;
}
}
.mw-portlet ul {
.mw-portlet ul {
   list-style: none;
   list-style: none; margin: 0; padding: 0;
  margin: 0; padding: 0;
}
}
.mw-portlet li {
.mw-portlet li {
   margin: 0.3em 0;
   margin: 0.4em 0;
}
}
.mw-portlet a {
.mw-portlet a {
   color: #4B0082;
   color: #4B0082; text-decoration: none;
  text-decoration: none;
}
}
.mw-portlet a:hover {
.mw-portlet a:hover {
Line 117: Line 130:
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Main Content (cleared float)
  MAIN CONTENT (cleared float)
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
#content {
#content {
   margin: 1.5em 2em 2em calc(260px + 1.5em);
   margin: 1.5em 1em 2em calc(260px + 1.5em);
   background: rgba(255,255,255,0.95);
   background: rgba(255,255,255,0.95);
   padding: 2em;
   padding: 2em;
Line 127: Line 140:
   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;
   overflow: visible;
   position: relative; z-index: 10;
}
}
#mw-content-text {
#mw-content-text {
Line 133: Line 146:
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Headings & Links
  HEADINGS & LINKS
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
h1, h2, h3, h4 {
h1, h2, h3, h4 {
   font-family: 'Cinzel', serif;
   font-family: 'Cinzel', serif;
Line 142: Line 155:
}
}
a {
a {
   color: #229C88;
   color: #229C88; text-decoration: none;
  text-decoration: none;
}
}
a:hover {
a:hover {
   color: #D645B1;
   color: #D645B1; text-decoration: underline;
  text-decoration: underline;
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Tables (RPG style)
  TABLES
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
table.wikitable {
table.wikitable {
   width: 100%;
   width: 100%;
Line 180: Line 191:
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Footer (full width)
  FOOTER
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
#footer {
#footer {
   clear: both;
   clear: both;
   background: #4B0082;
   background: #4B0082;
   color: #eee;
   color: #eee;
   padding: 1em 2em;
   padding: 1em 1.5em;
   text-align: center;
   text-align: center;
   border-top: 2px solid #D645B1;
   border-top: 2px solid #D645B1;
   position: relative; z-index: 20;
  border-radius: 0 0 8px 8px;
   position: relative; z-index: 100;
}
}
#footer a {
#footer a {
Line 202: Line 214:
}
}


/* ─────────────────────────────────────────────────────────
/*─────────────────────────────────────────────────────────
  Responsive: stack sidebar + content
  RESPONSIVE (stack on narrow screens)
───────────────────────────────────────────────────────── */
─────────────────────────────────────────────────────────*/
@media (max-width: 900px) {
@media (max-width: 900px) {
   #p-personal, #p-search, #p-cactions {
  #mw-head {
     float: none; display: block; margin: 0.5em 1em; text-align: center;
    padding: 10px 1em;
  }
   #p-namespaces, #p-cactions {
    display: block; text-align: center; margin: 0.5em 0;
  }
  #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; width: auto; margin: 1em !important;
   }
   }
   #content { clear: none; }
   #content {
    clear: none;
  }
}
}

Revision as of 15:07, 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 BAR
─────────────────────────────────────────────────────────*/
#mw-head {
  clear: both;
  background: #4B0082;
  border-bottom: 3px solid #F28C28;
  padding: 10px 260px 10px 1.5em; /* leave space on the left for the logo/sidebar */
  position: relative; z-index: 100;
  box-sizing: border-box;
}

/* Page action tabs (Read/Edit/History) */
#p-namespaces, #p-cactions {
  display: inline-block;
  vertical-align: middle;
  margin-right: 1em;
}
#p-namespaces .body, #p-cactions .body {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
#p-namespaces li, #p-cactions li { display: inline-block; }
#p-namespaces a, #p-cactions a {
  display: inline-block;
  padding: 6px 10px;
  color: #229C88;
  text-decoration: none;
}
#p-cactions .selected a, #p-namespaces .selected 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;
  margin-left: 0.8em;
}
#p-personal a {
  color: #4B0082 !important; text-decoration: none;
}
#p-personal a:hover {
  color: #E67E22 !important;
}

/* Search box */
#p-search {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  right: 12em; /* adjust if you add more tools */
}
#p-search .body {
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 4px;
  display: flex;
  align-items: center;
}
#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;
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/*─────────────────────────────────────────────────────────
  SIDEBAR (float)
─────────────────────────────────────────────────────────*/
#mw-panel {
  float: left;
  width: 260px;
  margin: 1.5em 1em 1.5em 1em;
  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: 50;
}
.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 (cleared float)
─────────────────────────────────────────────────────────*/
#content {
  margin: 1.5em 1em 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: 10;
}
#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
─────────────────────────────────────────────────────────*/
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 {
  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;
}

/*─────────────────────────────────────────────────────────
  RESPONSIVE (stack on narrow screens)
─────────────────────────────────────────────────────────*/
@media (max-width: 900px) {
  #mw-head {
    padding: 10px 1em;
  }
  #p-namespaces, #p-cactions {
    display: block; text-align: center; margin: 0.5em 0;
  }
  #p-personal, #p-search {
    position: relative; transform: none; top: auto; right: auto;
    margin: 0.5em auto; display: block;
  }
  #mw-panel, #content {
    float: none; width: auto; margin: 1em !important;
  }
  #content {
    clear: none;
  }
}