MediaWiki:Common.css: Difference between revisions

From Disaster Risk Gateway
No edit summary
No edit summary
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ===== HIDE VECTOR & MOBILEFRONTEND HEADERS & DEFAULT FOOTER LINKS ===== */
/* ===== HIDE VECTOR PORTLETS & DEFAULT FOOTER LINKS ===== */
#p-logo,
#p-logo,
#mw-head,
#mw-head,
Line 8: Line 8:
[id^="mw-mf-"],
[id^="mw-mf-"],
header.vector-header,
header.vector-header,
.vector-page-toolbar,
header.mw-body-header.vector-page-titlebar,
#footer-places,
#footer-places,
#footer-info-lastmod {
#footer-info-lastmod,
    display: none !important;
#p-views,
#p-cactions {
  display: none !important;
}
}


/* ===== RESET & SPACING ===== */
/* ===== REMOVE ALL <hr> ===== */
html { font-size:100%; margin:0; }
hr {
  display: none !important;
}
 
/* ===== RESET & FULL‐PAGE GRADIENT BACKGROUND ===== */
html {
  font-size: 100%;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(90deg, var(--myriad-pink), var(--myriad-purple));
}
body {
body {
    margin:0;
  margin: 0;
    padding-top:60px !important; /* space for navbar */
  padding-top: 60px !important; /* leave room for fixed navbar */
  background: transparent;      /* let the gradient show through */
}
 
/* ===== LET GRADIENT BLEED THROUGH ENTIRE WRAPPER ===== */
.mw-page-container,
.mw-page-container-inner {
  background-color: transparent !important;
}
 
/* ===== KEEP ARTICLE + LEFT COLUMN AREAS WHITE ===== */
.mw-content-container,
#content,
#mw-content-text,
.vector-sitenotice-container,
.vector-column-start {
  background-color: #fff !important;
  margin-top: 0 !important;
}
}
#content { margin-top:0 !important; }


