Difference between revisions of "MediaWiki:Common.css"

From UKTAPS.CO.UK Wiki
Jump to: navigation, search
(Add mainpage card layout CSS for product categories)
 
 
(One intermediate revision by the same user not shown)
Line 51: Line 51:
 
     flex: 1 1 300px;
 
     flex: 1 1 300px;
 
     max-width: 100%;
 
     max-width: 100%;
 +
}
 +
 +
/* ==========================================================================
 +
  UKTaps Wiki 全局蓝色调视觉系统覆盖(匹配主站商城)
 +
  ========================================================================== */
 +
 +
:root {
 +
    --uktaps-blue: #0A3663;      /* 主视觉:深邃皇家卫浴蓝 */
 +
    --uktaps-light-blue: #F0F4F8; /* 辅助色:极浅蓝底色 */
 +
    --uktaps-cyan: #0076A8;      /* 互动色:链接与高亮蓝 */
 +
}
 +
 +
/* 1. 全局链接颜色改为专业蓝(避免默认的维基红/暗蓝) */
 +
a, .mw-body a.external, .mw-body a.extiw {
 +
    color: var(--uktaps-cyan) !important;
 +
}
 +
a:hover {
 +
    color: var(--uktaps-blue) !important;
 +
    text-decoration: underline !important;
 +
}
 +
 +
/* 2. 维基左侧/顶部 Vector 皮肤的头部与侧边栏标题微调 */
 +
#mw-head, #mw-panel .portal h3 {
 +
    border-bottom-color: var(--uktaps-blue) !important;
 +
    color: var(--uktaps-blue) !important;
 +
}
 +
 +
/* 3. 核心大标题 H1(页面标题)下方加粗蓝色质感线条 */
 +
.firstHeading {
 +
    border-bottom: 3px solid var(--uktaps-blue) !important;
 +
    color: var(--uktaps-blue) !important;
 +
    padding-bottom: 8px !important;
 +
}
 +
 +
/* ==========================================================================
 +
  4. 您提供的引导语专用高级蓝色调样式 (.section-header)
 +
  ========================================================================== */
 +
.section-header {
 +
    background: linear-gradient(135deg, var(--uktaps-blue) 0%, #164E87 100%);
 +
    padding: 16px 20px;
 +
    border-radius: 8px;
 +
    box-shadow: 0 4px 12px rgba(10, 54, 99, 0.1);
 +
    margin: 25px 0 15px 0;
 +
}
 +
 +
.section-header h2 {
 +
    color: #ffffff !important;
 +
    font-size: 1.35em !important;
 +
    font-weight: 600 !important;
 +
    margin: 0 !important;
 +
    padding: 0 !important;
 +
    border-bottom: none !important; /* 移除维基默认的下划线 */
 +
    display: flex;
 +
    align-items: center;
 +
    letter-spacing: 0.3px;
 +
}
 +
 +
/* 在手机/电脑端文字前自动加一个优雅的浅蓝色点缀小标 */
 +
.section-header h2::before {
 +
    content: "📘";
 +
    margin-right: 10px;
 +
    font-size: 1.1em;
 +
}
 +
 +
/* ==========================================================================
 +
  UKTaps Wiki 首页现代感高级渐变欢迎横幅 (避免行内样式被 Wiki 过滤)
 +
  ========================================================================== */
 +
.wiki-welcome-banner {
 +
    text-align: center !important;
 +
    padding: 30px 20px !important;
 +
    /* 强制写入渐变色,在 CSS 文件中写入绝对不会被过滤 */
 +
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
 +
    border-radius: 12px !important;
 +
    margin-bottom: 25px !important;
 +
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
 +
}
 +
 +
/* 强制覆盖 Wiki 原生 H1 的颜色、线条和大小 */
 +
.wiki-welcome-banner h1.welcome-title {
 +
    color: #e94560 !important;
 +
    font-size: 2.6em !important;
 +
    margin: 0 0 10px 0 !important;
 +
    padding: 0 !important;
 +
    border-bottom: none !important; /* 彻底移除维基 H1 自带的讨厌下划线 */
 +
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
 +
    font-weight: 700 !important;
 +
}
 +
 +
.wiki-welcome-banner p.welcome-subtitle {
 +
    color: #dddddd !important;
 +
    font-size: 1.2em !important;
 +
    margin: 0 !important;
 +
    padding: 0 !important;
 
}
 
}

