Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Main Page/styles.css: Difference between revisions

Template page
No edit summary
No edit summary
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
/**
/**
  * ComputerScience.wiki Main Page Styles
  * ComputerScience.wiki - Main Page Styles
  * Using direct styling approach from GitHub MediaWiki-Common.css
  * With fixed button width and single button
  */
  */


/* Main Page Components */
/* Base container */
.mp-box {
.cs-container {
  background: #f8f9fa;
    max-width: 1200px;
  border: 1px solid #a2a9b1;
    margin: 0 auto;
  margin: 0 0 1em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 1em;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
}


.skin-citizen-dark .mp-box {
/* Header */
  background: #1f2937;
.cs-header {
  border-color: #374151;
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}
}


/* Section headers */
.cs-title {
.mp-h2 {
    font-size: 2em;
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
    font-weight: 700;
  padding: 0.5em;
    margin: 0;
  margin: 0.5em 0 0.5em;
    color: #000;
  border-bottom: 1px solid #a2a9b1;
  color: #2e51a3;
  font-size: 1.5em;
  font-weight: normal;
}
}


.skin-citizen-dark .mp-h2 {
.cs-subtitle {
  color: #8ab4f8;
    font-size: 1.1em;
  border-color: #374151;
    font-weight: normal;
    margin: 10px 0 0;
    color: #444;
}
}


.mp-h2 span {
/* Search */
  padding-right: 0.5em;
.cs-search {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 25px;
    border-radius: 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}
}


.mp-contains-float {
/* Search input - restore original background */
  overflow: auto;
.cs-search input[type="search"],
.cs-search input[type="text"],
.cs-search .mw-searchInput,
.cs-search .cdx-text-input__input {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    height: 40px !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    color: #333 !important;
    width: 100% !important;
}
}


/* Main page layout */
/* Search button */
.MainPageBG {
.cs-search input[name="go"],
  background: #ffffff;
.cs-search button[name="go"],
  border: 1px solid #a2a9b1;
.cs-search input[type="submit"],
  padding: 1em;
.cs-search button[type="submit"],
  border-radius: 4px;
.cs-search .oo-ui-buttonElement-button {
    width: 80px !important;
    max-width: 80px !important;
    min-width: 80px !important;
    background-color: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    height: 40px !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    color: #333 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}
}


.skin-citizen-dark .MainPageBG {
/* Hide the second (fulltext) button */
  background: #111827;
.cs-search input[name="fulltext"],
  border-color: #374151;
.cs-search button[name="fulltext"],
.cs-search input[value="Search full text"],
.cs-search button[value="Search full text"] {
    display: none !important;
}
}


#mp-upper,
/* Grid Layout */
#mp-middle,
.cs-grid {
#mp-lower {
    display: table;
  overflow: auto;
    width: 100%;
  margin-bottom: 1.4em;
    border-spacing: 10px;
    border-collapse: separate;
    margin: 0 -10px;
}
}


#mp-upper {
.cs-row {
  display: flex;
    display: table-row;
  flex-wrap: wrap;
  gap: 20px;
}
}


#mp-left,
.cs-cell {
#mp-right {
    display: table-cell;
  flex: 1;
    width: 33.333%;
  min-width: 300px;
    vertical-align: top;
}
}


/* Top Banner */
/* Section styling */
#mp-topbanner {
.cs-section {
  background: linear-gradient(135deg, #2e51a3, #4c6fc6);
    margin-bottom: 30px;
  color: #ffffff;
  padding: 32px 24px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  border: none;
}
}


.skin-citizen-dark #mp-topbanner {
.cs-section-header {
  background: linear-gradient(135deg, #375694, #2c4273);
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}
}


#mp-welcome h1 {
.cs-section-title {
  font-size: 2.3rem;
    margin: 0;
  margin: 0 0 8px;
    font-size: 1.3em;
  font-weight: 700;
    font-weight: 600;
}
}


#mp-free {
/* Card Design */
  font-size: 1.2rem;
.cs-card {
  opacity: 0.9;
    border-radius: 6px;
  max-width: 600px;
    overflow: hidden;
  margin: 0 auto;
    height: 100%;
}
}


