MediaWiki:Common.css: Difference between revisions

From Disaster Risk Gateway
No edit summary
No edit summary
Line 1: Line 1:
/* ===== HIDE VECTOR/MF HEADERS & DEFAULT PORTLETS & FOOTER LINKS ===== */
/* ===== HIDE VECTOR PORTLETS & FOOTER LINKS ===== */
#p-logo,
#p-logo,
#mw-head, #mw-head-base,
#mw-head, #mw-head-base,
Line 12: Line 12:
#footer-info-lastmod,
#footer-info-lastmod,
#p-views,
#p-views,
#p-cactions {
#p-cactions { display: none !important; }
    display: none !important;
}


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


/* ===== STRIP VECTOR’S FOOTER BORDER ===== */
/* ===== STRIP VECTOR FOOTER BORDER ===== */
.mw-footer-container,
.mw-footer-container,
footer#footer {
footer#footer { border-top: none !important; }
    border-top: none !important;
}


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


/* ===== MYRIAD PALETTE ===== */
/* ===== MYRIAD 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;
}
}


Line 46: Line 39:
a:hover { text-decoration:underline; }
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 ===== */
#drg-navbar {
#drg-navbar {
    position:fixed; top:0; left:0; right:0;
  position:fixed; top:0; left:0; right:0;
    background:#fff; border-bottom:1px solid #ddd;
  background:#fff; border-bottom:1px solid #ddd;
    z-index:10000;
  z-index:10000;
}
}
.drg-navbar-container {
.drg-navbar-container {
    max-width:1200px; margin:0 auto;
  max-width:1200px; margin:0 auto;
    display:flex; align-items:center;
  display:flex; align-items:center;
    justify-content:space-between;
  padding:.75em 1em; gap:1em; flex-wrap:wrap;
    padding:.75em 1em; gap:1em; flex-wrap:wrap;
}
 
/* logo + DRG label pinned left */
.drg-navbar-logo {
  display:flex; align-items:center; gap:.5em;
  flex-shrink:0;
  margin-right:2em;
}
}
.drg-navbar-logo img {
.drg-navbar-logo img {
    height:40px; width:auto; display:block;
  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-navbar-links {
.drg-nav > span {
    display:flex; gap:2em; flex-grow:1;
  font-weight:500; padding:.4em .6em;
    justify-content:center; flex-wrap:wrap;
}
}
.drg-navbar-links a {
.drg-nav > span::after {
    position:relative; padding-bottom:2px; font-weight:500;
  content: "▾"; margin-left:.3em; font-size:.75em;
}
}
.drg-navbar-links a::after {
.drg-nav-dropdown {
    content:""; position:absolute;
  display:none; position:absolute;
    bottom:0; left:0; height:2px; width:0;
  top:100%; left:0; background:#fff;
    background:var(--myriad-blue);
  border:1px solid #ccc; border-radius:4px;
    transition:width 200ms ease;
  list-style:none; margin:.2em 0 0; padding:0;
  min-width:160px; box-shadow:0 2px 6px rgba(0,0,0,0.1);
}
.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;
  white-space:nowrap; text-decoration:none;
}
.drg-nav-dropdown li a:hover {
  background:#f5f5f5;
}
 
/* flat links */
.drg-navbar-container > a.flat-link {
  margin-right:1.5em;
  font-weight:500;
}
}
.drg-navbar-links a:hover::after { width:100%; }


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


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


/* ===== YOUR CUSTOM FOOTER ===== */
/* ===== CUSTOM FOOTER ===== */
#drg-footer {
#drg-footer { border-top:1px solid #ccc; background:#fff; padding-top:2em; }
    border-top:1px solid #ccc; background:#fff;
    padding-top:2em; font-family:sans-serif;
    color:#000; font-size:1.1rem; margin:1em 0 2em;
}
.drg-columns {
.drg-columns {
    display:flex; justify-content:center; align-items:stretch;
  display:flex; justify-content:center; gap:2em; max-width:1200px; margin:0 auto;
    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-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 {
    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 {
    margin-bottom:1em;
}
.drg-eu-flag img {
    height:4em; width:auto; max-width:100%;
}
.drg-eu-text {
    font-weight:bold; line-height:1.5; font-size:1em;
    max-width:400px; text-align:center; color:#000;
}
.drg-disclaimer {
    max-width:900px; margin:2em auto 0;
    padding:1em 0 0; border-top:1px solid #eee;
    font-size:0.9em; color:#666; text-align:center;
}
.drg-disclaimer a {
    color:var(--myriad-blue); text-decoration:underline;
}
}
.drg-column { flex:1 1 33%; display:flex; flex-direction:column; gap:1em; }
.drg-divider { width:1px; background:#666; opacity:0.4; }
.drg-disclaimer { margin:2em auto 0; text-align:center; font-size:.9em; color:#666; }


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

Revision as of 13:48, 25 June 2025

/* ===== HIDE VECTOR PORTLETS & 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; }

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

/* ===== MYRIAD 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 pinned 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);
}
.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;
  white-space:nowrap; text-decoration:none;
}
.drg-nav-dropdown li a:hover {
  background:#f5f5f5;
}

/* flat links */
.drg-navbar-container > a.flat-link {
  margin-right:1.5em;
  font-weight:500;
}

/* ===== 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);
}
.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;
  white-space:nowrap; text-decoration:none;
}
.drg-user-dropdown li a:hover,
.drg-tools-dropdown li a:hover {
  background:#f5f5f5;
}

/* ===== CUSTOM FOOTER ===== */
#drg-footer { border-top:1px solid #ccc; background:#fff; padding-top:2em; }
.drg-columns {
  display:flex; justify-content:center; gap:2em; max-width:1200px; margin:0 auto;
}
.drg-column { flex:1 1 33%; display:flex; flex-direction:column; gap:1em; }
.drg-divider { width:1px; background:#666; opacity:0.4; }
.drg-disclaimer { margin:2em auto 0; text-align:center; font-size:.9em; color:#666; }

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