|
|
(5 versions intermédiaires par le même utilisateur non affichées) |
Ligne 1 : |
Ligne 1 : |
| /* =================================================================
| | .infobox-table { |
| PortableInfobox Styles - Adapted from TG Design System
| | z-index: 3 !important; |
| =================================================================
| | overflow: hidden; |
|
| | width: 400px; |
| Modern infobox styling using CSS custom properties for theming
| | max-width: 100%; |
| and consistent design across all infobox templates.
| | margin-bottom: var(--space-md); |
|
| | padding-bottom: 20px !important; |
| Based on TG-style infobox design with PortableInfobox structure.
| | background: var(--color-surface-1); |
|
| | border: 1px solid var(--border-color-base); |
| ================================================================= */
| | border-radius: var(--border-radius-medium); |
| | | font-size: 0.875rem; |
| /* CSS Custom Properties (Variables) */
| | text-align: left; |
| :root {
| | display: block; |
| --tg-border-base: 1px solid #e0e6ed; | | /* Propriétés de flottement */ |
| --tg-border-radius-large: 8px; | | float: right; |
| --tg-border-radius-sharp: 0px; | | margin-left: 20px; |
| --tg-color-base: #222; | | margin-right: 0; |
| --tg-color-emphasized: #000; | | /* Position relative pour l'icône absolue */ |
| --tg-color-subtle: #666; | |
| --tg-color-surface-2: #f8f9fa; | |
| --tg-border-color-base: #e0e6ed; | |
| --tg-line-height-xx-small: 1.25; | |
| --tg-line-height-xxx-small: 1.2;
| |
| --tg-font-size-small: 14px; | |
| --tg-font-size-x-small: 12px; | |
| --tg-font-size-x-large: 18px; | |
| --tg-font-weight-regular: 400; | |
| }
| |
| | |
| /* Dark mode variables */ | |
| @media (prefers-color-scheme: dark) {
| |
| :root { | |
| --tg-border-base: 1px solid #404040;
| |
| --tg-color-base: #e0e0e0;
| |
| --tg-color-emphasized: #fff;
| |
| --tg-color-subtle: #a0a0a0;
| |
| --tg-color-surface-2: #1a1a1a;
| |
| --tg-border-color-base: #404040;
| |
| } | |
| }
| |
| | |
| /* Base PortableInfobox Container */ | |
| .portable-infobox {
| |
| position: relative; | | position: relative; |
| width: 320px;
| |
| padding: 16px 0;
| |
| border: var(--tg-border-base);
| |
| border-radius: var(--tg-border-radius-large);
| |
| border-spacing: 0;
| |
| color: var(--tg-color-base);
| |
| background-color: var(--tg-color-surface-2);
| |
| line-height: var(--tg-line-height-xx-small);
| |
| font-size: var(--tg-font-size-small);
| |
| float: right;
| |
| clear: right;
| |
| margin: 0 0 1em 1em;
| |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
| |
| }
| |
|
| |
| /* Reset default padding for all infobox elements */
| |
| .portable-infobox .pi-item {
| |
| padding: 0;
| |
| vertical-align: top;
| |
| } | | } |
|
| |
|
| /* Add consistent horizontal padding */
| | .infobox-header { |
| .portable-infobox .pi-title, | | padding: 15px; |
| .portable-infobox .pi-header,
| |
| .portable-infobox .pi-data-label,
| |
| .portable-infobox .pi-data-value {
| |
| padding-left: 16px; | |
| padding-right: 16px;
| |
| } | | } |
|
| |
|
| /* Title Styling */
| | .infobox-image { |
| .portable-infobox .pi-title { | |
| font-size: var(--tg-font-size-x-large);
| |
| line-height: var(--tg-line-height-xxx-small);
| |
| color: var(--tg-color-emphasized);
| |
| text-align: center; | | text-align: center; |
| padding-top: 0; | | background: var(--background-color-button-quiet--hover); |
| padding-bottom: 4px;
| | margin-bottom: 10px; |
| font-weight: bold;
| |
| background: transparent;
| |
| border: none; | |
| } | | } |
|
| |
|
| /* Image Container */
| | .infobox-image img { |
| .portable-infobox .pi-image { | | max-width: 100%; |
| border-top-left-radius: var(--tg-border-radius-large); | | height: auto !important; |
| border-top-right-radius: var(--tg-border-radius-large);
| |
| padding: 0 !important; | |
| transform: translateY(-16px);
| |
| overflow: hidden;
| |
| text-align: center;
| |
| } | | } |
|
| |
|
| /* Reset figure styles */
| | .infobox-title { |
| .portable-infobox .pi-image figure, | | color: var(--color-emphasized); |
| .portable-infobox .pi-image figcaption {
| | font-size: 1.4rem !important; |
| border: 0; | | font-weight: 600; |
| padding: 0; | | line-height: 1.4; |
| background: transparent; | | margin-bottom: 5px; |
| box-shadow: none; | |
| margin: 0; | |
| } | | } |
|
| |
|
| .portable-infobox .pi-image figure { | | .infobox-subtitle { |
| overflow: hidden; | | color: var(--color-subtle); |
| | font-size: 0.9rem; |
| } | | } |
|
| |
|
| /* Image thumbnail */
| | .infobox-body { |
| .portable-infobox .pi-image-thumbnail { | | padding: 0 15px; |
| margin: 0; | |
| border: 0;
| |
| width: 100%;
| |
| height: auto;
| |
| display: block;
| |
| border-radius: var(--tg-border-radius-sharp);
| |
| } | | } |
|
| |
|
| /* Image caption */
| | .infobox-section-title { |
| .portable-infobox .pi-image-caption { | | padding-top: 15px; |
| padding: 4px 16px; | | border-top: 1px solid var(--border-color-base); |
| text-align: center; | | font-weight: 600; |
| color: var(--tg-color-subtle);
| | font-size: 1rem; |
| font-size: var(--tg-font-size-x-small); | | color: var(--color-emphasized); |
| background: transparent;
| | margin-top: 10px; |
| border: none; | |
| font-style: normal; | |
| } | | } |
|
| |
|
| /* Group Headers */
| | .infobox-row { |
| .portable-infobox .pi-header { | |
| padding-top: 12px;
| |
| padding-bottom: 8px;
| |
| color: var(--tg-color-emphasized);
| |
| background: transparent !important;
| |
| border: none;
| |
| text-align: center;
| |
| font-weight: bold;
| |
| position: relative;
| |
| }
| |
| | |
| /* Header separator lines */
| |
| .portable-infobox .pi-header:not(.pi-title) {
| |
| display: flex; | | display: flex; |
| align-items: center; | | margin-top: 10px; |
| gap: 1rem;
| |
| white-space: nowrap;
| |
| color: var(--tg-color-subtle);
| |
| font-size: var(--tg-font-size-x-small);
| |
| font-weight: var(--tg-font-weight-regular);
| |
| }
| |
| | |
| .portable-infobox .pi-header:not(.pi-title):before,
| |
| .portable-infobox .pi-header:not(.pi-title):after {
| |
| content: "";
| |
| height: 1px;
| |
| width: 100%;
| |
| background-color: var(--tg-border-color-base);
| |
| }
| |
| | |
| /* Data Rows */
| |
| .portable-infobox .pi-data {
| |
| border: none;
| |
| background: transparent;
| |
| } | | } |
|
| |
|
| /* Data Labels */
| | .infobox-label { |
| .portable-infobox .pi-data-label { | | color: var(--color-subtle); |
| padding: 8px 16px;
| | font-size: 0.8125rem; |
| text-align: start;
| |
| vertical-align: top;
| |
| color: var(--tg-color-base); | |
| background: transparent; | |
| border: none;
| |
| font-weight: normal; | | font-weight: normal; |
| width: auto; | | letter-spacing: 0.75px; |
| | flex: 0 0 40%; |
| | padding-right: 10px; |
| } | | } |
|
| |
|
| /* Data Values */
| | .infobox-value { |
| .portable-infobox .pi-data-value { | | flex: 1; |
| padding: 8px 16px; | |
| background: transparent;
| |
| border: none;
| |
| color: var(--tg-color-base);
| |
| word-wrap: break-word;
| |
| vertical-align: top;
| |
| width: auto;
| |
| } | | } |
|
| |
|
| /* Special styling for subtitle-like data */ | | /* Style pour l'icône en bas à droite */ |
| .portable-infobox .pi-data[data-source="subtitle"] .pi-data-value,
| | .infobox-icon-bottom { |
| .portable-infobox .pi-data[data-source="caption"] .pi-data-value {
| | position: absolute; |
| text-align: center;
| | bottom: 10px; |
| color: var(--tg-color-subtle);
| | right: 15px; |
| font-size: var(--tg-font-size-x-small);
| | font-size: 1.2em; |
| line-height: var(--tg-line-height-xxx-small);
| | color: var(--color-subtle); |
| }
| | opacity: 0.7; |
| | | z-index: 1; |
| /* Links */
| |
| .portable-infobox a {
| |
| color: var(--tg-color-base);
| |
| text-decoration: none;
| |
| }
| |
| | |
| .portable-infobox a:hover {
| |
| text-decoration: underline;
| |
| }
| |
| | |
| /* Groups */
| |
| .portable-infobox .pi-group {
| |
| border: none;
| |
| margin: 0;
| |
| padding: 0;
| |
| background: transparent;
| |
| }
| |
| | |
| /* =================================================================
| |
| THEME SYSTEM - Color Schemes with CSS Variables
| |
| ================================================================= */
| |
| | |
| /* Monde Theme - Green */
| |
| .portable-infobox.pi-theme-monde { | |
| --theme-primary: #86C705;
| |
| --theme-accent: #099DFF;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-monde .pi-title {
| |
| background-color: var(--theme-primary) !important;
| |
| color: #fff !important;
| |
| padding: 8px 16px;
| |
| margin-bottom: 8px;
| |
| border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-monde .pi-header:not(.pi-title) {
| |
| color: var(--theme-accent) !important; | |
| }
| |
| | |
| .portable-infobox.pi-theme-monde .pi-data[data-source="seed"] .pi-data-value,
| |
| .portable-infobox.pi-theme-monde .pi-data[data-source="spawn"] .pi-data-value a {
| |
| color: var(--theme-accent);
| |
| font-style: italic;
| |
| }
| |
| | |
| /* Joueur Theme - Blue */
| |
| .portable-infobox.pi-theme-joueur {
| |
| --theme-primary: #0066CC;
| |
| --theme-accent: #4A90E2;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-joueur .pi-title {
| |
| background-color: var(--theme-primary) !important;
| |
| color: #fff !important;
| |
| padding: 8px 16px;
| |
| margin-bottom: 8px; | |
| border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-joueur .pi-header:not(.pi-title) {
| |
| color: var(--theme-primary) !important;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-joueur .pi-data[data-source="username"] .pi-data-value {
| |
| color: var(--theme-primary); | |
| font-weight: bold; | |
| }
| |
| | |
| /* Serveur Theme - Red */
| |
| .portable-infobox.pi-theme-serveur { | |
| --theme-primary: #CC0000;
| |
| --theme-accent: #FF4444;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-serveur .pi-title {
| |
| background-color: var(--theme-primary) !important; | |
| color: #fff !important;
| |
| padding: 8px 16px;
| |
| margin-bottom: 8px;
| |
| border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-serveur .pi-header:not(.pi-title) {
| |
| color: var(--theme-primary) !important; | |
| }
| |
| | |
| .portable-infobox.pi-theme-serveur .pi-data[data-source="ip"] .pi-data-value {
| |
| font-family: "Courier New", monospace;
| |
| background-color: rgba(0, 0, 0, 0.05);
| |
| padding: 4px 8px;
| |
| border-radius: 4px;
| |
| margin: 4px 0;
| |
| }
| |
| | |
| /* Événement Theme - Purple */
| |
| .portable-infobox.pi-theme-evenement {
| |
| --theme-primary: #8A2BE2;
| |
| --theme-accent: #B347D9; | |
| }
| |
| | |
| .portable-infobox.pi-theme-evenement .pi-title {
| |
| background-color: var(--theme-primary) !important;
| |
| color: #fff !important;
| |
| padding: 8px 16px;
| |
| margin-bottom: 8px;
| |
| border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-evenement .pi-header:not(.pi-title) {
| |
| color: var(--theme-primary) !important;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-evenement .pi-data[data-source="date"] .pi-data-value {
| |
| color: var(--theme-primary);
| |
| font-weight: bold;
| |
| } | | } |
|
| |
|
| /* Construction Theme - Orange */
| | @media only screen and (max-width: 720px) { |
| .portable-infobox.pi-theme-construction {
| | .infobox-table { |
| --theme-primary: #FF8C00;
| |
| --theme-accent: #FFA500;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-construction .pi-title {
| |
| background-color: var(--theme-primary) !important;
| |
| color: #fff !important;
| |
| padding: 8px 16px;
| |
| margin-bottom: 8px;
| |
| border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-construction .pi-header:not(.pi-title) {
| |
| color: var(--theme-primary) !important;
| |
| }
| |
| | |
| .portable-infobox.pi-theme-construction .pi-data[data-source="architecte"] .pi-data-value {
| |
| color: var(--theme-primary);
| |
| font-weight: bold;
| |
| }
| |
| | |
| /* =================================================================
| |
| RESPONSIVE DESIGN
| |
| ================================================================= */
| |
| | |
| @media (max-width: 640px) { | |
| .portable-infobox { | |
| width: 100%;
| |
| float: none; | | float: none; |
| margin: 1em 0; | | margin-right: auto; |
| border-radius: var(--tg-border-radius-large);
| | margin-left: auto; |
| }
| |
| | |
| .portable-infobox .pi-image {
| |
| transform: none;
| |
| border-radius: 0; | |
| margin-top: 0; | | margin-top: 0; |
| } | | } |
| | | |
| .portable-infobox .pi-image figure { | | .infobox-icon-bottom { |
| margin-top: 16px;
| | bottom: 8px; |
| }
| | right: 12px; |
| | | font-size: 1.1em; |
| /* Stack data labels and values on mobile */
| |
| .portable-infobox .pi-data { | |
| display: block;
| |
| }
| |
| | |
| .portable-infobox .pi-data-label,
| |
| .portable-infobox .pi-data-value {
| |
| display: block;
| |
| width: 100%;
| |
| padding: 6px 16px;
| |
| }
| |
| | |
| .portable-infobox .pi-data-label {
| |
| font-weight: bold; | |
| padding-bottom: 2px;
| |
| }
| |
| | |
| .portable-infobox .pi-data-value {
| |
| padding-top: 2px;
| |
| padding-bottom: 12px; | |
| }
| |
| }
| |
| | |
| /* Tablet adjustments */
| |
| @media (max-width: 1024px) and (min-width: 641px) {
| |
| .portable-infobox {
| |
| width: 300px; | |
| }
| |
| }
| |
| | |
| /* =================================================================
| |
| ACCESSIBILITY & SPECIAL FEATURES
| |
| ================================================================= */
| |
| | |
| /* High contrast mode support */
| |
| @media (prefers-contrast: high) {
| |
| .portable-infobox {
| |
| border: 2px solid var(--tg-color-base);
| |
| background-color: var(--tg-color-surface-2);
| |
| }
| |
| | |
| .portable-infobox .pi-title {
| |
| border: 2px solid currentColor;
| |
| } | | } |
| }
| |
|
| |
| /* Reduced motion support */
| |
| @media (prefers-reduced-motion: reduce) {
| |
| .portable-infobox,
| |
| .portable-infobox * {
| |
| transition: none !important;
| |
| animation: none !important;
| |
| }
| |
| }
| |
|
| |
| /* Focus indicators for accessibility */
| |
| .portable-infobox a:focus {
| |
| outline: 2px solid var(--theme-primary, #0066CC);
| |
| outline-offset: 2px;
| |
| border-radius: 2px;
| |
| }
| |
|
| |
| /* Print styles */
| |
| @media print {
| |
| .portable-infobox {
| |
| width: 100%;
| |
| float: none;
| |
| margin: 1em 0;
| |
| border: 1px solid #000;
| |
| box-shadow: none;
| |
| background-color: #fff !important;
| |
| color: #000 !important;
| |
| font-size: 12px;
| |
| page-break-inside: avoid;
| |
| }
| |
|
| |
| .portable-infobox .pi-title {
| |
| background-color: #f0f0f0 !important;
| |
| color: #000 !important;
| |
| border: 1px solid #000;
| |
| }
| |
|
| |
| .portable-infobox .pi-header {
| |
| color: #000 !important;
| |
| }
| |
|
| |
| .portable-infobox a {
| |
| color: #000 !important;
| |
| text-decoration: underline;
| |
| }
| |
| }
| |
|
| |
| /* EmbedVideo compatibility (if used) */
| |
| .portable-infobox .embedvideo {
| |
| position: relative;
| |
| width: 100% !important;
| |
| margin: 8px 0;
| |
| }
| |
|
| |
| /* Spotify embed hack adaptation */
| |
| .portable-infobox .embedvideo[data-service="spotifytrack"]::after {
| |
| content: "";
| |
| position: absolute;
| |
| inset: -4px;
| |
| border: 6px solid var(--tg-color-surface-2);
| |
| border-radius: 12px;
| |
| pointer-events: none;
| |
| } | | } |