MediaWiki:Common.css: Difference between revisions

From Disaster Risk Gateway
No edit summary
No edit summary
Line 17: Line 17:


/* ===== REMOVE ALL <hr> ===== */
/* ===== REMOVE ALL <hr> ===== */
hr { display: none !important; }
hr {
  display: none !important;
}


/* ===== STRIP VECTOR FOOTER BORDER ===== */
/* ===== STRIP VECTOR FOOTER BORDER ===== */
Line 23: Line 25:
footer#footer {
footer#footer {
   border-top: none !important;
   border-top: none !important;
   background: #fff !important; /* keep default wrapper white */
   background: #fff !important; /* keep default wrapper white */
}
}


/* ===== RESET & SPACING ===== */
/* ===== RESET & SPACING ===== */
html { font-size:100%; margin:0; }
html {
  font-size: 100%;
  margin: 0;
}
body {
body {
   margin:0;
   margin: 0;
   padding-top:60px !important; /* space for navbar */
   padding-top: 60px !important; /* space for navbar */
}
#content {
  margin-top: 0 !important;
}
}
#content { margin-top:0 !important; }


/* ===== MYRIAD COLOR PALETTE ===== */
/* ===== MYRIAD COLOR PALETTE ===== */
Line 39: Line 46:
   --myriad-purple: #8836EA;
   --myriad-purple: #8836EA;
   --myriad-pink:  #DB20D2;
   --myriad-pink:  #DB20D2;
   --myriad-yellow:#FFCE00;
   --myriad-yellow: #FFCE00;
   --myriad-green:  #5AE09A;
   --myriad-green:  #5AE09A;
}
}


/* ===== GLOBAL LINKS & BUTTONS ===== */
/* ===== GLOBAL LINKS & BUTTONS ===== */
a { color: var(--myriad-blue); text-decoration:none; }
a {
a:hover { text-decoration:underline; }
  color: var(--myriad-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.drg-button {
.drg-button {
   display:inline-block;
   display: inline-block;
   padding:.5em 1em;
   padding: .5em 1em;
   font-variant:small-caps;
   font-variant: small-caps;
   border-radius:7px;
   border-radius: 7px;
   background:var(--myriad-blue);
   background: var(--myriad-blue);
   color:#fff!important;
   color: #fff !important;
   transition:background 200ms;
   transition: background 200ms;
   text-decoration:none!important;
   text-decoration: none !important;
}
}


/* ===== NAVBAR ===== */
/* ===== NAVBAR ===== */
/* (Your existing navbar CSS goes here unchanged) */
#drg-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 10000;
}
.drg-navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: .75em 1em;
  gap: 1em;
  flex-wrap: wrap;
}
/* Logo + “DRG” label flush-left */
.drg-navbar-logo {
  display: flex;
  align-items: center;
  gap: .5em;
  flex-shrink: 0;
  margin-right: 2em;
}
.drg-navbar-logo img {
  height: 40px;
  width: auto;
}
.drg-navbar-logo .drg-logo-text {
  font-weight: bold;
  font-size: 1.25rem;
  color: #000;
}
 