/* ===== MYRIAD COLOR PALETTE ===== */
/* ===== MYRIAD COLOR PALETTE ===== */
:root {
:root {
    --myriad-blue:  #374CFF;
  --myriad-blue:  #374CFF;
    --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 LINK & BUTTON STYLES ===== */
/* ===== GLOBAL LINKS & BUTTONS ===== */
a {
a {
    color: var(--myriad-blue);
  color: var(--myriad-blue);
    text-decoration: none;
  text-decoration: none;
}
}
a:hover {
a:hover {
    text-decoration: underline;
  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 STRUCTURE ===== */
/* ===== NAVBAR ===== */
#drg-navbar {
#drg-navbar {
    position: fixed;
  position: fixed;
    top: 0; left: 0; right: 0;
  top: 0; left: 0; right: 0;
    background: #fff;
  background: #fff;
    border-bottom: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
    z-index: 10000;
  z-index: 10000;
}
}
.drg-navbar-container {
.drg-navbar-container {
    max-width: 1200px;
  max-width: 1200px;
    margin: 0 auto;
  margin: 0 auto;
    display: flex;
  display: flex;
    align-items: center;
  align-items: center;
    justify-content: space-between;
  padding: .75em 1em;
    padding: .75em 1em;
  gap: 1em;
    gap: 1em;
  flex-wrap: wrap;
    flex-wrap: wrap;
}
.drg-navbar-logo {
  display: flex;
  align-items: center;
  gap: .5em;
  flex-shrink: 0;
  margin-right: 2em;
}
}
/* Logo */
.drg-navbar-logo img {
.drg-navbar-logo img {
    height: 40px;
  height: 40px;
    width: auto;
  width: auto;
}
.drg-navbar-logo .drg-logo-text {
  font-weight: bold;
  font-size: 1.25rem;
  color: #000;
}
}


/* Navigation Links */
/* Navigation dropdown */
.drg-navbar-links {
.drg-nav {
    display: flex;
  position: relative;
    gap: 2em;
  cursor: pointer;
    flex-grow: 1;
}
    justify-content: center;
.drg-nav > span {
    flex-wrap: wrap;
  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-navbar-links a {
.drg-nav-dropdown li a {
    position: relative;
  display: block;
    padding-bottom: 2px;
  padding: .5em 1em;
    font-weight: 500;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
}
.drg-navbar-links a::after {
.drg-nav-dropdown li a:hover {
    content: "";
  background: #f5f5f5;
    position: absolute;
    bottom: 0; left: 0;
    height: 2px; width: 0;
    background: var(--myriad-blue);
    transition: width 200ms ease;
}
}
.drg-navbar-links a:hover::after {
.flat-link {
    width: 100%;
  font-weight: 500;
  margin-right: 1.5em;
}
}


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


/* ===== USER DROPDOWN ===== */
/* ===== USER & TOOLS DROPDOWNS ===== */
.drg-navbar-actions {
.drg-navbar-actions {
    display: flex;
  display: flex;
    align-items: center;
  align-items: center;
    gap: 1em;
  gap: 1em;
    position: relative;
}
}
.drg-user {
.drg-user, .drg-tools {
    position: relative;
  position: relative;
    cursor: pointer;
  cursor: pointer;
}
}
.drg-user > span {
.drg-user > span, .drg-tools > span {
    padding: .4em .6em;
  padding: .4em .6em;
    display: inline-block;
}
}
.drg-user-dropdown {
.drg-user > span::after, .drg-tools > span::after {
    display: none;
  content: "▾";
    position: absolute;
  margin-left: .3em;
    top: 100%; right: 0;
  font-size: .75em;
    background: #fff;
}
    border: 1px solid #ccc;
.drg-user-dropdown, .drg-tools-dropdown {
    border-radius: 4px;
  display: none;
    list-style: none;
  position: absolute;
    margin: .2em 0 0;
  top: 100%;
    padding: 0;
  right: 0;
    min-width: 160px;
  background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
    z-index: 10001;
  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;
}
}
/* keep open when hovering into dropdown */
.drg-user:hover .drg-user-dropdown,
.drg-user:hover .drg-user-dropdown,
.drg-user-dropdown:hover {
.drg-tools:hover .drg-tools-dropdown {
    display: block;
  display: block !important;
}
}
.drg-user-dropdown li {
.drg-user-dropdown li a,
    border-bottom: 1px solid #eee;
.drg-tools-dropdown li a {
  display: block;
  padding: .5em 1em;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
}
.drg-user-dropdown li:last-child {
.drg-user-dropdown li a:hover,
    border-bottom: none;
.drg-tools-dropdown li a:hover {
  background: #f5f5f5;
}
}
.drg-user-dropdown li a {
 
     display: block;
/* ===== MOBILE ===== */
     padding: .5em 1em;
@media (max-width: 768px) {
     color: #000;
  .drg-navbar-container { flex-direction: column; align-items: stretch; }
     white-space: nowrap;
  .drg-nav-dropdown,
  .drg-user-dropdown,
  .drg-tools-dropdown {
     left: 0;
     right: auto;
  }
  .drg-search {
    width: 100%;
     order: 3;
     margin-top: .5em;
  }
}
}
.drg-user-dropdown li a:hover {
 
    background: #f5f5f5;
/* ===== VECTOR FOOTER WRAPPER — MAKE TRANSPARENT & REMOVE ITS BORDER ===== */
.mw-footer-container,
footer#footer {
  background: transparent !important;
  border-top: none !important;
}
}


/* ===== DRG FOOTER ===== */
/* ===== CUSTOM FOOTER (transparent) ===== */
#drg-footer {
#drg-footer {
    border-top: 1px solid #ccc;
  background: transparent;
    background: #fff;
  color: #fff;                          /* white text */
    padding-top: 2em;
  border-top: 1px solid rgba(255,255,255,0.3);
    font-family: sans-serif;
  padding: 2em 0;
    color: #000;
  margin: 1em 0 0;
    font-size: 1.1rem;
  font-family: sans-serif;
    margin: 1em 0 2em;
  font-size: 1.1rem;
  width: 100%;
}
 
/* Footer links in white */
#drg-footer a {
  color: rgba(255,255,255,0.9);
}
}
#drg-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
/* ===== CUSTOM FOOTER LAYOUT ===== */
.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 {
.drg-column {
    flex: 1 1 33%;
  flex: 1 1 33%;
    display: flex;
  display: flex;
    flex-direction: column;
  flex-direction: column;
    gap: 1em;
  gap: 1em;
    min-width: 0;
}
}
.drg-column-left {
.drg-column-left {
    align-items: flex-end;
  align-items: flex-end;
    text-align: left;
  text-align: left;
    padding-right: 1.5em;
  padding-right: 1.5em;
}
}
.drg-column-right {
.drg-column-right {
    align-items: flex-start;
  align-items: flex-start;
    text-align: right;
  text-align: right;
    padding-left: 1.5em;
  padding-left: 1.5em;
}
.drg-column-left a,
.drg-column-right a {
    color: #000;
    text-decoration: none;
}
.drg-column-left a:hover,
.drg-column-right a:hover {
    text-decoration: underline;
}
}
.drg-divider {
.drg-divider {
    width: 1px;
  width: 1px;
    background: #666;
  background: #666;
    opacity: 0.4;
  opacity: 0.4;
    align-self: stretch;
  align-self: stretch;
}
}
.drg-column-center {
.drg-column-center {
    text-align: center;
  text-align: center;
    align-items: center;
  align-items: center;
    justify-content: center;
  justify-content: center;
}
}
.drg-eu-flag {
.drg-eu-flag {
    margin-bottom: 1em;
  background: #fff;
  padding: .5em;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1em;
}
}
.drg-eu-flag img {
.drg-eu-flag img {
    height: 4em;
  max-height: 4em;
    width: auto;
  width: auto;
    max-width: 100%;
  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: #000;
  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 rgba(255,255,255,0.3);
    font-size: 0.9em;
  font-size: 0.9rem;
    color: #666;
  text-align: center;
    text-align: center;
  color: rgba(255,255,255,0.8);
}
}
.drg-disclaimer a {
 
    color: var(--myriad-blue);
/* ===== ICON BAR ===== */
    text-decoration: underline;
#footer-icons {
  list-style: none;
  margin: 0 auto;
  padding: 1em 0;
  max-width: 1200px;
  background: transparent;
  text-align: right;
}
}
 
#footer-icons li {
/* ===== MOBILE ===== */
  display: inline-block;
@media (max-width: 768px) {
  margin-left: 1em;
    .drg-navbar-container {
        flex-direction: column;
        align-items: stretch;
    }
    .drg-navbar-links {
        justify-content: center;
    }
    .drg-columns {
        flex-direction: column;
        align-items: center;
    }
    .drg-divider {
        display: none;
    }
    .drg-column {
        width: 100%;
        text-align: center !important;
        align-items: center !important;
        padding: 0 !important;
    }
    .drg-eu-text {
        max-width: 90%;
    }
}
}

