切換選單
1
2
12
鑽石託管 | DiamondHost WIKI
切換偏好設定選單
切換個人選單
尚未登入
若您做出任何編輯,會公開您的 IP 位址。

MediaWiki:Common.css:修訂間差異

MediaWiki介面頁面
Admin留言 | 貢獻
無編輯摘要
Admin留言 | 貢獻
無編輯摘要
第1行: 第1行:
/* --- 1. 全局配置 --- */
/* 1. 網頁最底層的背景色 */
:root {
html, body {
     --brand-color: #007bff; /* 你的品牌主色 */
     background-color: #121212 !important; /* 極深灰 */
    --bg-gray: #f9f9f9;
    --border-color: #e2e8f0;
}
}


/* 移除 MediaWiki 預設的笨重外框 */
/* 2. 內容文章區域的背景色 */
#content {
#content {
     border: none !important;
     background-color: #1e1e1e !important; /* 稍淺的深灰,區隔背景 */
     background: white !important;
     color: #e0e0e0 !important; /* 文字改為淺灰白,避免刺眼 */
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
     border: 1px solid #333333 !important;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 1200px; /* 限制寬度,閱讀更舒適 */
     padding: 3em !important;
}
}


/* --- 2. 標題與字體 --- */
/* 3. 左側選單與上方標籤的文字顏色修正 */
body {
#mw-panel .portal h3, .vector-menu-portal h3 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
     color: #007bff !important; /* 品牌藍 */
     background-color: var(--bg-gray) !important;
}
}


#firstHeading {
#p-navigation li a, #p-tb li a {
    font-size: 2.5rem !important;
     color: #aaaaaa !important;
    font-weight: 800 !important;
    border: none !important;
     margin-bottom: 0.5em !important;
}
}


/* 在標題下方加一條漸層線 */
#p-navigation li a:hover {
#firstHeading::after {
     color: #ffffff !important;
     content: "";
    display: block;
    width: 60px;
    height: 5px;
    background: var(--brand-color);
    border-radius: 10px;
    margin-top: 10px;
}
}


/* --- 3. 側邊導覽列大改 --- */
/* 4. 修正標題顏色 */
#mw-panel {
h1, h2, h3, h4, h5, h6 {
    width: 12em !important;
     color: #ffffff !important;
    padding-left: 20px !important;
}
 
#mw-panel .portal h3 {
    background: none !important;
     color: #1a202c !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
}
 
/* --- 4. 自訂組件(用於首頁與教學) --- */
/* 卡片樣式 */
.mw-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.2s;
}
.mw-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}
 
/* 專業側邊資訊欄 (Infobox) */
.portable-infobox {
    float: right;
    width: 300px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-top: 5px solid var(--brand-color);
    margin-left: 20px;
    padding: 15px;
    border-radius: 4px;
}
}

2026年4月8日 (三) 19:51的版本

/* 1. 網頁最底層的背景色 */
html, body {
    background-color: #121212 !important; /* 極深灰 */
}

/* 2. 內容文章區域的背景色 */
#content {
    background-color: #1e1e1e !important; /* 稍淺的深灰,區隔背景 */
    color: #e0e0e0 !important; /* 文字改為淺灰白,避免刺眼 */
    border: 1px solid #333333 !important;
}

/* 3. 左側選單與上方標籤的文字顏色修正 */
#mw-panel .portal h3, .vector-menu-portal h3 {
    color: #007bff !important; /* 品牌藍 */
}

#p-navigation li a, #p-tb li a {
    color: #aaaaaa !important;
}

#p-navigation li a:hover {
    color: #ffffff !important;
}

/* 4. 修正標題顏色 */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}