/* Search Box */
.cs-card-header {
.mp-search-container {
    padding: 12px 15px;
  max-width: 650px;
  margin: -24px auto 32px;
  position: relative;
  z-index: 5;
}
}


.mp-search-box {
.cs-card-title {
  background-color: #ffffff;
    margin: 0;
  border: 1px solid #dfe1e5;
    font-size: 1.1em;
  border-radius: 8px;
    font-weight: 600;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
}


.skin-citizen-dark .mp-search-box {
.cs-card-body {
  background-color: #111827;
    padding: 15px;
  border-color: #374151;
}
}


/* Section Headings */
.cs-card-list {
.mp-section-heading {
    margin: 0;
  font-size: 1.6rem;
    padding: 0 0 0 20px;
  font-weight: 700;
  margin: 32px 0 24px;
  text-align: center;
  color: #2e51a3;
  position: relative;
}
}


.skin-citizen-dark .mp-section-heading {
.cs-card-list li {
  color: #8ab4f8;
    margin-bottom: 10px;
}
}


.mp-section-heading:after {
/* Card footer with hover effects */
  content: "";
.cs-card-footer {
  display: block;
    padding: 8px 15px;
  width: 60px;
    text-align: right;
  height: 3px;
  background: #4c6fc6;
  margin: 10px auto 0;
  border-radius: 1px;
}
}


.skin-citizen-dark .mp-section-heading:after {
/* Link hover effects */
  background: #8ab4f8;
.cs-card-footer a {
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.2s ease-in-out;
}
}


/* Category Layout */
.cs-card-footer a:hover {
#mp-categories-container {
    opacity: 0.85;
  margin: 32px 0;
}
}


.mp-category-row {
.cs-card-footer a::after {
  display: flex;
    content: '';
  flex-wrap: wrap;
    position: absolute;
  margin: 0 -10px 20px;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}
}


/* Category Cards */
.cs-card-footer a:hover::after {
.mp-category-card {
    width: 100%;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  padding: 20px;
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  border: 1px solid #eaecef;
  margin: 0 10px 20px;
  transition: box-shadow 0.2s;
}
}


.skin-citizen-dark .mp-category-card {
/* Section color schemes */
  background-color: #111827;
/* Programming */
  border-color: #374151;
.cs-section:nth-child(3) .cs-section-header {
    background-color: #cef2e0;
    border: 1px solid #cef2e0;
}
}


.mp-category-card:hover {
.cs-section:nth-child(3) .cs-card {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    background-color: #f5fffa;
    border: 1px solid #cef2e0;
}
}


/* Category Header with Icon and Title on same line */
.cs-section:nth-child(3) .cs-card-header {
.mp-category-header {
    background-color: #cef2e0;
  display: flex;
    border-bottom: 1px solid #cef2e0;
  align-items: center;
  margin-bottom: 16px;
}
}


.mp-category-icon {
.cs-section:nth-child(3) .cs-card-footer {
  font-size: 24px;
    background-color: #f5fffa;
  margin-right: 12px;
    border-top: 1px solid #cef2e0;
}
}


.mp-category-title {
.cs-section:nth-child(3) .cs-card-footer a {
  font-size: 1.25rem;
    color: #2e8b57;
  font-weight: 600;
  margin: 0;
  color: #2e51a3;
}
}


.skin-citizen-dark .mp-category-title {
/* Data Science */
  color: #8ab4f8;
.cs-section:nth-child(4) .cs-section-header {
    background-color: #cedff2;
    border: 1px solid #cedff2;
}
}


.mp-category-list {
.cs-section:nth-child(4) .cs-card {
  list-style: none;
    background-color: #f5faff;
  padding: 0;
    border: 1px solid #cedff2;
  margin: 0;
}
}


.mp-category-list li {
.cs-section:nth-child(4) .cs-card-header {
  padding: 8px 0;
    background-color: #cedff2;
  border-bottom: 1px solid #eaecef;
    border-bottom: 1px solid #cedff2;
}
}


.skin-citizen-dark .mp-category-list li {
.cs-section:nth-child(4) .cs-card-footer {
  border-bottom: 1px solid #374151;
    background-color: #f5faff;
    border-top: 1px solid #cedff2;
}
}


