MediaWiki:Common.css: Difference between revisions

From Disaster Risk Gateway
Hiding footer horizontal elements
Tags: Mobile edit Mobile web edit
No edit summary
 
(66 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* ===== HIDE VECTOR PORTLETS & DEFAULT FOOTER LINKS ===== */
body.page-Help_Main_Page.action-view h1.firstHeading,
#p-logo,
body.page-Main_Page.action-view h1.firstHeading {
#mw-head,
    display: none;
#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;
}
}


div#content a.external[href ^="https://"] {
/* ===== REMOVE ALL <hr> ===== */
    background-image: none;
hr {
    padding-right: 0;
  display: none !important;
}
}


/* MYRIAD colours */
/* ===== 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 {
:root {
    --myriad-blue: #374CFF;
  --myriad-blue:   #374CFF;
    --myriad-purple: #8836EA;
  --myriad-purple: #8836EA;
    --myriad-pink: #DB20D2;
  --myriad-pink:   #DB20D2;
    --myriad-dkblue: #000091;
  --myriad-yellow:#FFCE00;
    --myriad-yellow: #FFCE00;
  --myriad-green: #5AE09A;
    --myriad-green: #5AE09A;
}
}


/* Clickable button */
/* ===== GLOBAL LINKS & BUTTONS ===== */
a {
  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;
    text-align: center;
  font-variant: small-caps;
    font-variant: small-caps;
  border-radius: 7px;
    border-radius: 7px;
  background: var(--myriad-blue);
    background-color: var(--myriad-blue);
  color: #fff !important;
    color: rgba(255, 255, 255, .8) !important;
  transition: background 200ms;
    transition: all 400ms;
  text-decoration: none !important;
    text-decoration: none !important;
    box-shadow: rgba(25, 128, 195, .3) 3px 3px 4px 0px;
}
}


/* FOOTER START */
/* ===== NAVBAR ===== */
/* #region */
#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;
}


/* Remove default MediaWiki footer links and spacing */
/* Navigation dropdown */
#footer ul, #footer .mw-footer-buttons {
.drg-nav {
    display: none !important;
  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;
}
}


#footer, footer#footer {
/* ===== SEARCH FORM ===== */
    border-top: none !important;
.drg-search {
    padding-top: 0 !important;
  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;
}
}


footer#footer.footer {
/* ===== USER & TOOLS DROPDOWNS ===== */
    padding: 0;
.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;
}
}


footer {
/* ===== 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%;
     width: 100%;
     padding: 1em;
     order: 3;
     font-size: 1.2rem;
     margin-top: .5em;
    background: white;
  }
    color: rgba(0, 0, 0, 0.6);
    min-height: 250px;
}
}


footer a {
/* ===== VECTOR FOOTER WRAPPER — MAKE TRANSPARENT & REMOVE ITS BORDER ===== */
    color: var(--myriad-blue);
.mw-footer-container,
    text-decoration: none;
footer#footer {
  background: transparent !important;
  border-top: none !important;
}
}


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


#lcc-footer-content {
/* Footer links in white */
    display: grid;
#drg-footer a {
    grid-template:
  color: rgba(255,255,255,0.9);
        "links nav"
}
        "eu-logo eu-text";
#drg-footer a:hover {
    gap: 1em 2em;
  color: #fff;
    font-size: 1rem;
  text-decoration: underline;
    justify-content: center;
    align-items: start;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
}
}


#lcc-footer-content a {
/* ===== CUSTOM FOOTER LAYOUT ===== */
    color: var(--myriad-blue);
.drg-columns {
    margin-bottom: 0.4em;
  display: flex;
    transition: all 0.3s ease;
  justify-content: center;
    text-decoration: none;
  align-items: stretch;
    display: inline-block;
  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 {
#lcc-footer-content a:hover {
  align-items: flex-start;
    color: var(--myriad-dkblue);
  text-align: right;
    font-weight: bold;
  padding-left: 1.5em;
}
}
 
.drg-divider {
#lcc-footer-content .footer-links {
  width: 1px;
    grid-area: links;
  background: #666;
    display: flex;
  opacity: 0.4;
    flex-direction: column;
  align-self: stretch;
}
}
 
.drg-column-center {
#lcc-footer-content .footer-nav {
  text-align: center;
    grid-area: nav;
  align-items: center;
    display: flex;
  justify-content: center;
    flex-direction: column;
}
}
 
.drg-eu-flag {
#lcc-footer-content .footer-legal {
  background: #fff;
    grid-area: legal;
  padding: .5em;
    display: flex;
  border-radius: 4px;
    flex-direction: column;
  display: inline-block;
  margin-bottom: 1em;
}
}
 
.drg-eu-flag img {
#lcc-footer-content .footer-eu-logo {
  max-height: 4em;
    grid-area: eu-logo;
  width: auto;
  display: block;
}
}
 
.drg-eu-text {
#lcc-footer-content .footer-eu-logo img {
  font-weight: bold;
    height: 2.5em;
  line-height: 1.5;
    opacity: 0.8;
  font-size: 1em;
  max-width: 400px;
  text-align: center;
  color: #fff;
}
}
 
.drg-disclaimer {
#lcc-footer-content .footer-eu-text {
  max-width: 900px;
    grid-area: eu-text;
  margin: 2em auto 0;
    display: flex;
  padding: 1em 0 0;
    justify-content: start;
  border-top: 1px solid rgba(255,255,255,0.3);
    align-items: center;
  font-size: 0.9rem;
  text-align: center;
  color: rgba(255,255,255,0.8);
}
}


#lcc-footer-content .footer-eu-text p {
/* ===== ICON BAR ===== */
    font-size: 0.9em;
#footer-icons {
    max-width: 800px;
  list-style: none;
    margin: 0;
  margin: 0 auto;
  padding: 1em 0;
  max-width: 1200px;
  background: transparent;
  text-align: right;
}
}
 
#footer-icons li {
/* Responsive layout for mobile */
  display: inline-block;
@media screen and (max-width: 768px) {
  margin-left: 1em;
    #lcc-footer-content {
        grid-template:
            "links"
            "nav"
            "eu-logo"
            "eu-text";
        text-align: center;
        justify-items: center;
    }
 
    #lcc-footer-content .footer-eu-text {
        justify-content: center;
        text-align: center;
    }
 
    #lcc-footer-content .footer-eu-text p {
        text-align: center;
    }
}
}
/* #endregion */

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;
}