MediaWiki:Common.css: Difference between revisions

From Tibia Idle wiki

No edit summary
No edit summary
Line 172: Line 172:
}
}


/* GRID na kafelki z itemami */
/* --- SIATKA KAFELKÓW Z ITEMAMI --- */
.item-grid { display:flex; flex-wrap:wrap; gap:10px; padding:10px 0; }
.items-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  padding: 10px 4px;
}


/* Każdy link w siatce wygląda jak kafelek */
/* Kafelek */
.item-grid a {
.item-card {
   display:flex;
   background: #f7f9fc;
   flex-direction:column;
   border-radius: 16px;
   align-items:center;
   box-shadow: 0 2px 10px rgba(0,0,0,.06);
   gap:6px;
   display: flex;
   padding:12px 14px;
   align-items: center;
  min-width:160px;
   justify-content: center;
   border-radius:12px;
   text-align: center;
  background:#fff;
   padding: 18px 14px;
   text-decoration:none;
   min-height: 150px;
   color:inherit;
   transition: transform .08s ease, box-shadow .2s ease;
   box-shadow:0 1px 2px rgba(0,0,0,.06);
   transition:transform .05s ease, box-shadow .2s ease;
}
}


/* Sam obrazek */
/* Klikalny cały kafelek */
.item-grid a img { image-rendering:pixelated; }
.item-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #0f172a !important;      /* normalny kolor */
}
 