.mp-category-list li:last-child {
.cs-section:nth-child(4) .cs-card-footer a {
  border-bottom: none;
    color: #4169e1;
  margin-top: 10px;
  font-weight: 500;
  color: #2e51a3;
}
}


.skin-citizen-dark .mp-category-list li:last-child {
/* Databases */
  color: #8ab4f8;
.cs-section:nth-child(5) .cs-section-header {
    background-color: #f2cedd;
    border: 1px solid #f2cedd;
}
}


/* Feature & Trending Grids */
.cs-section:nth-child(5) .cs-card {
.mp-featured-grid,
    background-color: #fff5fa;
.mp-trending-grid,
    border: 1px solid #f2cedd;
.mp-paths-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
  padding: 20px 0;
}
}


.mp-featured-grid > *,
.cs-section:nth-child(5) .cs-card-header {
.mp-trending-grid > *,
    background-color: #f2cedd;
.mp-paths-grid > * {
    border-bottom: 1px solid #f2cedd;
  flex: 1 1 300px;
  margin: 0 12px 24px;
  min-width: 250px;
}
}


/* Community Section */
.cs-section:nth-child(5) .cs-card-footer {
.mp-community-flex {
    background-color: #fff5fa;
  display: flex;
    border-top: 1px solid #f2cedd;
  flex-wrap: wrap;
  margin: 0 -12px;
}
}


.mp-community-card {
.cs-section:nth-child(5) .cs-card-footer a {
  flex: 1 1 300px;
    color: #db7093;
  min-width: 250px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  border: 1px solid #eaecef;
  margin: 0 12px 24px;
}
}


.skin-citizen-dark .mp-community-card {
/* Infrastructure */
  background-color: #111827;
.cs-section:nth-child(6) .cs-section-header {
  border-color: #374151;
    background-color: #ddcef2;
    border: 1px solid #ddcef2;
}
}


.mp-community-card h3 {
.cs-section:nth-child(6) .cs-card {
  font-size: 1.1rem;
    background-color: #faf5ff;
  margin-top: 0;
    border: 1px solid #ddcef2;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eaecef;
  color: #2e51a3;
}
}


.skin-citizen-dark .mp-community-card h3 {
.cs-section:nth-child(6) .cs-card-header {
  border-bottom: 1px solid #374151;
    background-color: #ddcef2;
  color: #8ab4f8;
    border-bottom: 1px solid #ddcef2;
}
}


.mp-community-card ul {
.cs-section:nth-child(6) .cs-card-footer {
  padding-left: 20px;
    background-color: #faf5ff;
  margin: 0;
    border-top: 1px solid #ddcef2;
}
}


.mp-community-card li {
.cs-section:nth-child(6) .cs-card-footer a {
  margin-bottom: 8px;
    color: #8a2be2;
}
}


/* Statistics Section */
/* CS Fundamentals */
.mp-statistics-container {
.cs-section:nth-child(7) .cs-section-header {
  display: flex;
    background-color: #f2e0ce;
  flex-wrap: wrap;
    border: 1px solid #f2e0ce;
  margin: 0 -12px;
}
}


.mp-stat-card {
.cs-section:nth-child(7) .cs-card {
  background-color: #ffffff;
    background-color: #fffaf5;
  border-radius: 8px;
    border: 1px solid #f2e0ce;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  padding: 20px;
  min-width: 140px;
  text-align: center;
  border: 1px solid #eaecef;
  flex: 1 1 140px;
  margin: 0 12px 24px;
}
}


.skin-citizen-dark .mp-stat-card {
.cs-section:nth-child(7) .cs-card-header {
  background-color: #111827;
    background-color: #f2e0ce;
  border-color: #374151;
    border-bottom: 1px solid #f2e0ce;
}
}


.mp-stat-number {
.cs-section:nth-child(7) .cs-card-footer {
  font-size: 1.8rem;
    background-color: #fffaf5;
  font-weight: 700;
    border-top: 1px solid #f2e0ce;
  color: #2e51a3;
  margin-bottom: 8px;
}
}


