MediaWiki:Common.css: Difference between revisions

From Disaster Risk Gateway
No edit summary
No edit summary
Line 1: Line 1:
/* ===== HIDE VECTOR & MOBILEFRONTEND HEADERS & DEFAULT FOOTER LINKS ===== */
/* ===== HIDE VECTOR/MF HEADERS & DEFAULT FOOTER LINKS ===== */
#p-logo,
#p-logo,
#mw-head, #mw-head-base,
#mw-head, #mw-head-base,
Line 9: Line 9:
#footer-places,
#footer-places,
#footer-info-lastmod {
#footer-info-lastmod {
    display: none !important;
}
/* ===== HIDE ALL <hr> ===== */
hr {
     display: none !important;
     display: none !important;
}
}


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


/* ===== HIDE ALL HR IN CONTENT TO AVOID DOUBLE LINES ===== */
/* ===== MYRIAD PALETTE ===== */
#content hr {
    display: none !important;
}
 
/* ===== MYRIAD COLOR PALETTE ===== */
:root {
:root {
     --myriad-blue:  #374CFF;
     --myriad-blue:  #374CFF;
Line 50: Line 50:
/* ===== NAVBAR ===== */
/* ===== NAVBAR ===== */
#drg-navbar {
#drg-navbar {
     position: fixed; top: 0; left: 0; right: 0;
     position: fixed;
    top: 0; left: 0; right: 0;
     background: #fff;
     background: #fff;
     border-bottom: 1px solid #ddd;
     border-bottom: 1px solid #ddd;
Line 56: Line 57:
}
}
.drg-navbar-container {
.drg-navbar-container {
     max-width: 1200px; margin: 0 auto;
     max-width: 1200px;
     display: flex; align-items: center;
    margin: 0 auto;
     display: flex;
    align-items: center;
     justify-content: space-between;
     justify-content: space-between;
     padding: .75em 1em; gap: 1em;
     padding: .75em 1em;
    gap: 1em;
     flex-wrap: wrap;
     flex-wrap: wrap;
}
}
Line 65: Line 69:
/* Logo */
/* Logo */
.drg-navbar-logo img {
.drg-navbar-logo img {
     height: 40px; width: auto;
     height: 40px;
    width: auto;
     display: block;
     display: block;
}
}
Line 71: Line 76:
/* Links */
/* Links */
.drg-navbar-links {
.drg-navbar-links {
     display: flex; gap: 2em;
     display: flex;
     flex-grow: 1; justify-content: center;
    gap: 2em;
     flex-grow: 1;
    justify-content: center;
     flex-wrap: wrap;
     flex-wrap: wrap;
}
}
.drg-navbar-links a {
.drg-navbar-links a {
     position: relative; padding-bottom: 2px;
     position: relative;
    padding-bottom: 2px;
     font-weight: 500;
     font-weight: 500;
}
}
.drg-navbar-links a::after {
.drg-navbar-links a::after {
     content: ""; position: absolute;
     content: "";
     bottom: 0; left: 0; height: 2px; width: 0;
    position: absolute;
     bottom: 0; left: 0;
    height: 2px; width: 0;
     background: var(--myriad-blue);
     background: var(--myriad-blue);
     transition: width 200ms ease;
     transition: width 200ms ease;
Line 91: Line 101:
/* ===== SEARCH FORM ===== */
/* ===== SEARCH FORM ===== */
.drg-search {
.drg-search {
     display: flex; align-items: center;
     display: flex;
    align-items: center;
}
}
.drg-search input[type="search"] {
.drg-search input[type="search"] {
Line 111: Line 122:
/* ===== USER DROPDOWN ===== */
/* ===== USER DROPDOWN ===== */
.drg-navbar-actions {
.drg-navbar-actions {
     display: flex; align-items: center;
     display: flex;
     gap: 1em; position: relative;
    align-items: center;
     gap: 1em;
    position: relative;
    overflow: visible !important;  /* allow dropdown to overflow */
}
}
.drg-user {
.drg-user {
     position: relative; cursor: pointer;
     position: relative;
    cursor: pointer;
}
}
.drg-user > span {
.drg-user > span {
     padding: .4em .6em; display: inline-block;
     padding: .4em .6em;
    display: inline-block;
}
}
.drg-user-dropdown {
.drg-user-dropdown {
     display: none;
     display: none;
     position: absolute; top: 100%; right: 0;
     position: absolute;
     background: #fff; border: 1px solid #ccc;
    top: 100%; right: 0;
     border-radius: 4px; list-style: none;
     background: #fff;
     margin: .2em 0 0; padding: 0;
    border: 1px solid #ccc;
     border-radius: 4px;
    list-style: none;
     margin: .2em 0 0;
    padding: 0;
     min-width: 160px;
     min-width: 160px;
     box-shadow: 0 2px 6px rgba(0,0,0,0.1);
     box-shadow: 0 2px 6px rgba(0,0,0,0.1);
Line 132: Line 152:
.drg-user:hover .drg-user-dropdown,
.drg-user:hover .drg-user-dropdown,
.drg-user-dropdown:hover {
.drg-user-dropdown:hover {
     display: block;
     display: block !important;
}
}
.drg-user-dropdown li {
.drg-user-dropdown li {
Line 141: Line 161:
}
}
.drg-user-dropdown li a {
.drg-user-dropdown li a {
     display: block; padding: .5em 1em;
     display: block;
     color: #000; white-space: nowrap;
    padding: .5em 1em;
     color: #000;
    white-space: nowrap;
}
}
.drg-user-dropdown li a:hover {
.drg-user-dropdown li a:hover {
Line 159: Line 181:
}
}
.drg-columns {
.drg-columns {
     display: flex; justify-content: center;
     display: flex;
     align-items: stretch; gap: 2em;
    justify-content: center;
     max-width: 1200px; margin: 0 auto;
     align-items: stretch;
    gap: 2em;
     max-width: 1200px;
    margin: 0 auto;
     flex-wrap: nowrap;
     flex-wrap: nowrap;
}
}
.drg-column {
.drg-column {
     flex: 1 1 33%; display: flex;
     flex: 1 1 33%;
     flex-direction: column; gap: 1em;
    display: flex;
     flex-direction: column;
    gap: 1em;
     min-width: 0;
     min-width: 0;
}
}
.drg-column-left {
.drg-column-left {
     align-items: flex-end; text-align: left;
     align-items: flex-end;
    text-align: left;
     padding-right: 1.5em;
     padding-right: 1.5em;
}
}
.drg-column-right {
.drg-column-right {
     align-items: flex-start; text-align: right;
     align-items: flex-start;
    text-align: right;
     padding-left: 1.5em;
     padding-left: 1.5em;
}
}
.drg-column-left a,
.drg-column-left a,
.drg-column-right a {
.drg-column-right a {
     color: #000; text-decoration: none;
     color: #000;
    text-decoration: none;
}
}
.drg-column-left a:hover,
.drg-column-left a:hover,
Line 186: Line 216:
}
}
.drg-divider {
.drg-divider {
     width: 1px; background: #666;
     width: 1px;
     opacity: 0.4; align-self: stretch;
    background: #666;
     opacity: 0.4;
    align-self: stretch;
}
}
.drg-column-center {
.drg-column-center {
     text-align: center; align-items: center;
     text-align: center;
    align-items: center;
     justify-content: center;
     justify-content: center;
}
}
Line 197: Line 230:
}
}
.drg-eu-flag img {
.drg-eu-flag img {
     height: 4em; width: auto; max-width: 100%;
     height: 4em;
    width: auto;
    max-width: 100%;
}
}
.drg-eu-text {
.drg-eu-text {
     font-weight: bold; line-height: 1.5;
     font-weight: bold;
     font-size: 1em; max-width: 400px;
    line-height: 1.5;
     text-align: center; color: #000;
     font-size: 1em;
    max-width: 400px;
     text-align: center;
    color: #000;
}
}
.drg-disclaimer {
.drg-disclaimer {
     max-width: 900px; margin: 2em auto 0;
     max-width: 900px;
     padding: 1em 0 0; border-top: 1px solid #eee;
    margin: 2em auto 0;
     font-size: 0.9em; color: #666;
     padding: 1em 0 0;
    border-top: 1px solid #eee;
     font-size: 0.9em;
    color: #666;
     text-align: center;
     text-align: center;
}
}
.drg-disclaimer a {
.drg-disclaimer a {
     color: var(--myriad-blue); text-decoration: underline;
     color: var(--myriad-blue);
    text-decoration: underline;
}
}


Line 217: Line 259:
@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-navbar-links {
     .drg-navbar-links {
Line 223: Line 266:
     }
     }
     .drg-columns {
     .drg-columns {
         flex-direction: column; align-items: center;
         flex-direction: column;
        align-items: center;
     }
     }
     .drg-divider {
     .drg-divider {
Line 229: Line 273:
     }
     }
     .drg-column {
     .drg-column {
         width: 100%; text-align: center !important;
         width: 100%;
         align-items: center !important; padding: 0 !important;
        text-align: center !important;
         align-items: center !important;
        padding: 0 !important;
     }
     }
     .drg-eu-text {
     .drg-eu-text {

Revision as of 14:47, 24 June 2025

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

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

/* ===== RESET & SPACING ===== */
html { font-size: 100%; margin: 0; }
body {
    margin: 0;
    padding-top: 60px !important; /* space for navbar */
}
#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;
    justify-content: space-between;
    padding: .75em 1em;
    gap: 1em;
    flex-wrap: wrap;
}

/* Logo */
.drg-navbar-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* Links */
.drg-navbar-links {
    display: flex;
    gap: 2em;
    flex-grow: 1;
    justify-content: center;
    flex-wrap: wrap;
}
.drg-navbar-links a {
    position: relative;
    padding-bottom: 2px;
    font-weight: 500;
}
.drg-navbar-links a::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    height: 2px; width: 0;
    background: var(--myriad-blue);
    transition: width 200ms ease;
}
.drg-navbar-links a:hover::after {
    width: 100%;
}

/* ===== SEARCH FORM ===== */
.drg-search {
    display: flex;
    align-items: center;
}
.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 DROPDOWN ===== */
.drg-navbar-actions {
    display: flex;
    align-items: center;
    gap: 1em;
    position: relative;
    overflow: visible !important;   /* allow dropdown to overflow */
}
.drg-user {
    position: relative;
    cursor: pointer;
}
.drg-user > span {
    padding: .4em .6em;
    display: inline-block;
}
.drg-user-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-user-dropdown:hover {
    display: block !important;
}
.drg-user-dropdown li {
    border-bottom: 1px solid #eee;
}
.drg-user-dropdown li:last-child {
    border-bottom: none;
}
.drg-user-dropdown li a {
    display: block;
    padding: .5em 1em;
    color: #000;
    white-space: nowrap;
}
.drg-user-dropdown li a:hover {
    background: #f5f5f5;
}

/* ===== DRG FOOTER ===== */
#drg-footer {
    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 {
    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-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;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .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%;
    }
}