MediaWiki:Common.css: Difference between revisions

No edit summary
Tags: Mobile edit Mobile web edit
No edit summary
Tags: Mobile edit Mobile web edit
Line 84: Line 84:


/* === Hilangkan judul "Halaman Utama" di tampilan MobileFrontend === */
/* === Hilangkan judul "Halaman Utama" di tampilan MobileFrontend === */
.page-Main_Page #section_0,
.page-Halaman_Utama #section_0,
.page-Main_Page .content-header,
.page-Halaman_Utama .content-header,
.page-Main_Page h1.firstHeading,
.page-Halaman_Utama h1.firstHeading,
.page-Main_Page #firstHeading {
.page-Halaman_Utama #firstHeading {
     display: none !important;
     display: none !important;
}
}


/* Opsional: rapikan jarak setelah header hilang */
/* Opsional: rapikan jarak setelah header hilang */
.page-Main_Page .content {
.page-Halaman_Utama .content {
     margin-top: 0 !important;
     margin-top: 0 !important;
     padding-top: 0.5em !important;
     padding-top: 0.5em !important;
}
}


@media screen {
/* ====== INFOBOX STYLE ====== */
.infobox {
 
background-color: var(--background-color-neutral-subtle, #f8f9fa);
.infobox {
}
    border: 1px solid #a2a9b1;
    border-collapse: collapse;
    background-color: #f8f9fa;
    color: #000;
    margin: 1em 0 1em 1em;
    padding: 0;
    width: 100%;
    max-width: 330px; /* biar mobile rapi */
    float: right;
    clear: right;
    font-size: 65%;/* ukuran HP */
}
 
/* HEADER ATAS (TITLE) */
/* Warna biru muda + teks rata tengah */
.infobox-title, .infobox .infobox-above {
    background: #cedff2;
    text-align: center;
    font-size: 120%;
    font-weight: bold;
    padding: 8px;
    border-bottom: 1px solid #a2a9b1;
}
 
/* ====== GARIS SETIAP BARIS ====== */
.infobox td, .infobox th {
    border-top: 1px solid #a2a9b1 !important;
    padding: 6px;
}
 
/* LABEL KIRI */
.infobox-label {
    font-weight: bold;
    width: 40%;
    vertical-align: top;
}
 
/* Data infobox rata tengah */
.infobox-label {
    text-align: center !important;
}
 
/* DATA KANAN */
.infobox-data {
    width: 50%;
}
 
/* Data infobox rata tengah */
.infobox-data {
    text-align: center !important;
}
}


@media (max-width: 640px) {
/* BAGIAN HEADING DALAM (seperti “Informasi latar belakang”) */
.infobox {
.infobox-header, .infobox-subheader {
width: 100%;
    background: #e2e6ea;
}
    font-weight: bold;
      
     text-align: center;
.infobox .nowrap {
    padding: 6px;
white-space: normal;
    border-top: 1px solid #a2a9b1;
}
    border-bottom: 1px solid #a2a9b1;
}
}


@media (min-width: 640px) {
/* GAMBAR */
.infobox {
.infobox img {
/* @noflip */
    width: 100%;
margin-left: 1em;
    height: auto;
/* @noflip */
    display: block;
float: right;
/* @noflip */
clear: right;
width: 22em;
}
}
}


.infobox-header,
/* MOBILE FIX */
.infobox-label,
@media screen and (max-width: 600px) {
.infobox-above,
    .infobox {
.infobox-full-data,
        float: none;
.infobox-data,
        margin: 0 auto 1em;
.infobox-below,
        width: 100%;
.infobox-subheader,
    }
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
vertical-align: top;
}
}


.infobox-label,
/* ============================================
.infobox-data,
  FIX #1 — HEADER BIRU TIDAK RATA TENGAH
/* Remove element selector when every .infobox thing is using the standard module/templates  */
  ============================================ */
.infobox th,
.infobox-title,  
.infobox td {
.infobox .infobox-above {
/* @noflip */
    text-align: center !important; /* paksa center */
text-align: center;
    font-size: 100% !important;   /* biar besar seperti Wikipedia mobile */
}
}


/* Remove .infobox when element selectors above are removed */
/* ============================================
.infobox .infobox-above,
  FIX #2 — INFOBOX TERLALU KECIL DI HP
.infobox .infobox-title,
  BIKIN LEBARNYA 100% SEPERTI DI WIKIPEDIA MOBILE
/* Remove element selector when every .infobox thing is using the standard module/templates */
  ============================================ */