.skin-citizen-dark .mp-stat-number {
.cs-section:nth-child(7) .cs-card-footer a {
  color: #8ab4f8;
    color: #d2691e;
}
}


.mp-stat-label {
/* Community */
  font-size: 0.95rem;
.cs-section:nth-child(8) .cs-section-header {
  color: #586069;
    background-color: #eee;
    border: 1px solid #eee;
}
}


.skin-citizen-dark .mp-stat-label {
.cs-section:nth-child(8) .cs-card {
  color: #9ca3af;
    background-color: #f9f9f9;
    border: 1px solid #eee;
}
}


/* Responsive Adjustments */
.cs-section:nth-child(8) .cs-card-header {
@media (max-width: 768px) {
    background-color: #eee;
  #mp-upper {
    border-bottom: 1px solid #eee;
     display: block;
}
  }
 
 
.cs-section:nth-child(8) .cs-card-footer {
  .mp-category-card {
    background-color: #f9f9f9;
    flex: 0 0 100%;
    border-top: 1px solid #eee;
     max-width: 100%;
}
  }
 
 
.cs-section:nth-child(8) .cs-card-footer a {
  #mp-welcome h1 {
    color: #444;
     font-size: 1.8rem;
}
  }
 
 
/* Dark mode theme toggle */
  .mp-section-heading {
@media screen {
     font-size: 1.4rem;
    /* Dark mode styles */
  }
    html.skin-theme-clientpref-night .cs-header,
    html.skin-theme-clientpref-os .cs-header {
        background-color: #171a1d;
        border-color: #676767;
    }
 
    html.skin-theme-clientpref-night .cs-title,
    html.skin-theme-clientpref-os .cs-title {
        color: #fff;
    }
 
    html.skin-theme-clientpref-night .cs-subtitle,
    html.skin-theme-clientpref-os .cs-subtitle {
        color: #ccc;
    }
 
    html.skin-theme-clientpref-night .cs-search,
    html.skin-theme-clientpref-os .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 .mw-searchInput,
    html.skin-theme-clientpref-night .cs-search .cdx-text-input__input,
    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 .mw-searchInput,
    html.skin-theme-clientpref-os .cs-search .cdx-text-input__input {
        background-color: #1f1f1f !important;
        color: #fff !important;
        border-color: #555 !important;
    }
 
    html.skin-theme-clientpref-night .cs-search input[type="submit"],
    html.skin-theme-clientpref-night .cs-search button[type="submit"],
    html.skin-theme-clientpref-os .cs-search input[type="submit"],
    html.skin-theme-clientpref-os .cs-search button[type="submit"] {
        background-color: #444 !important;
        border-color: #555 !important;
        color: #fff !important;
    }
 
    html.skin-theme-clientpref-night .cs-search input[type="submit"]:hover,
    html.skin-theme-clientpref-night .cs-search button[type="submit"]:hover,
    html.skin-theme-clientpref-os .cs-search input[type="submit"]:hover,
    html.skin-theme-clientpref-os .cs-search button[type="submit"]:hover {
        background-color: #555 !important;
    }
 
    /* Dark text colors */
    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;
    }
}
 
/* Dark mode section colors - condensed */
@media screen {
    /* Programming section - dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-section-header,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer a {
        color: #ccc;
    }
}
 
/* OS dark mode detection through prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    /* Dark mode handled through class combinations above */
}
 
/* Responsive layout */
@media (max-width: 875px) {
    .cs-title {
        font-size: 1.8em;
    }
   
    .cs-subtitle {
        font-size: 1em;
    }
   
    .cs-search {
        padding: 15px;
     }
   
    /* Convert grid table to blocks 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;
     }
   
    .cs-card {
        width: 100%;
        margin: 0 0 15px 0;
    }
   
    .cs-section-header {
        text-align: center;
        padding: 10px;
     }
   
    .cs-section-title {
        font-size: 1.2em;
    }
}
 
/* Extra small screens */
@media (max-width: 480px) {
    .cs-search {
        padding: 10px;
    }
   
    .cs-card-header,
    .cs-card-body {
        padding: 10px;
    }
   
     .cs-title {
        font-size: 1.6em;
    }
}
}

Latest revision as of 15:51, 12 August 2025