/* Navigation dropdown */
.drg-nav {
  position: relative;
  cursor: pointer;
}
.drg-nav > span {
  font-weight: 500;
  padding: .4em .6em;
}
.drg-nav > span::after {
  content: "▾";
  margin-left: .3em;
  font-size: .75em;
}
.drg-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  list-style: none;
  margin: .2em 0 0;
  padding: 0;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 10001;
}
.drg-nav:hover .drg-nav-dropdown,
.drg-nav-dropdown:hover {
  display: block !important;
}
.drg-nav-dropdown li a {
  display: block;
  padding: .5em 1em;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.drg-nav-dropdown li a:hover {
  background: #f5f5f5;
}
/* Flat links next to dropdown */
.flat-link {
  font-weight: 500;
  margin-right: 1.5em;
}
 
/* ===== SEARCH ===== */
.drg-search {
  display: flex;
  align-items: center;
  flex-grow: 1;
}
.drg-search input[type="search"] {
  padding: .4em .6em;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  width: 200px;
  background-image: none !important;
}
.drg-search input[type="submit"] {
  padding: .4em 1em;
  border: none;
  border-radius: 0 4px 4px 0;
  background: var(--myriad-blue);
  color: #fff;
  cursor: pointer;
}
 
/* ===== USER & TOOLS DROPDOWNS ===== */
.drg-navbar-actions {
  display: flex;
  align-items: center;
  gap: 1em;
}
.drg-user, .drg-tools {
  position: relative;
  cursor: pointer;
}
.drg-user > span, .drg-tools > span {
  padding: .4em .6em;
}
.drg-user > span::after, .drg-tools > span::after {
  content: "▾";
  margin-left: .3em;
  font-size: .75em;
}
.drg-user-dropdown, .drg-tools-dropdown {
  display: none;
  position: absolute;
  top: 100%; right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  list-style: none;
  margin: .2em 0 0;
  padding: 0;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 10001;
}
.drg-user:hover .drg-user-dropdown,
.drg-tools:hover .drg-tools-dropdown {
  display: block !important;
}
.drg-user-dropdown li a,
.drg-tools-dropdown li a {
  display: block;
  padding: .5em 1em;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.drg-user-dropdown li a:hover,
.drg-tools-dropdown li a:hover {
  background: #f5f5f5;
}


/* ===== YOUR CUSTOM FOOTER BLOCK ===== */
/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .drg-navbar-container {
    flex-direction: column;
    align-items: stretch;
  }
  .drg-nav-dropdown,
  .drg-user-dropdown,
  .drg-tools-dropdown {
    left: 0;
    right: auto;
  }
  .drg-search {
    width: 100%;
    order: 3;
    margin-top: .5em;
  }
}
 
/* ===== FOOTER FULL-BLEED PINK & ICON BAR ===== */
 
/* Leave default Vector footer wrapper white */
.mw-footer-container,
footer#footer {
  background: #fff !important;
}
 
/* Custom footer block edge-to-edge pink */
#drg-footer {
#drg-footer {
  /* full-width pink */
   position: relative;
   position:relative;
   left: 50%;
   left:50%;
   transform: translateX(-50%);
   transform:translateX(-50%);
   width: 100vw;
   width:100vw;


   background: var(--myriad-pink);
   background: var(--myriad-pink);
   color: #fff;
   color: #fff;
   border-top:1px solid #ccc;
   border-top: 1px solid #ccc;
   padding:2em 0;
   padding: 2em 0;
   font-family:sans-serif;
  margin: 0;
   font-size:1.1rem;
   font-family: sans-serif;
  margin:0;
   font-size: 1.1rem;
}
}
/* footer links */
#drg-footer a {
#drg-footer a {
   color: rgba(255,255,255,0.9);
   color: rgba(255,255,255,0.9);
Line 83: Line 270:
#drg-footer a:hover {
#drg-footer a:hover {
   color: #fff;
   color: #fff;
   text-decoration:underline;
   text-decoration: underline;
}
}


/* footer layout */
/* Footer layout unchanged */
.drg-columns {
.drg-columns {
   display:flex;
   display: flex;
   justify-content:center;
   justify-content: center;
   align-items:stretch;
   align-items: stretch;
   gap:2em;
   gap: 2em;
   max-width:1200px;
   max-width: 1200px;
   margin:0 auto;
   margin: 0 auto;
   flex-wrap:nowrap;
   flex-wrap: nowrap;
}
.drg-column {
  flex: 1 1 33%;
  display: flex;
  flex-direction: column;
  gap: 1em;
  min-width: 0;
}
.drg-column-left {
  align-items: flex-end;
  text-align: left;
  padding-right: 1.5em;
}
.drg-column-right {
  align-items: flex-start;
  text-align: right;
  padding-left: 1.5em;
}
.drg-divider {
  width: 1px;
  background: #666;
  opacity: 0.4;
  align-self: stretch;
}
.drg-column-center {
  text-align: center;
  align-items: center;
  justify-content: center;
}
}
.drg-column { flex:1 1 33%; display:flex; flex-direction:column; gap:1em; }
.drg-column-left { align-items:flex-end; text-align:left; padding-right:1.5em; }
.drg-column-right { align-items:flex-start; text-align:right; padding-left:1.5em; }
.drg-divider { width:1px; background:#666; opacity:0.4; align-self:stretch; }
.drg-column-center { text-align:center; align-items:center; justify-content:center; }
.drg-eu-flag {
.drg-eu-flag {
   background:#fff;
   background: #fff;
   padding:.5em;
   padding: .5em;
   border-radius:4px;
   border-radius: 4px;
   display:inline-block;
   display: inline-block;
   margin-bottom:1em;
   margin-bottom: 1em;
}
.drg-eu-flag img {
  max-height: 4em;
  width: auto;
  display: block;
}
}
.drg-eu-flag img { max-height:4em; width:auto; display:block; }
.drg-eu-text {
.drg-eu-text {
   font-weight:bold;
   font-weight: bold;
   line-height:1.5;
   line-height: 1.5;
   font-size:1em;
   font-size: 1em;
   max-width:400px;
   max-width: 400px;
   text-align:center;
   text-align: center;
   color:#fff;
   color: #fff;
}
}
.drg-disclaimer {
.drg-disclaimer {
   max-width:900px;
   max-width: 900px;
   margin:2em auto 0;
   margin: 2em auto 0;
   padding:1em 0 0;
   padding: 1em 0 0;
   border-top:1px solid #eee;
   border-top: 1px solid #eee;
   font-size:0.9em;
   font-size: 0.9em;
   text-align:center;
   text-align: center;
   color:rgba(255,255,255,0.8);
   color: rgba(255,255,255,0.8);
}
}


/* ===== ICON BAR ===== */
/* Icon bar beneath custom footer */
#footer-icons {
#footer-icons {
  list-style: none;
  margin: 0 auto;
  padding: 1em 0;
  max-width: 1200px;
   background: var(--myriad-pink);
   background: var(--myriad-pink);
   padding:1em 0;
   text-align: right;
}
}
#footer-icons li {
#footer-icons li {
   display:inline-block;
   display: inline-block;
   margin-left:1em;
   margin-left: 1em;
}
#footer-icons {
  list-style:none;
  margin:0;
  padding:0;
  max-width:1200px;
  margin:0 auto;      /* center within pink strip */
  text-align:right;    /* icons right-aligned */
}
 