.infobox caption {
@media screen and (max-width: 600px) {
font-size: 125%;
    .infobox {
font-weight: bold;
        width: 100% !important;      /* full width */
text-align: center;
        max-width: 100% !important; /* hilangin batas 330px */
        margin: 0 auto 1em !important;
        float: none !important;      /* biar tidak mengecil ke kanan */
        font-size: 100% !important; /* otomatis sesuai layar */
    }
 
    /* gambar jangan mepet kiri-kanan */
    .infobox img {
        width: 100% !important;
        height: auto !important;
    }
}
}


.infobox-title,
/* ============================================
/* Remove element selector when every .infobox thing is using the standard module/templates  */
  FIX #3 — JARAK ANTAR BORDER TERLALU BESAR
.infobox caption {
  ============================================ */
padding: 0.2em;
.infobox td, .infobox th {
    padding: 8px 10px !important;
}
}


/* Remove .infobox when element selectors above are removed */
/* Mppedia Secret Key Hider */
.infobox .infobox-header,
.mippedia-hidden-key {
.infobox .infobox-subheader,
    display: none !important;
.infobox .infobox-image,
    visibility: hidden !important;
.infobox .infobox-full-data,
.infobox .infobox-below {
text-align: center;
}
}


/* Remove .infobox when element selectors above are removed */
/* Container Utama Ambox */
.infobox .infobox-navbar {
table.ambox {
/* @noflip */
    width: 100% !important;
text-align: right;
    margin: 1px 0 !important;
    border: 1px solid #a2a9b1;
    border-left: 10px solid #f28500 !important;
    background-color: #fbfbfb;
    display: table;
    position: relative; /* Wajib ada buat naruh elemen di pojok */
    border-collapse: collapse;
}
 
/* Area Teks Utama */
.ambox .mbox-text {
    padding: 12px 15px 40px 10px !important; /* Padding bawah gede buat ruang link */
    font-size: 14px;
    line-height: 1.5;
}
 
/* Link 'Pelajari selengkapnya' - PAKSA KE KANAN BAWAH */
.ambox-learn-more {
    display: block !important;
    position: absolute; /* Jurus rahasia buat pojokan */
    bottom: 8px;
    right: 15px; /* Pindah ke kanan */
    color: #36c !important;
    font-weight: normal;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}
 
.ambox-learn-more:hover {
    text-decoration: underline;
}
 
/* Sembunyikan teks panjang secara default */
.ambox-text-long, .hide-when-compact {
    display: none;
}
 
/* Tampilan pas teks lengkap muncul (setelah diklik) */
.ambox-active .ambox-text-long {
    display: block !important;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eaecf0;
}
 
/* Kalau mau bener-bener ilangin ikonnya biar kayak contoh lu */
.ambox td.mbox-image {
    display: none !important;
}
}


/* ==========================================================
/* ==========================================================
   ➕ HANYA MENAMBAHKAN DI BAWAH INI (Sesuai Perintah)
   🏠 TATA LETAK HALAMAN UTAMA (MAIN PAGE LAYOUT OPTIMIZATION)
   ========================================================== */
   ========================================================== */


/* 1. Menambahkan garis bawah halus abu-abu di setiap baris data */
/* Menghilangkan padding bawaan container utama khusus di Halaman Utama */
.infobox th,  
.page-Halaman_Utama #content,
.infobox td,
.page-Halaman_Utama #mw-content-text .mw-parser-output {
.infobox-label,
    padding-top: 0 !important;
.infobox-data,
    margin-top: 0 !important;
.infobox-header,
}
.infobox-subheader {
 
border-bottom: 1px solid #eaecf0;
/* Memaksa kotak selamat datang (tabel) naik serapat mungkin ke atas */
padding: 6px 4px; /* Memberikan space halus agar tidak kaku */
.page-Halaman_Utama table.mp-box {
    margin-top: -15px !important; /* Menarik kotak ke atas untuk memotong sisa margin bawaan skin */
}
}


/* 2. Mengatur ukuran huruf caption foto agak kecil dan TETAP TEGAK (tidak miring) */
/* Memastikan elemen judul bawaan yang tersembunyi tidak memakan space ruang */
.infobox .infobox-image,
.page-Halaman_Utama #firstHeading,
.infobox tr:has(img) + tr td {
.page-Halaman_Utama .page-heading {
font-size: 88% !important;
    margin: 0 !important;
font-style: normal !important;
    padding: 0 !important;
color: #54595d;
    line-height: 0 !important;
    height: 0 !important;
    overflow: hidden;
}
}