/**
 * ComputerScience.wiki - Main Page Styles
 * With fixed button width and single button
 */

/* 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;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

.cs-title {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
    color: #000;
}

.cs-subtitle {
    font-size: 1.1em;
    font-weight: normal;
    margin: 10px 0 0;
    color: #444;
}

/* Search */
.cs-search {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 25px;
    border-radius: 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

/* Search input - restore original background */
.cs-search input[type="search"],
.cs-search input[type="text"],
.cs-search .mw-searchInput,
.cs-search .cdx-text-input__input {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    height: 40px !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    color: #333 !important;
    width: 100% !important;
}

/* Search button */
.cs-search input[name="go"],
.cs-search button[name="go"],
.cs-search input[type="submit"],
.cs-search button[type="submit"],
.cs-search .oo-ui-buttonElement-button {
    width: 80px !important;
    max-width: 80px !important;
    min-width: 80px !important;
    background-color: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    height: 40px !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    color: #333 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

/* Hide the second (fulltext) button */
.cs-search input[name="fulltext"],
.cs-search button[name="fulltext"],
.cs-search input[value="Search full text"],
.cs-search button[value="Search full text"] {
    display: none !important;
}

/* 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;
}

/* Section styling */
.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;
}

/* 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;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.2s ease-in-out;
}

.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%;
}

/* Section color schemes */
/* Programming */
.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 */
.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 */
.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 */
.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 */
.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 */
.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;
}

/* Dark mode theme toggle */
@media screen {
    /* Dark mode styles */
    html.skin-theme-clientpref-night .cs-header,
    html.skin-theme-clientpref-os .cs-header {
        background-color: #171a1d;
        border-color: #676767;
    }

    html.skin-theme-clientpref-night .cs-title,
    html.skin-theme-clientpref-os .cs-title {
        color: #fff;
    }

    html.skin-theme-clientpref-night .cs-subtitle,
    html.skin-theme-clientpref-os .cs-subtitle {
        color: #ccc;
    }

    html.skin-theme-clientpref-night .cs-search,
    html.skin-theme-clientpref-os .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 .mw-searchInput,
    html.skin-theme-clientpref-night .cs-search .cdx-text-input__input,
    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 .mw-searchInput,
    html.skin-theme-clientpref-os .cs-search .cdx-text-input__input {
        background-color: #1f1f1f !important;
        color: #fff !important;
        border-color: #555 !important;
    }

    html.skin-theme-clientpref-night .cs-search input[type="submit"],
    html.skin-theme-clientpref-night .cs-search button[type="submit"],
    html.skin-theme-clientpref-os .cs-search input[type="submit"],
    html.skin-theme-clientpref-os .cs-search button[type="submit"] {
        background-color: #444 !important;
        border-color: #555 !important;
        color: #fff !important;
    }

    html.skin-theme-clientpref-night .cs-search input[type="submit"]:hover,
    html.skin-theme-clientpref-night .cs-search button[type="submit"]:hover,
    html.skin-theme-clientpref-os .cs-search input[type="submit"]:hover,
    html.skin-theme-clientpref-os .cs-search button[type="submit"]:hover {
        background-color: #555 !important;
    }

    /* Dark text colors */
    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;
    }
}

/* Dark mode section colors - condensed */
@media screen {
    /* Programming section - dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-section-header,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer a {
        color: #ccc;
    }
}

/* OS dark mode detection through prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    /* Dark mode handled through class combinations above */
}

/* Responsive layout */
@media (max-width: 875px) {
    .cs-title {
        font-size: 1.8em;
    }
    
    .cs-subtitle {
        font-size: 1em;
    }
    
    .cs-search {
        padding: 15px;
    }
    
    /* Convert grid table to blocks 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;
    }
    
    .cs-card {
        width: 100%;
        margin: 0 0 15px 0;
    }
    
    .cs-section-header {
        text-align: center;
        padding: 10px;
    }
    
    .cs-section-title {
        font-size: 1.2em;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .cs-search {
        padding: 10px;
    }
    
    .cs-card-header, 
    .cs-card-body {
        padding: 10px;
    }
    
    .cs-title {
        font-size: 1.6em;
    }
}