Template:Main Page/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
Line 30: | Line 30: | ||
} | } | ||
/* Search - | /* Search - FIXED to maintain horizontal layout */ | ||
.cs-search { | .cs-search { | ||
max-width: 800px; | max-width: 800px; | ||
margin: 0 auto 40px; | margin: 0 auto 40px; | ||
padding: 25px; | padding: 25px; | ||
border-radius: 8px; | border-radius: 8px; | ||
box-sizing: border-box; | |||
} | |||
/* Target the MediaWiki search input and button container */ | |||
.cs-search form, | |||
.cs-search table { | |||
width: 100%; | |||
display: table; | |||
table-layout: fixed; | |||
} | } | ||
/* Search | /* Search input column */ | ||
.cs-search | .cs-search table td:first-child { | ||
width: 78%; /* Make room for the button */ | |||
padding-right: 10px; | |||
} | |||
/* Search button column */ | |||
.cs-search table td:last-child { | |||
width: 22%; | |||
vertical-align: top; | |||
} | } | ||
Line 50: | Line 64: | ||
.cs-search input[type="text"], | .cs-search input[type="text"], | ||
.cs-search .cdx-text-input__input { | .cs-search .cdx-text-input__input { | ||
height: | height: 40px !important; /* Made slightly smaller */ | ||
padding: 5px | padding: 5px 12px !important; | ||
border-radius: 4px; | border-radius: 4px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
font-size: 16px; | font-size: 16px; | ||
vertical-align: middle; | |||
width: | width: 100% !important; | ||
} | } | ||
/* Make search button | /* Make search button fit properly */ | ||
.cs-search input[type="submit"], | .cs-search input[type="submit"], | ||
.cs-search .oo-ui-buttonElement-button, | .cs-search .oo-ui-buttonElement-button, | ||
.cs-search button { | .cs-search button { | ||
height: | height: 40px !important; /* Match input height */ | ||
padding: 5px | padding: 5px 10px !important; | ||
border-radius: 4px; | border-radius: 4px; | ||
cursor: pointer; | cursor: pointer; | ||
Line 74: | Line 87: | ||
justify-content: center !important; | justify-content: center !important; | ||
text-align: center !important; | text-align: center !important; | ||
width: 100% !important; | |||
font-size: 16px; | font-size: 16px; | ||
} | } | ||
Line 810: | Line 814: | ||
} | } | ||
/* Make search | /* Make search more responsive on mobile */ | ||
.cs-search | .cs-search table td:first-child { | ||
width: 65%; | |||
} | } | ||
.cs-search | .cs-search table td:last-child { | ||
width: 35%; | |||
width: | |||
} | } | ||
Line 875: | Line 868: | ||
.cs-search { | .cs-search { | ||
padding: 10px; | padding: 10px; | ||
} | |||
.cs-search table td:first-child { | |||
width: 60%; | |||
} | |||
.cs-search table td:last-child { | |||
width: 40%; | |||
} | } | ||
Revision as of 20:50, 11 August 2025
/**
* ComputerScience.wiki - Main Page Styles
*/
/* Base container */
.cs-container {
max-width: 1200px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* Header */
.cs-header {
text-align: center;
padding: 30px 20px;
margin-bottom: 30px;
border-radius: 8px;
}
.cs-title {
font-size: 2em;
font-weight: 700;
margin: 0;
}
.cs-subtitle {
font-size: 1.1em;
font-weight: normal;
margin: 10px 0 0;
}
/* Search - FIXED to maintain horizontal layout */
.cs-search {
max-width: 800px;
margin: 0 auto 40px;
padding: 25px;
border-radius: 8px;
box-sizing: border-box;
}
/* Target the MediaWiki search input and button container */
.cs-search form,
.cs-search table {
width: 100%;
display: table;
table-layout: fixed;
}
/* Search input column */
.cs-search table td:first-child {
width: 78%; /* Make room for the button */
padding-right: 10px;
}
/* Search button column */
.cs-search table td:last-child {
width: 22%;
vertical-align: top;
}
/* Target the MediaWiki search input specifically */
.cs-search .mw-searchInput,
.cs-search input[type="search"],
.cs-search input[type="text"],
.cs-search .cdx-text-input__input {
height: 40px !important; /* Made slightly smaller */
padding: 5px 12px !important;
border-radius: 4px;
box-sizing: border-box;
font-size: 16px;
vertical-align: middle;
width: 100% !important;
}
/* Make search button fit properly */
.cs-search input[type="submit"],
.cs-search .oo-ui-buttonElement-button,
.cs-search button {
height: 40px !important; /* Match input height */
padding: 5px 10px !important;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
box-sizing: border-box;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
text-align: center !important;
width: 100% !important;
font-size: 16px;
}
/* Hide the full text button if it still appears */
.cs-search input[name="fulltext"],
.cs-search button[name="fulltext"],
.cs-search input[value="Search full text"] {
display: none !important;
}
/* Section Headers */
.cs-section {
margin-bottom: 30px;
}
.cs-section-header {
padding: 12px 15px;
margin-bottom: 20px;
border-radius: 6px;
}
.cs-section-title {
margin: 0;
font-size: 1.3em;
font-weight: 600;
}
/* Grid Layout */
.cs-grid {
display: table;
width: 100%;
border-spacing: 10px;
border-collapse: separate;
margin: 0 -10px;
}
.cs-row {
display: table-row;
}
.cs-cell {
display: table-cell;
width: 33.333%;
vertical-align: top;
}
/* Card Design */
.cs-card {
border-radius: 6px;
overflow: hidden;
height: 100%;
}
.cs-card-header {
padding: 12px 15px;
}
.cs-card-title {
margin: 0;
font-size: 1.1em;
font-weight: 600;
}
.cs-card-body {
padding: 15px;
}
.cs-card-list {
margin: 0;
padding: 0 0 0 20px;
}
.cs-card-list li {
margin-bottom: 10px;
}
/* Card footer with hover effects */
.cs-card-footer {
padding: 8px 15px;
text-align: right;
}
/* Link hover effects */
.cs-card-footer a {
text-decoration: none;
transition: all 0.2s ease-in-out;
position: relative;
padding-bottom: 2px;
}
.cs-card-footer a:hover {
opacity: 0.85;
}
.cs-card-footer a::after {
content: '';
position: absolute;
width: 0;
height: 1px;
bottom: 0;
left: 0;
background-color: currentColor;
transition: width 0.3s ease;
}
.cs-card-footer a:hover::after {
width: 100%;
}
/* Override pre tag styling that might be coming from MediaWiki */
.cs-card-footer pre {
margin: 0;
padding: 0;
background: transparent !important;
border: none !important;
white-space: normal;
font-family: inherit;
font-size: inherit;
color: inherit;
display: inline;
line-height: inherit;
}
/* Light theme colors */
@media screen {
.cs-header {
background-color: #f9f9f9;
border: 1px solid #ddd;
}
.cs-title {
color: #000;
}
.cs-subtitle {
color: #444;
}
.cs-search {
background-color: #f5f5f5;
border: 1px solid #ddd;
}
.cs-search input[type="search"],
.cs-search input[type="text"],
.cs-search .cdx-text-input__input {
background-color: #e8e8e8; /* Darker background for input */
border: 1px solid #ddd;
color: #333;
}
.cs-search input[type="submit"],
.cs-search button {
background-color: #f0f0f0;
border: 1px solid #ddd;
color: #333;
}
.cs-search input[type="submit"]:hover,
.cs-search button:hover {
background-color: #e0e0e0;
}
/* Programming section */
.cs-section:nth-child(3) .cs-section-header {
background-color: #cef2e0;
border: 1px solid #cef2e0;
}
.cs-section:nth-child(3) .cs-card {
background-color: #f5fffa;
border: 1px solid #cef2e0;
}
.cs-section:nth-child(3) .cs-card-header {
background-color: #cef2e0;
border-bottom: 1px solid #cef2e0;
}
.cs-section:nth-child(3) .cs-card-footer {
background-color: #f5fffa;
border-top: 1px solid #cef2e0;
}
.cs-section:nth-child(3) .cs-card-footer a {
color: #2e8b57;
}
/* Data Science section */
.cs-section:nth-child(4) .cs-section-header {
background-color: #cedff2;
border: 1px solid #cedff2;
}
.cs-section:nth-child(4) .cs-card {
background-color: #f5faff;
border: 1px solid #cedff2;
}
.cs-section:nth-child(4) .cs-card-header {
background-color: #cedff2;
border-bottom: 1px solid #cedff2;
}
.cs-section:nth-child(4) .cs-card-footer {
background-color: #f5faff;
border-top: 1px solid #cedff2;
}
.cs-section:nth-child(4) .cs-card-footer a {
color: #4169e1;
}
/* Databases section */
.cs-section:nth-child(5) .cs-section-header {
background-color: #f2cedd;
border: 1px solid #f2cedd;
}
.cs-section:nth-child(5) .cs-card {
background-color: #fff5fa;
border: 1px solid #f2cedd;
}
.cs-section:nth-child(5) .cs-card-header {
background-color: #f2cedd;
border-bottom: 1px solid #f2cedd;
}
.cs-section:nth-child(5) .cs-card-footer {
background-color: #fff5fa;
border-top: 1px solid #f2cedd;
}
.cs-section:nth-child(5) .cs-card-footer a {
color: #db7093;
}
/* Infrastructure section */
.cs-section:nth-child(6) .cs-section-header {
background-color: #ddcef2;
border: 1px solid #ddcef2;
}
.cs-section:nth-child(6) .cs-card {
background-color: #faf5ff;
border: 1px solid #ddcef2;
}
.cs-section:nth-child(6) .cs-card-header {
background-color: #ddcef2;
border-bottom: 1px solid #ddcef2;
}
.cs-section:nth-child(6) .cs-card-footer {
background-color: #faf5ff;
border-top: 1px solid #ddcef2;
}
.cs-section:nth-child(6) .cs-card-footer a {
color: #8a2be2;
}
/* CS Fundamentals section */
.cs-section:nth-child(7) .cs-section-header {
background-color: #f2e0ce;
border: 1px solid #f2e0ce;
}
.cs-section:nth-child(7) .cs-card {
background-color: #fffaf5;
border: 1px solid #f2e0ce;
}
.cs-section:nth-child(7) .cs-card-header {
background-color: #f2e0ce;
border-bottom: 1px solid #f2e0ce;
}
.cs-section:nth-child(7) .cs-card-footer {
background-color: #fffaf5;
border-top: 1px solid #f2e0ce;
}
.cs-section:nth-child(7) .cs-card-footer a {
color: #d2691e;
}
/* Community section */
.cs-section:nth-child(8) .cs-section-header {
background-color: #eee;
border: 1px solid #eee;
}
.cs-section:nth-child(8) .cs-card {
background-color: #f9f9f9;
border: 1px solid #eee;
}
.cs-section:nth-child(8) .cs-card-header {
background-color: #eee;
border-bottom: 1px solid #eee;
}
.cs-section:nth-child(8) .cs-card-footer {
background-color: #f9f9f9;
border-top: 1px solid #eee;
}
.cs-section:nth-child(8) .cs-card-footer a {
color: #444;
}
}
/* Night mode */
html.skin-theme-clientpref-night .cs-header {
background-color: #171a1d;
border-color: #676767;
}
html.skin-theme-clientpref-night .cs-title {
color: #fff;
}
html.skin-theme-clientpref-night .cs-subtitle {
color: #ccc;
}
/* Dark mode search */
html.skin-theme-clientpref-night .cs-search {
background-color: #252525;
border-color: #676767;
}
html.skin-theme-clientpref-night .cs-search input[type="search"],
html.skin-theme-clientpref-night .cs-search input[type="text"],
html.skin-theme-clientpref-night .cs-search .cdx-text-input__input {
background-color: #1f1f1f; /* Darker input in dark mode */
color: #fff;
border-color: #555;
}
html.skin-theme-clientpref-night .cs-search input[type="submit"],
html.skin-theme-clientpref-night .cs-search button {
background-color: #444;
border-color: #555;
color: #fff;
}
html.skin-theme-clientpref-night .cs-search input[type="submit"]:hover,
html.skin-theme-clientpref-night .cs-search button:hover {
background-color: #555;
}
/* Programming section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-section-header {
background-color: #104437;
border-color: #104437;
}
html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card {
background-color: #0b1e1c;
border-color: #104437;
}
html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-header {
background-color: #104437;
border-color: #104437;
}
html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-footer {
background-color: #0b1e1c;
border-color: #104437;
}
html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-footer a {
color: #8fbc8f;
}
/* Data Science section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-section-header {
background-color: #082849;
border-color: #082849;
}
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card {
background-color: #0d1a27;
border-color: #082849;
}
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-header {
background-color: #082849;
border-color: #082849;
}
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-footer {
background-color: #0d1a27;
border-color: #082849;
}
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-footer a {
color: #87cefa;
}
/* Databases section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-section-header {
background-color: #882c43;
border-color: #882c43;
}
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card {
background-color: #270e1a;
border-color: #882c43;
}
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-header {
background-color: #882c43;
border-color: #882c43;
}
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-footer {
background-color: #270e1a;
border-color: #882c43;
}
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-footer a {
color: #ffb6c1;
}
/* Infrastructure section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-section-header {
background-color: #7545ab;
border-color: #7545ab;
}
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card {
background-color: #130e20;
border-color: #7545ab;
}
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-header {
background-color: #7545ab;
border-color: #7545ab;
}
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-footer {
background-color: #130e20;
border-color: #7545ab;
}
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-footer a {
color: #da70d6;
}
/* CS Fundamentals section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-section-header {
background-color: #663428;
border-color: #663428;
}
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card {
background-color: #331a00;
border-color: #663428;
}
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-header {
background-color: #663428;
border-color: #663428;
}
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-footer {
background-color: #331a00;
border-color: #663428;
}
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-footer a {
color: #ffa500;
}
/* Community section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-section-header {
background-color: #3d3d3d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card {
background-color: #171a1d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-header {
background-color: #3d3d3d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-footer {
background-color: #171a1d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-footer a {
color: #ccc;
}
/* OS night mode */
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .cs-header {
background-color: #171a1d;
border-color: #676767;
}
html.skin-theme-clientpref-os .cs-title {
color: #fff;
}
html.skin-theme-clientpref-os .cs-subtitle {
color: #ccc;
}
/* OS dark mode search */
html.skin-theme-clientpref-os .cs-search {
background-color: #252525;
border-color: #676767;
}
html.skin-theme-clientpref-os .cs-search input[type="search"],
html.skin-theme-clientpref-os .cs-search input[type="text"],
html.skin-theme-clientpref-os .cs-search .cdx-text-input__input {
background-color: #1f1f1f; /* Darker input in dark mode */
color: #fff;
border-color: #555;
}
html.skin-theme-clientpref-os .cs-search input[type="submit"],
html.skin-theme-clientpref-os .cs-search button {
background-color: #444;
border-color: #555;
color: #fff;
}
html.skin-theme-clientpref-os .cs-search input[type="submit"]:hover,
html.skin-theme-clientpref-os .cs-search button:hover {
background-color: #555;
}
/* Programming section - OS dark */
html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-section-header {
background-color: #104437;
border-color: #104437;
}
html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card {
background-color: #0b1e1c;
border-color: #104437;
}
html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-header {
background-color: #104437;
border-color: #104437;
}
html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-footer {
background-color: #0b1e1c;
border-color: #104437;
}
html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-footer a {
color: #8fbc8f;
}
/* Data Science section - OS dark */
html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-section-header {
background-color: #082849;
border-color: #082849;
}
html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card {
background-color: #0d1a27;
border-color: #082849;
}
html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card-header {
background-color: #082849;
border-color: #082849;
}
html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card-footer {
background-color: #0d1a27;
border-color: #082849;
}
html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card-footer a {
color: #87cefa;
}
/* Databases section - OS dark */
html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-section-header {
background-color: #882c43;
border-color: #882c43;
}
html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card {
background-color: #270e1a;
border-color: #882c43;
}
html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card-header {
background-color: #882c43;
border-color: #882c43;
}
html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card-footer {
background-color: #270e1a;
border-color: #882c43;
}
html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card-footer a {
color: #ffb6c1;
}
/* Infrastructure section - OS dark */
html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-section-header {
background-color: #7545ab;
border-color: #7545ab;
}
html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card {
background-color: #130e20;
border-color: #7545ab;
}
html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card-header {
background-color: #7545ab;
border-color: #7545ab;
}
html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card-footer {
background-color: #130e20;
border-color: #7545ab;
}
html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card-footer a {
color: #da70d6;
}
/* CS Fundamentals section - OS dark */
html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-section-header {
background-color: #663428;
border-color: #663428;
}
html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card {
background-color: #331a00;
border-color: #663428;
}
html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-header {
background-color: #663428;
border-color: #663428;
}
html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-footer {
background-color: #331a00;
border-color: #663428;
}
html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-footer a {
color: #ffa500;
}
/* Community section - OS dark */
html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-section-header {
background-color: #3d3d3d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card {
background-color: #171a1d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-header {
background-color: #3d3d3d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer {
background-color: #171a1d;
border-color: #3d3d3d;
}
html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer a {
color: #ccc;
}
}
/* Typography */
html.skin-theme-clientpref-night .cs-section-title,
html.skin-theme-clientpref-night .cs-card-title,
html.skin-theme-clientpref-os .cs-section-title,
html.skin-theme-clientpref-os .cs-card-title {
color: #fff;
}
html.skin-theme-clientpref-night .cs-card-list li,
html.skin-theme-clientpref-os .cs-card-list li {
color: #ccc;
}
/* Responsive layout - IMPROVED for mobile */
@media (max-width: 875px) {
.cs-title {
font-size: 1.8em;
}
.cs-subtitle {
font-size: 1em;
}
.cs-search {
padding: 15px;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
/* Make search more responsive on mobile */
.cs-search table td:first-child {
width: 65%;
}
.cs-search table td:last-child {
width: 35%;
}
/* Fixed grid on mobile */
.cs-grid {
display: block;
width: 100%;
margin: 0;
padding: 0 10px;
box-sizing: border-box;
}
.cs-row {
display: block;
}
.cs-cell {
display: block;
width: 100%;
margin-bottom: 15px;
padding: 0;
}
/* Make cards full width on mobile */
.cs-card {
width: 100%;
margin: 0 0 15px 0;
}
.cs-card-footer a::after {
bottom: -2px;
}
/* Make section titles stand out on mobile */
.cs-section-header {
padding: 10px;
text-align: center;
}
.cs-section-title {
font-size: 1.2em;
}
}
/* Extra small screens */
@media (max-width: 480px) {
.cs-search {
padding: 10px;
}
.cs-search table td:first-child {
width: 60%;
}
.cs-search table td:last-child {
width: 40%;
}
.cs-card-header {
padding: 10px;
}
.cs-card-body {
padding: 10px;
}
.cs-title {
font-size: 1.6em;
}
}