/* Redlink (strona nie istnieje) – też normalny kolor */
.item-card a.new { color: #0f172a !important; }
 
/* Obrazek */
.item-card img {
  width: 48px; height: auto;
  image-rendering: pixelated;
}


/* PODPIS – automatycznie z atrybutu title linku */
/* Podpis */
.item-grid a::after {
.item-card .item-label {
  content: attr(title);        /* ← TU magia */
   font-weight: 700;
   font-weight:600;
   line-height: 1.2;
   text-align:center;
}
}


/* Hover */
/* Hover */
.item-grid a:hover {
.item-card:hover {
   transform: translateY(-1px);
   transform: translateY(-2px);
   box-shadow:0 4px 14px rgba(0,0,0,.08);
   box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
}


/* Dark mode (opcjonalnie) */
/* Tło sekcji (opcjonalnie) */
@media (prefers-color-scheme: dark) {
.section-soft {
   .item-grid a { background:#111827; box-shadow:0 1px 2px rgba(0,0,0,.5); }
   background: #e9eff5;
  border-radius: 16px;
  padding: 16px;
}
}


/* Mobile */
/* Mobile dopieszczone */
@media (max-width: 800px) {
@media (max-width: 700px) {
   .item-grid a { min-width:140px; padding:10px 12px; }
  .items-wrap { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
   .item-card { min-height: 130px; padding: 14px 10px; }
}
}

Revision as of 13:08, 2 September 2025

/* RESPONSYWNA, NOWOCZESNA, JASNA TABELA WIKI */

/* Każdą tabelę opakowujemy w przewijalny kontener */
.wikitable {
    background: #fff !important;
    color: #23272e !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    margin: 32px auto !important;
    /* Usuńemy sztywne min-width i width */
    /* min-width: 600px; */
    /* width: 100% !important; */
}

/* Styl komórek */
.wikitable th,
.wikitable td {
    padding: 12px 16px !important;
    border: none !important;
    vertical-align: middle !important;

}

/* Styl nagłówków */
.wikitable th {
    background: #f7fafc !important;
    color: #3182ce !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    border-bottom: 2px solid #3182ce !important;
}

/* Co drugi wiersz lekko szary */
.wikitable tr:nth-child(even) { background: #f5f6fa !important; }
.wikitable tr:nth-child(odd)  { background: #fff      !important; }

/* Efekt hover */
.wikitable tr:hover { background: #e3eafc !important; }

/* Linki bez podkreślenia */
.wikitable a,
.wikitable a:visited {
    color: #000000 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}
.wikitable a:hover {
    color: #001adb !important;
}

/* Zaokrąglenie rogów tylko na rogach tabeli */
.wikitable th:first-child                       { border-top-left-radius: 12px !important; }
.wikitable th:last-child                        { border-top-right-radius: 12px !important; }
.wikitable tr:last-child td:first-child         { border-bottom-left-radius: 12px !important; }
.wikitable tr:last-child td:last-child          { border-bottom-right-radius: 12px !important; }


/* --- RESPONSYWNE PRZEWIJANIE I CENTROWANIE NA MOBILNYCH --- */
@media screen and (max-width: 800px) {
  .wikitable {
    overflow-x: auto !important;
    margin: 0.5em auto !important;          /* centrowanie */
    max-width: calc(100% - 1em) !important;  /* uwzględnia padding artykułu */
    padding: 0 0.1em;                        /* opcjonalny wewnętrzny margines */
    /* upewniamy się, że nie blokuje min-width */
    min-width: 0 !important;
  }
  .wikitable th,
  .wikitable td {
    padding: 8px 12px !important;
    min-width: auto !important;
  }

  /* Infoboxy (np. Ancient Tiara) analogicznie */
  table.infobox {
    display: block !important;
    overflow-x: auto !important;
    margin: 0.5em auto !important;
    max-width: calc(100% - 1em) !important;
    min-width: 0 !important;
  }
  table.infobox td {
    white-space: nowrap !important;
  }
}


/* Dla kafelkowej tabeli głównej – wszystkie kafle równe i linki bez podkreśleń */
table.mainpage-tiles {
    border-collapse: separate !important;
    border-spacing: 20px 18px !important;
    margin: 30px auto 0 auto;
    background: transparent !important;
}

.mainpage-tile {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(50,50,93,.08), 0 1.5px 6px rgba(49,130,206,.09);
    padding: 18px 10px 10px 10px;
    width: 260px;                 /* SZTYWNA szerokość wszystkich kafli */
    max-width: 260px;
    min-width: 260px;
    text-align: center;
    font-size: 1.07em;
    border: 1px solid #f0f1f7;
    transition: box-shadow 0.2s, transform 0.12s;
    vertical-align: top;
}

.mainpage-tile:hover {
    box-shadow: 0 8px 32px rgba(49,130,206,.13), 0 2px 8px rgba(49,130,206,.11);
    transform: translateY(-3px) scale(1.015);
    border: 1.5px solid #b3d5fa;
}

.mainpage-tile img {
    margin-bottom: 12px;
    margin-top: 4px;
    max-width: 96px;
    height: auto;
}

.mainpage-tile-desc {
    font-size: .96em;
    color: #595e66;
    margin-top: 3px;
}

/* Styl linków – brak podkreśleń */
.mainpage-tile a,
.mainpage-tile a:visited {
    color: #2266e2 !important;
    font-weight: bold;
    text-decoration: none !important;
    font-size: 1.17em;
}

.mainpage-tile a:hover {
    color: #000 !important;
}

/* Responsive kafle na mobilnych */
@media (max-width: 800px) {
    table.mainpage-tiles {
        border-spacing: 8px 10px !important;
    }
    .mainpage-tile {
        min-width: 125px;
        max-width: 98vw;
        width: 98vw;
        padding: 12px 3px 7px 3px;
    }
    .mainpage-tile img {
        max-width: 70px;
    }

tbody, td, tfoot, th, thead, tr {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

}

.mw-parser-output table {
  /* nadpisujemy block na table */
  display: table !important;
  overflow: auto;
  max-width: 100%;
}

/* --- SIATKA KAFELKÓW Z ITEMAMI --- */
.items-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  padding: 10px 4px;
}

/* Kafelek */
.item-card {
  background: #f7f9fc;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 14px;
  min-height: 150px;
  transition: transform .08s ease, box-shadow .2s ease;
}

/* Klikalny cały kafelek */
.item-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #0f172a !important;       /* normalny kolor */
}

/* Redlink (strona nie istnieje) – też normalny kolor */
.item-card a.new { color: #0f172a !important; }

/* Obrazek */
.item-card img {
  width: 48px; height: auto;
  image-rendering: pixelated;
}

/* Podpis */
.item-card .item-label {
  font-weight: 700;
  line-height: 1.2;
}

/* Hover */
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Tło sekcji (opcjonalnie) */
.section-soft {
  background: #e9eff5;
  border-radius: 16px;
  padding: 16px;
}

/* Mobile dopieszczone */
@media (max-width: 700px) {
  .items-wrap { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .item-card { min-height: 130px; padding: 14px 10px; }
}