MediaWiki:Common.css: Difference between revisions

From Disaster Risk Gateway
No edit summary
Tag: Manual revert
No edit summary
Tag: Reverted
Line 373: Line 373:
   justify-content: center;
   justify-content: center;
   align-items: center;
   align-items: center;
  text-align: center;         
  flex-wrap: wrap;             
  word-wrap: break-word;       
  overflow-wrap: break-word;   
  padding: 1rem;               
   text-decoration: none;
   text-decoration: none;
   color: #fff;
   color: #fff;
Line 380: Line 385:
   font-size: 1.1rem;
   font-size: 1.1rem;
   transition: background 0.3s, transform 0.3s;
   transition: background 0.3s, transform 0.3s;
  box-sizing: border-box;      /* Ensure padding is included in width/height */
}
}



Revision as of 11:23, 14 August 2025

/* ===== IMPORT BARLOW ===== */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&display=swap');

/* ===== GLOBAL FONT ===== */
html, body, #content, #mw-content-text, .drg-navbar-container, .mainpage-card, #drg-footer, .drg-footer-inner, .drg-column {
  font-family: 'Barlow', Arial, sans-serif;
}

/* ===== 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,
*#p-personal,
.vector-user-links,
#left-navigation,
#right-navigation {
  display: none !important;
}

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

/* ===== RESET & BASE STYLING ===== */
html {
  font-size: 100%;
  margin: 0;
  min-height: 100vh;
  background: #fff;
}
body {
  margin: 0;
  padding-top: 60px;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#content,
#mw-content-text {
  flex-grow: 1;
}

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

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

/* === Responsive logo === */
.logo-container {
  max-width: 43.75rem; /* 700px ÷ 16 */
  margin: 0 auto;
  padding: 0.3125rem;  /* 5px ÷ 16 */
  text-align: center;
}

.responsive-logo img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ===== NAVBAR ===== */
#drg-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 10000;
  overflow: visible !important;
}
.drg-navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: .75em 1em;
  gap: 1em;
  flex-wrap: nowrap;
  overflow-x: visible !important;
  position: relative;
}
.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;
  z-index: 10002;
}
.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: 9999 !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;
}
.drg-nav:hover .drg-nav-dropdown {
  display: block !important;
}
.flat-link {
  font-weight: 500;
  margin-right: 1.5em;
}
.drg-navbar-actions {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-left: auto;
  flex-wrap: nowrap;
}

/* ===== USER & TOOLS DROPDOWNS ===== */
.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: 9999 !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;
}
.drg-user:hover .drg-user-dropdown,
.drg-tools:hover .drg-tools-dropdown {
  display: block !important;
}

/* ===== MAIN PAGE FLIP CARDS ===== */
.mainpage-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

/* Card container */
.mainpage-card {
  flex: 0 1 220px;
  max-width: 220px;
  height: 300px;
  perspective: 1000px;
  text-decoration: none;
  color: inherit;
  display: block;
  overflow: visible;
}

/* Inner wrapper for flip effect */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* Flip on hover */
.mainpage-card:hover .card-inner {
  transform: rotateY(180deg);
}

/* Front and back faces */
.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Front face */
.card-front {
  background: #fff;
  color: var(--myriad-blue);
  text-align: center;
}

/* Remove MediaWiki wrapper box around images */
.card-front .thumb,
.card-front .mw-thumbnail {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  width: auto !important;
  box-shadow: none !important;
}

/* Image */
.card-front img {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  display: block;
  margin: 0 auto;
  max-width: 120px;
  max-height: 50%;
  width: auto;
  height: auto;
}

/* Remove code block grey background and align inline with text inside cards */
.mainpage-card pre,
.mainpage-card code,
.mainpage-card .mw-code {
    display: inline !important;
    font: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    color: inherit !important;
    white-space: pre !important;
    vertical-align: baseline !important;
}

/* Front titles */
.card-front h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Back face */
.card-back {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transform: rotateY(180deg);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Full-size back button */
.card-back a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;          
  flex-wrap: wrap;              
  word-wrap: break-word;        
  overflow-wrap: break-word;    
  padding: 1rem;                
  text-decoration: none;
  color: #fff;
  background-color: var(--myriad-blue);
  border-radius: 16px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background 0.3s, transform 0.3s;
  box-sizing: border-box;       /* Ensure padding is included in width/height */
}

.card-back a:hover {
  background-color: var(--myriad-pink);
  transform: scale(1.02);
}

/* Hover animation for front */
.mainpage-card:hover .card-front {
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  border: 2px solid var(--myriad-blue);
  background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .mainpage-cards {
    gap: 1rem;
    padding: 0 1rem;
  }
  .mainpage-card {
    flex: 1 1 90%;
    max-width: 90%;
  }
}


/* ===== FOOTER STYLES ===== */
#drg-footer {
  background: linear-gradient(to top, #374cff 0%, #db20d2 80%, #ffffff 100%);
  color: #fff;
  padding: 3em 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
}

.mw-footer-container #drg-footer {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.drg-footer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.drg-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  text-align: center;
}

.drg-column {
  flex: 0 1 calc(33.333% - 2em);
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: center;
  box-sizing: border-box;
}

.drg-column-left,
.drg-column-center,
.drg-column-right {
  align-items: center;
}

.drg-eu-flag img {
  max-height: 4em !important;
  width: auto !important;
  display: block;
  margin: 0 auto;
  border: 1px solid #fff;   
  box-sizing: border-box;
}

.drg-eu-text {
  font-weight: bold;
  color: #fff;
  line-height: 1.5;
  font-size: 1em;
  max-width: 400px;
  text-align: center;
}

.drg-disclaimer-wrapper {
  margin-top: 2em;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.drg-disclaimer a {
  color: #fff;
  text-decoration: underline;
}

/* ===== FOOTER LINKS - WHITE WITH HOVER POP ===== */
#drg-footer a {
  color: #fff; /* white links */
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

#drg-footer a:hover {
  color: var(--myriad-green); 
  transform: scale(1.08); /* pop */
  text-decoration: underline;
}

@media (max-width: 768px) {
  .drg-columns {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  .drg-column {
    flex: 1 1 100%;
    max-width: 500px;
  }
}