/* ===== MOBILE ===== */
@media (max-width:768px) {
  .drg-navbar-container { flex-direction:column; align-items:stretch; }
  .drg-nav-dropdown,
  .drg-user-dropdown,
  .drg-tools-dropdown { left:0; right:auto; }
  .drg-search { width:100%; order:3; margin-top:.5em; }
  .drg-eu-flag { padding:.3em; }
}
}

Revision as of 15:42, 25 June 2025

/* ===== HIDE VECTOR PORTLETS & DEFAULT FOOTER LINKS ===== */
#p-logo,
#mw-head, #mw-head-base,
#mw-navigation,
#mw-panel,
#mw-mf-page-header,
[id^="mw-mf-"],
header.vector-header,
.vector-page-toolbar,
header.mw-body-header.vector-page-titlebar,
#footer-places,
#footer-info-lastmod,
#p-views,
#p-cactions {
  display: none !important;
}

/* ===== REMOVE ALL <hr> ===== */
hr {
  display: none !important;
}

/* ===== STRIP VECTOR FOOTER BORDER ===== */
.mw-footer-container,
footer#footer {
  border-top: none !important;
  background: #fff !important;  /* keep default wrapper white */
}

/* ===== RESET & SPACING ===== */
html {
  font-size: 100%;
  margin: 0;
}
body {
  margin: 0;
  padding-top: 60px !important;  /* space for navbar */
}
#content {
  margin-top: 0 !important;
}

/* ===== MYRIAD COLOR PALETTE ===== */
:root {
  --myriad-blue:   #374CFF;
  --myriad-purple: #8836EA;
  --myriad-pink:   #DB20D2;
  --myriad-yellow: #FFCE00;
  --myriad-green:  #5AE09A;
}

/* ===== GLOBAL LINKS & BUTTONS ===== */
a {
  color: var(--myriad-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.drg-button {
  display: inline-block;
  padding: .5em 1em;
  font-variant: small-caps;
  border-radius: 7px;
  background: var(--myriad-blue);
  color: #fff !important;
  transition: background 200ms;
  text-decoration: none !important;
}

/* ===== NAVBAR ===== */
#drg-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 10000;
}
.drg-navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: .75em 1em;
  gap: 1em;
  flex-wrap: wrap;
}
/* Logo + “DRG” label flush-left */
.drg-navbar-logo {
  display: flex;
  align-items: center;
  gap: .5em;
  flex-shrink: 0;
  margin-right: 2em;
}
.drg-navbar-logo img {
  height: 40px;
  width: auto;
}
.drg-navbar-logo .drg-logo-text {
  font-weight: bold;
  font-size: 1.25rem;
  color: #000;
}

