MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
Line 373: Line 373:
   }
   }
}
}
/* Your icons */
 
.icon-copy {
.icon-copy {
   background-image: url('/images/copy.svg');
   background-image: url('/images/copy.svg');
Line 382: Line 382:
}
}


/* Optional polish */
.verse-action-btn {
.verse-action-btn {
   cursor: pointer;
   cursor: pointer;
Line 395: Line 394:
.shloka-line {
.shloka-line {
   display: flex;
   display: flex;
   align-items: center;   /* better */
   align-items: center;
   justify-content: flex-start; /* IMPORTANT */
   justify-content: flex-start;
   gap: 10px;}
   gap: 10px;
}


/* Keep text natural */
.shloka-line > *:first-child {
.shloka-line > *:first-child {
   flex: 1;
   flex: 1;
}
}


/* Actions aligned nicely */
.verse-actions {
.verse-actions {
   display: inline-flex;
   display: inline-flex;
Line 413: Line 411:
   padding-left: 12px;
   padding-left: 12px;
}
}
/* Icon tuning */
 
.icon {
.icon {
   display: inline-block;
   display: inline-block;
Line 424: Line 422:
   pointer-events: none;
   pointer-events: none;
}
}
.verse-action-btn {
.verse-action-btn {
   display: inline-flex;
   display: inline-flex;
Line 435: Line 434:
}
}


/* Hover */
.verse-action-btn:hover {
.verse-action-btn:hover {
   opacity: 1;
   opacity: 1;
Line 442: Line 440:
}
}


/* Default */
.verse-action-commentary {
.verse-action-commentary {
   opacity: 0.7;
   opacity: 0.7;
}
}


/* Active (OPEN) */
.verse-action-commentary.active {
.verse-action-commentary.active {
   background-color: rgba(0, 0, 0, 0.08);
   background-color: rgba(0, 0, 0, 0.08);
Line 453: Line 449:
}
}


/* Optional: color tint if SVG is monochrome */
.verse-action-commentary.active .icon {
.verse-action-commentary.active .icon {
   filter: invert(25%) sepia(80%) saturate(500%) hue-rotate(200deg);
   filter: invert(25%) sepia(80%) saturate(500%) hue-rotate(200deg);
}
}
/* =========================
 
  VERSE ACTIONS ROW
========================= */
.verse-block {
.verse-block {
   display: flex;
   display: flex;
Line 474: Line 467:
}
}


/* =========================
  COPY TOOLTIP
========================= */
.copy-tooltip {
.copy-tooltip {
   position: absolute;
   position: absolute;
Line 505: Line 495:
   transform: translateX(-50%) translateY(0);
   transform: translateX(-50%) translateY(0);
}
}
/* ════════════════════════════════════════════════
 
   Grantha — Main Page styles
 
   Edit at: yourdomain.com/wiki/MediaWiki:Common.css
/* ════════════════════════════════════════════════════════════════
   ════════════════════════════════════════════════ */
   Grantha — Site chrome
  Hides MediaWiki UI on all NS_MAIN pages.
  The top bar and its styles are injected by MediaWiki:Common.js
  because JS is needed to read wgAction / wgMainPageTitle.
   ════════════════════════════════════════════════════════════════ */
 
/* Sidebar */
#mw-navigation, #mw-panel, .mw-sidebar,
.vector-sidebar-container, .vector-sidebar-container-no-toc,
#p-logo, .mw-portlet-logo { display: none !important; }
 
/* Page action tabs (Edit, History, Talk …) */
#p-views, #p-cactions, .mw-portlet-views, .vector-page-tools,
.vector-page-tools-landmark, #ca-edit, #ca-ve-edit, #ca-history,
#ca-talk, #ca-nstab-main, .page-actions-menu,
.vector-page-titlebar-toc { display: none !important; }
 
/* Personal / user tools */
#p-personal, .vector-user-links, .vector-user-menu,
#pt-createaccount, #pt-login, #pt-logout,
.mw-portlet-personal,
.vector-client-prefs-landmark { display: none !important; }
 
/* Top header search strip */
#p-search, .vector-search-box,
.mw-header .cdx-search-input { display: none !important; }
 
/* Vector 2022 header columns */
.vector-header-start, .vector-header-end,
.mw-header { display: none !important; }
 
/* Footer */
#footer, .mw-footer, .vector-footer,
.page-footer { display: none !important; }
 
/* Misc clutter */
#siteNotice, #localNotice, .usermessage,
#catlinks, .catlinks, .printfooter,
.mw-indicators { display: none !important; }
 
/* Remove sidebar left-margin, full-width content */
#mw-content-text, #content, .mw-body,
.mw-body-content, .vector-body,
#bodyContent { margin-left: 0 !important; padding-left: 0 !important; }
 
#content, #mw-content-container, .mw-page-container,
.vector-page-container,
.mw-body { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
 
#mw-content-text, #bodyContent { margin-top: 0 !important; }
 
/* Push content below the fixed top bar injected by Common.js */
body { padding-top: 50px !important; }
 
@media print {
  #grantha-topbar { display: none !important; }
  body { padding-top: 0 !important; }
}
 
 
/* ════════════════════════════════════════════════════════════════
  Grantha — Top bar styles
  The bar DOM is built in MediaWiki:Common.js; styles live here
  so they benefit from ResourceLoader caching.
  ════════════════════════════════════════════════════════════════ */
 
#grantha-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  height: 50px;
  background: #1a2e40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: system-ui, sans-serif;
}
 
#grantha-topbar .gt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
 
#grantha-topbar .gt-favicon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .9;
}
 
#grantha-topbar .gt-name {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
 
#grantha-topbar .gt-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
 
#grantha-topbar .gt-btn {
  font-size: 12.5px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
 
#grantha-topbar .gt-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
}
 
 
/* ════════════════════════════════════════════════════════════════
  Grantha — Main Page
   ════════════════════════════════════════════════════════════════ */