Latest revision as of 16:25, 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;
}

/* ===== RESET & FULL‐PAGE GRADIENT BACKGROUND ===== */
html {
  font-size: 100%;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(90deg, var(--myriad-pink), var(--myriad-purple));
}
body {
  margin: 0;
  padding-top: 60px !important; /* leave room for fixed navbar */
  background: transparent;       /* let the gradient show through */
}

/* ===== LET GRADIENT BLEED THROUGH ENTIRE WRAPPER ===== */
.mw-page-container,
.mw-page-container-inner {
  background-color: transparent !important;
}

/* ===== KEEP ARTICLE + LEFT COLUMN AREAS WHITE ===== */
.mw-content-container,
#content,
#mw-content-text,
.vector-sitenotice-container,
.vector-column-start {
  background-color: #fff !important;
  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;
}
.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-link {
  font-weight: 500;
  margin-right: 1.5em;
}

/* ===== SEARCH FORM ===== */
.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;
  }
}

/* ===== VECTOR FOOTER WRAPPER — MAKE TRANSPARENT & REMOVE ITS BORDER ===== */
.mw-footer-container,
footer#footer {
  background: transparent !important;
  border-top: none !important;
}

/* ===== CUSTOM FOOTER (transparent) ===== */
#drg-footer {
  background: transparent;
  color: #fff;                          /* white text */
  border-top: 1px solid rgba(255,255,255,0.3);
  padding: 2em 0;
  margin: 1em 0 0;
  font-family: sans-serif;
  font-size: 1.1rem;
  width: 100%;
}

/* Footer links in white */
#drg-footer a {
  color: rgba(255,255,255,0.9);
}
#drg-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== CUSTOM FOOTER LAYOUT ===== */
.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;
}
.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 rgba(255,255,255,0.3);
  font-size: 0.9rem;
  text-align: center;
  color: rgba(255,255,255,0.8);
}

/* ===== ICON BAR ===== */
#footer-icons {
  list-style: none;
  margin: 0 auto;
  padding: 1em 0;
  max-width: 1200px;
  background: transparent;
  text-align: right;
}
#footer-icons li {
  display: inline-block;
  margin-left: 1em;
}