/* Navigation dropdown */
.drg-nav {
  position: relative;
  cursor: pointer;
}
.drg-nav > span {
  font-weight: 500;
  padding: .4em .6em;
}
.drg-nav > span::after {
  content: "▾";
  margin-left: .3em;
  font-size: .75em;
}
.drg-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  list-style: none;
  margin: .2em 0 0;
  padding: 0;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 10001;
}
.drg-nav:hover .drg-nav-dropdown,
.drg-nav-dropdown:hover {
  display: block !important;
}
.drg-nav-dropdown li a {
  display: block;
  padding: .5em 1em;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.drg-nav-dropdown li a:hover {
  background: #f5f5f5;
}
/* Flat links next to dropdown */
.flat-link {
  font-weight: 500;
  margin-right: 1.5em;
}

/* ===== SEARCH ===== */
.drg-search {
  display: flex;
  align-items: center;
  flex-grow: 1;
}
.drg-search input[type="search"] {
  padding: .4em .6em;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  width: 200px;
  background-image: none !important;
}
.drg-search input[type="submit"] {
  padding: .4em 1em;
  border: none;
  border-radius: 0 4px 4px 0;
  background: var(--myriad-blue);
  color: #fff;
  cursor: pointer;
}

/* ===== USER & TOOLS DROPDOWNS ===== */
.drg-navbar-actions {
  display: flex;
  align-items: center;
  gap: 1em;
}
.drg-user, .drg-tools {
  position: relative;
  cursor: pointer;
}
.drg-user > span, .drg-tools > span {
  padding: .4em .6em;
}
.drg-user > span::after, .drg-tools > span::after {
  content: "▾";
  margin-left: .3em;
  font-size: .75em;
}
.drg-user-dropdown, .drg-tools-dropdown {
  display: none;
  position: absolute;
  top: 100%; right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  list-style: none;
  margin: .2em 0 0;
  padding: 0;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 10001;
}
.drg-user:hover .drg-user-dropdown,
.drg-tools:hover .drg-tools-dropdown {
  display: block !important;
}
.drg-user-dropdown li a,
.drg-tools-dropdown li a {
  display: block;
  padding: .5em 1em;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.drg-user-dropdown li a:hover,
.drg-tools-dropdown li a:hover {
  background: #f5f5f5;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .drg-navbar-container {
    flex-direction: column;
    align-items: stretch;
  }
  .drg-nav-dropdown,
  .drg-user-dropdown,
  .drg-tools-dropdown {
    left: 0;
    right: auto;
  }
  .drg-search {
    width: 100%;
    order: 3;
    margin-top: .5em;
  }
}

/* ===== FOOTER FULL-BLEED PINK & ICON BAR ===== */

/* Leave default Vector footer wrapper white */
.mw-footer-container,
footer#footer {
  background: #fff !important;
}

/* Custom footer block edge-to-edge pink */
#drg-footer {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;

  background: var(--myriad-pink);
  color: #fff;
  border-top: 1px solid #ccc;
  padding: 2em 0;
  margin: 0;
  font-family: sans-serif;
  font-size: 1.1rem;
}
#drg-footer a {
  color: rgba(255,255,255,0.9);
}
#drg-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Footer layout unchanged */
.drg-columns {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2em;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: nowrap;
}
.drg-column {
  flex: 1 1 33%;
  display: flex;
  flex-direction: column;
  gap: 1em;
  min-width: 0;
}
.drg-column-left {
  align-items: flex-end;
  text-align: left;
  padding-right: 1.5em;
}
.drg-column-right {
  align-items: flex-start;
  text-align: right;
  padding-left: 1.5em;
}
.drg-divider {
  width: 1px;
  background: #666;
  opacity: 0.4;
  align-self: stretch;
}
.drg-column-center {
  text-align: center;
  align-items: center;
  justify-content: center;
}
.drg-eu-flag {
  background: #fff;
  padding: .5em;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1em;
}
.drg-eu-flag img {
  max-height: 4em;
  width: auto;
  display: block;
}
.drg-eu-text {
  font-weight: bold;
  line-height: 1.5;
  font-size: 1em;
  max-width: 400px;
  text-align: center;
  color: #fff;
}
.drg-disclaimer {
  max-width: 900px;
  margin: 2em auto 0;
  padding: 1em 0 0;
  border-top: 1px solid #eee;
  font-size: 0.9em;
  text-align: center;
  color: rgba(255,255,255,0.8);
}

/* Icon bar beneath custom footer */
#footer-icons {
  list-style: none;
  margin: 0 auto;
  padding: 1em 0;
  max-width: 1200px;
  background: var(--myriad-pink);
  text-align: right;
}
#footer-icons li {
  display: inline-block;
  margin-left: 1em;
}