#se-home {
#se-home {
font-family: system-ui, -apple-system, sans-serif;
  font-family: system-ui, -apple-system, sans-serif;
max-width: 680px;
  max-width: 680px;
margin: 0 auto;
  margin: 0 auto;
padding: 0 0 48px;
  padding: 0 0 48px;
}
}


#se-home h2,
#se-home h2,
#se-home .mw-heading {
#se-home .mw-heading {
display: none;
  display: none;
}
}


.se-hero {
.se-hero {
background: linear-gradient( 160deg, #f7f4ef 0%, #faf8f3 60%, #eef3f8 100% );
  background: linear-gradient(160deg, #f7f4ef 0%, #faf8f3 60%, #eef3f8 100%);
padding: 44px 28px 36px;
  padding: 44px 28px 36px;
text-align: center;
  text-align: center;
border-radius: 12px;
  border-radius: 12px;
margin-bottom: 32px;
  margin-bottom: 32px;
border: 1px solid #e8e4dc;
  border: 1px solid #e8e4dc;
}
}


.se-hero-verse {
.se-hero-verse {
font-size: 14px;
  font-size: 14px;
color: #8a7e6c;
  color: #8a7e6c;
font-style: italic;
  font-style: italic;
line-height: 1.9;
  line-height: 1.9;
margin-bottom: 18px;
  margin-bottom: 18px;
opacity: .85;
  opacity: .85;
}
}


.se-hero-title {
.se-hero-title {
font-size: 30px;
  font-size: 30px;
font-weight: 700;
  font-weight: 700;
color: #1a2e40;
  color: #1a2e40;
letter-spacing: -.01em;
  letter-spacing: -.01em;
margin-bottom: 6px;
  margin-bottom: 6px;
}
}


.se-hero-sub {
.se-hero-sub {
font-size: 13px;
  font-size: 13px;
color: #8a9bb0;
  color: #8a9bb0;
}
}


.se-section {
.se-section {
margin-bottom: 32px;
  margin-bottom: 32px;
}
}


.se-section-label {
.se-section-label {
font-size: 11px;
  font-size: 11px;
font-weight: 700;
  font-weight: 700;
text-transform: uppercase;
  text-transform: uppercase;
letter-spacing: .1em;
  letter-spacing: .1em;
color: #8a9bb0;
  color: #8a9bb0;
margin-bottom: 10px;
  margin-bottom: 10px;
padding-bottom: 8px;
  padding-bottom: 8px;
border-bottom: 1px solid #eef0f3;
  border-bottom: 1px solid #eef0f3;
}
}


.se-doclist {
.se-doclist {
border: 1px solid #e8eaed;
  border: 1px solid #e8eaed;
border-radius: 10px;
  border-radius: 10px;
overflow: hidden;
  overflow: hidden;
}
}


.se-docrow {
.se-docrow {
display: flex;
  display: flex;
align-items: center;
  align-items: center;
gap: 14px;
  gap: 14px;
padding: 14px 20px;
  padding: 14px 20px;
background: #fff;
  background: #fff;
border-bottom: 1px solid #f0f2f5;
  border-bottom: 1px solid #f0f2f5;
transition: background .1s;
  transition: background .1s;
}
}


.se-docrow:last-child {
.se-docrow:last-child {
border-bottom: none;
  border-bottom: none;
}
}


.se-docrow:hover {
.se-docrow:hover {
background: #f7f9fc;
  background: #f7f9fc;
}
}


.se-docrow--dev {
.se-docrow--dev {
background: #f5f8ff;
  background: #f5f8ff;
}
}


.se-docrow--dev:hover {
.se-docrow--dev:hover {
background: #edf2ff;
  background: #edf2ff;
}
}


.se-docrow-num {
.se-docrow-num {
font-size: 12px;
  font-size: 12px;
color: #c8d0da;
  color: #c8d0da;
min-width: 20px;
  min-width: 20px;
flex-shrink: 0;
  flex-shrink: 0;
font-variant-numeric: tabular-nums;
  font-variant-numeric: tabular-nums;
}
}


.se-docrow-title {
.se-docrow-title {
font-size: 14.5px;
  font-size: 14.5px;
font-weight: 600;
  font-weight: 600;
flex: 1;
  flex: 1;
}
}


.se-docrow-title a {
.se-docrow-title a {
color: #1a2e40;
  color: #1a2e40;
text-decoration: none;
  text-decoration: none;
display: block;
  display: block;
}
}


.se-docrow-title a:hover {
.se-docrow-title a:hover {
color: #2a5298;
  color: #2a5298;
}
}


.se-doclist-actions {
.se-doclist-actions {
margin-top: 14px;
  margin-top: 14px;
}
}


.se-newdoc-trigger {
.se-newdoc-trigger {
display: inline-flex;
  display: inline-flex;
align-items: center;
  align-items: center;
gap: 7px;
  gap: 7px;
font-size: 13px;
  font-size: 13px;
font-weight: 600;
  font-weight: 600;
color: #1a2e40;
  color: #1a2e40;
padding: 8px 20px;
  padding: 8px 20px;
border-radius: 20px;
  border-radius: 20px;
border: 1.5px solid #1a2e40;
  border: 1.5px solid #1a2e40;
cursor: pointer;
  cursor: pointer;
transition: background .14s, color .14s;
  transition: background .14s, color .14s;
}
}


.se-newdoc-trigger:hover {
.se-newdoc-trigger:hover {
background: #1a2e40;
  background: #1a2e40;
color: #fff;
  color: #fff;
}
}