Latest revision as of 13:46, 4 June 2026

/* Card layout for Main Page */
.mainpage-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}
.mainpage-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.mainpage-card h3 {
    margin-top: 0;
    color: #0645ad;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.mainpage-card p {
    margin: 8px 0;
    color: #333;
}
.mainpage-card a {
    color: #3366bb;
    text-decoration: none;
}
.mainpage-card a:hover {
    text-decoration: underline;
}
.section-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: #e94560;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 20px 0 10px 0;
    font-size: 1.3em;
}
.section-header h2 {
    color: #e94560;
    margin: 0;
    border: none;
}
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
}
.card-grid .mainpage-card {
    flex: 1 1 300px;
    max-width: 100%;
}

/* ==========================================================================
   UKTaps Wiki 全局蓝色调视觉系统覆盖(匹配主站商城)
   ========================================================================== */

:root {
    --uktaps-blue: #0A3663;       /* 主视觉:深邃皇家卫浴蓝 */
    --uktaps-light-blue: #F0F4F8; /* 辅助色:极浅蓝底色 */
    --uktaps-cyan: #0076A8;       /* 互动色:链接与高亮蓝 */
}

/* 1. 全局链接颜色改为专业蓝(避免默认的维基红/暗蓝) */
a, .mw-body a.external, .mw-body a.extiw {
    color: var(--uktaps-cyan) !important;
}
a:hover {
    color: var(--uktaps-blue) !important;
    text-decoration: underline !important;
}

/* 2. 维基左侧/顶部 Vector 皮肤的头部与侧边栏标题微调 */
#mw-head, #mw-panel .portal h3 {
    border-bottom-color: var(--uktaps-blue) !important;
    color: var(--uktaps-blue) !important;
}

/* 3. 核心大标题 H1(页面标题)下方加粗蓝色质感线条 */
.firstHeading {
    border-bottom: 3px solid var(--uktaps-blue) !important;
    color: var(--uktaps-blue) !important;
    padding-bottom: 8px !important;
}

/* ==========================================================================
   4. 您提供的引导语专用高级蓝色调样式 (.section-header)
   ========================================================================== */
.section-header {
    background: linear-gradient(135deg, var(--uktaps-blue) 0%, #164E87 100%);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(10, 54, 99, 0.1);
    margin: 25px 0 15px 0;
}

.section-header h2 {
    color: #ffffff !important;
    font-size: 1.35em !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: none !important; /* 移除维基默认的下划线 */
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
}

/* 在手机/电脑端文字前自动加一个优雅的浅蓝色点缀小标 */
.section-header h2::before {
    content: "📘";
    margin-right: 10px;
    font-size: 1.1em;
}

/* ==========================================================================
   UKTaps Wiki 首页现代感高级渐变欢迎横幅 (避免行内样式被 Wiki 过滤)
   ========================================================================== */
.wiki-welcome-banner {
    text-align: center !important;
    padding: 30px 20px !important;
    /* 强制写入渐变色,在 CSS 文件中写入绝对不会被过滤 */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important; 
    border-radius: 12px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 强制覆盖 Wiki 原生 H1 的颜色、线条和大小 */
.wiki-welcome-banner h1.welcome-title {
    color: #e94560 !important;
    font-size: 2.6em !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    border-bottom: none !important; /* 彻底移除维基 H1 自带的讨厌下划线 */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
    font-weight: 700 !important;
}

.wiki-welcome-banner p.welcome-subtitle {
    color: #dddddd !important;
    font-size: 1.2em !important;
    margin: 0 !important;
    padding: 0 !important;
}