MediaWiki:Common.css:修订间差异

MediaWiki界面页面
无编辑摘要
无编辑摘要
第1行: 第1行:
/* 这里放置的CSS将应用于所有皮肤 */
/* =====================================================
  星海市 Wiki — 全局样式
  -----------------------------------------------------
  目录
  1. 首页标题与标签隐藏
  2. 首页头图
  3. 通用裁切图片框
  4. 图标容器
  5. 按钮
  6. 顶部工具栏(方案 3)
  7. 线路表格(其他页面共用)
  ===================================================== */


.wikitable-routes tr th, .wikitable-routes tr td {
 
    font-size: 1rem !important;
/* =====================================================
    padding: 5px 10px 5px 0 !important;
  1. 首页标题与标签隐藏
}
  ===================================================== */
.wikitable-routes tr td:first-child {
 
    border-right: 10px solid white;
/* 隐藏页面标签栏:页面 / 讨论 / 编辑 / 历史 等 */
}
.wikitable-routes tr td:only-child {
    background-color: #f5f5f5 !important;
}
.wikitable-routes tr th {
    background-color: #eee !important;
}
.page-首页 #p-namespaces,
.page-首页 #p-namespaces,
.page-首页 #p-associated-pages,
.page-首页 #p-associated-pages,
第20行: 第24行:
     display: none !important;
     display: none !important;
}
}
/* 隐藏站点副标题(Tagline) */
.page-首页 #siteSub,
.page-首页 #siteSub,
.page-首页 .siteSub {
.page-首页 .siteSub {
     display: none !important;
     display: none !important;
}
}
/* 隐藏页面标题(“首页”两个字) */
.page-首页 #firstHeading,
.page-首页 #firstHeading,
.page-首页 .firstHeading {
.page-首页 .firstHeading {
     display: none !important;
     display: none !important;
}
}
/* 首页长条头图 */
 
 
/* =====================================================
  2. 首页头图
  ===================================================== */
 
.xh-banner {
.xh-banner {
     position: relative;
     position: relative;
     height: 260px;                         /* 想改头图高度就改这一行 */
     height: 260px;                 /* 想改头图高度就改这一行 */
     border-radius: 6px;
     border-radius: 6px;
     overflow: hidden;
     overflow: hidden;
第42行: 第55行:
}
}


/* 头图上的叠加文字(可选) */
/* 头图上的叠加文字(可选,未使用时保留备用) */
.xh-banner-text {
.xh-banner-text {
     position: absolute;
     position: absolute;
第69行: 第82行:
     margin-top: 0.45rem;
     margin-top: 0.45rem;
}
}
/* 通用裁切图片框 —— 任意尺寸图片都塞满并裁切 */
 
.xh-cover {
 
/* =====================================================
  3. 通用裁切图片框
  用途:任意尺寸图片塞进去都自动裁切填满
  ===================================================== */
 
.xh-cover-bg {
     overflow: hidden;
     overflow: hidden;
     border-radius: 4px;
     border-radius: 4px;
     background: #f3f4f6;
     background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
     line-height: 0;
     line-height: 0;
}
.xh-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
}


/* 尺寸变体 —— 按需选用 */
/* 比例变体 —— 按需附加到 .xh-cover-bg 上 */
.xh-cover-169 { aspect-ratio: 16 / 9; }  /* 宽幅 */
.xh-cover-169 { aspect-ratio: 16 / 9; }  /* 宽幅 */
.xh-cover-32  { aspect-ratio: 3 / 2; }    /* 稍宽 */
.xh-cover-32  { aspect-ratio: 3 / 2; }    /* 稍宽 */
第89行: 第105行:
.xh-cover-11  { aspect-ratio: 1 / 1; }    /* 正方 */
.xh-cover-11  { aspect-ratio: 1 / 1; }    /* 正方 */


/* 具体背景图 —— 服务器特色 */
.xh-cover-rp      { background-image: url('https://www.xhcity.top/w/images/xhcity/1/1d/Rp_web.png'); }
.xh-cover-terra  { background-image: url('https://www.xhcity.top/w/images/xhcity/4/43/Terra_mod.png'); }
/* 具体背景图 —— 风景画廊 */
.xh-cover-g1      { background-image: url('https://www.xhcity.top/w/images/xhcity/0/06/G1.png'); }
.xh-cover-g2      { background-image: url('https://www.xhcity.top/w/images/xhcity/8/85/G2.png'); }
.xh-cover-g3      { background-image: url('https://www.xhcity.top/w/images/xhcity/4/45/G3.png'); }
.xh-cover-g4      { background-image: url('https://www.xhcity.top/w/images/xhcity/3/30/G4.png'); }
/* 具体背景图 —— 交通资讯 */
.xh-cover-transit { background-image: url('https://www.xhcity.top/w/images/xhcity/9/96/Transit_pic.png'); }
/* =====================================================
  4. 图标容器(政策 / 建设 / 在线工具 共用)
  56×56,居中,透明底,SVG 不变形
  ===================================================== */


.xh-icon {
    line-height: 0;
    margin-bottom: 0.45rem;
}
.xh-icon img {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto;
}
/* 政策图标容器:用背景图承载外链 SVG */
.xh-icon {
.xh-icon {
     display: block;
     display: block;
第112行: 第134行:
     line-height: 0;
     line-height: 0;
}
}
/* --- 政策图标 --- */
.xh-icon-player  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_player.svg'); }
.xh-icon-player  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_player.svg'); }
.xh-icon-rules    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_rules.svg'); }
.xh-icon-rules    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_rules.svg'); }
第119行: 第143行:
.xh-icon-station  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_station.svg'); }
.xh-icon-station  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_station.svg'); }
.xh-icon-lines    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_lines.svg'); }
.xh-icon-lines    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_lines.svg'); }
/* 随机页面按钮 */
 
/* --- 建设资讯图标 --- */
.xh-icon-construction { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_construction.svg'); }
.xh-icon-bids        { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_bids.svg'); }
.xh-icon-div          { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_div.svg'); }
 
/* --- 在线工具图标 --- */
.xh-icon-dmap    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_dmap.svg'); }
.xh-icon-sysmap  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_sysmap.svg'); }
.xh-icon-custom  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_custom.svg'); }
.xh-icon-verify  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_verify.svg'); }
.xh-icon-reset  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_reset.svg'); }
 
 
/* =====================================================
  5. 按钮(随机页面 / 入服指南)
  底部有厚度的“拟物按钮”
  ===================================================== */
 
.xh-random-btn {
.xh-random-btn {
     display: inline-block;
     display: inline-block;
第130行: 第172行:
     text-decoration: none !important;
     text-decoration: none !important;
     white-space: nowrap;
     white-space: nowrap;
     box-shadow: 0 2px 0 #0e8a80, 0 3px 8px rgba(23,179,168,0.28);
     box-shadow: 0 2px 0 #0e8a80, 0 3px 8px rgba(23, 179, 168, 0.28);
     transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
     transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
     cursor: pointer;
     cursor: pointer;
第136行: 第178行:
.xh-random-btn:hover {
.xh-random-btn:hover {
     background: #15a89e;
     background: #15a89e;
     box-shadow: 0 2px 0 #0e8a80, 0 4px 12px rgba(23,179,168,0.4);
     box-shadow: 0 2px 0 #0e8a80, 0 4px 12px rgba(23, 179, 168, 0.4);
     color: #ffffff !important;
     color: #ffffff !important;
}
}
.xh-random-btn:active {
.xh-random-btn:active {
     transform: translateY(2px);
     transform: translateY(2px);
     box-shadow: 0 0 0 #0e8a80, 0 1px 3px rgba(23,179,168,0.3);
     box-shadow: 0 0 0 #0e8a80, 0 1px 3px rgba(23, 179, 168, 0.3);
}
 
 
/* =====================================================
  6. 顶部工具栏(方案 3)
  隐藏 Vector 2022 顶部的「文A + ...」,把整条挪到
  左侧边栏底部。若不需要此效果,整段删除即可。
  ===================================================== */
 
/* 把顶部工具栏固定在左侧边栏底部 */
.vector-page-toolbar-container {
    position: fixed !important;
    top: auto !important;
    bottom: 4.5rem;          /* 顶到用户头像上方,可微调 */
    left: 0.35rem;
    right: auto !important;
    width: auto !important;
    z-index: 200;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
}
/* 外链图片背景框 —— 任意尺寸图片都裁切填满 */
 
.xh-cover-bg {
/* 让主内容顶到页面最上方 */
     overflow: hidden;
.vector-body {
    border-radius: 4px;
     padding-top: 0 !important;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    line-height: 0;
}
}
.xh-cover-rp    { background-image: url('https://www.xhcity.top/w/images/xhcity/1/1d/Rp_web.png'); }
 
.xh-cover-terra { background-image: url('https://www.xhcity.top/w/images/xhcity/4/43/Terra_mod.png'); }
/* 隐藏顶栏预留的空间 */
.xh-cover-g1    { background-image: url('https://www.xhcity.top/w/images/xhcity/0/06/G1.png'); }
.vector-sticky-header,
.xh-cover-g2    { background-image: url('https://www.xhcity.top/w/images/xhcity/8/85/G2.png'); }
.vector-header-container {
.xh-cover-g3    { background-image: url('https://www.xhcity.top/w/images/xhcity/4/45/G3.png'); }
     min-height: 0 !important;
.xh-cover-g4    { background-image: url('https://www.xhcity.top/w/images/xhcity/3/30/G4.png'); }
/* 外链图片背景框 —— 任意尺寸图片都裁切填满 */
.xh-cover-bg {
    overflow: hidden;
    border-radius: 4px;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
     line-height: 0;
}
}


/* 交通资讯图片 */
.xh-cover-transit { background-image: url('https://www.xhcity.top/w/images/xhcity/9/96/Transit_pic.png'); }


/* 建设资讯图标 */
/* =====================================================
.xh-icon-construction { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_construction.svg'); }
  7. 线路表格(其他页面共用)
.xh-icon-bids          { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_bids.svg'); }
  ===================================================== */
.xh-icon-div          { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_div.svg'); }


/* 在线工具图标 */
.wikitable-routes tr th,
.xh-icon-dmap    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_dmap.svg'); }
.wikitable-routes tr td {
.xh-icon-sysmap  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_sysmap.svg'); }
    font-size: 1rem !important;
.xh-icon-custom  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_custom.svg'); }
    padding: 5px 10px 5px 0 !important;
.xh-icon-verify  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_verify.svg'); }
}
.xh-icon-reset  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_reset.svg'); }
.wikitable-routes tr td:first-child {
    border-right: 10px solid white;
}
.wikitable-routes tr td:only-child {
    background-color: #f5f5f5 !important;
}
.wikitable-routes tr th {
    background-color: #eee !important;
}

2026年9月23日 (三) 16:23的版本

/* =====================================================
   星海市 Wiki — 全局样式
   -----------------------------------------------------
   目录
   1. 首页标题与标签隐藏
   2. 首页头图
   3. 通用裁切图片框
   4. 图标容器
   5. 按钮
   6. 顶部工具栏(方案 3)
   7. 线路表格(其他页面共用)
   ===================================================== */


/* =====================================================
   1. 首页标题与标签隐藏
   ===================================================== */

/* 隐藏页面标签栏:页面 / 讨论 / 编辑 / 历史 等 */
.page-首页 #p-namespaces,
.page-首页 #p-associated-pages,
.page-首页 #p-views,
.page-首页 #p-cactions {
    display: none !important;
}

/* 隐藏站点副标题(Tagline) */
.page-首页 #siteSub,
.page-首页 .siteSub {
    display: none !important;
}

/* 隐藏页面标题(“首页”两个字) */
.page-首页 #firstHeading,
.page-首页 .firstHeading {
    display: none !important;
}


/* =====================================================
   2. 首页头图
   ===================================================== */

.xh-banner {
    position: relative;
    height: 260px;                  /* 想改头图高度就改这一行 */
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    background-image: url('https://www.xhcity.top/w/images/xhcity/a/a3/XHSBANNER.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0f8f87;
}

/* 头图上的叠加文字(可选,未使用时保留备用) */
.xh-banner-text {
    position: absolute;
    left: 2rem;
    bottom: 1.5rem;
    right: 2rem;
    color: white;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}
.xh-banner-text .sub {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.4rem;
}
.xh-banner-text .title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.xh-banner-text .desc {
    font-size: 0.88rem;
    opacity: 0.88;
    margin-top: 0.45rem;
}


/* =====================================================
   3. 通用裁切图片框
   用途:任意尺寸图片塞进去都自动裁切填满
   ===================================================== */

.xh-cover-bg {
    overflow: hidden;
    border-radius: 4px;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    line-height: 0;
}

/* 比例变体 —— 按需附加到 .xh-cover-bg 上 */
.xh-cover-169 { aspect-ratio: 16 / 9; }   /* 宽幅 */
.xh-cover-32  { aspect-ratio: 3 / 2; }    /* 稍宽 */
.xh-cover-43  { aspect-ratio: 4 / 3; }    /* 常规 */
.xh-cover-11  { aspect-ratio: 1 / 1; }    /* 正方 */

/* 具体背景图 —— 服务器特色 */
.xh-cover-rp      { background-image: url('https://www.xhcity.top/w/images/xhcity/1/1d/Rp_web.png'); }
.xh-cover-terra   { background-image: url('https://www.xhcity.top/w/images/xhcity/4/43/Terra_mod.png'); }

/* 具体背景图 —— 风景画廊 */
.xh-cover-g1      { background-image: url('https://www.xhcity.top/w/images/xhcity/0/06/G1.png'); }
.xh-cover-g2      { background-image: url('https://www.xhcity.top/w/images/xhcity/8/85/G2.png'); }
.xh-cover-g3      { background-image: url('https://www.xhcity.top/w/images/xhcity/4/45/G3.png'); }
.xh-cover-g4      { background-image: url('https://www.xhcity.top/w/images/xhcity/3/30/G4.png'); }

/* 具体背景图 —— 交通资讯 */
.xh-cover-transit { background-image: url('https://www.xhcity.top/w/images/xhcity/9/96/Transit_pic.png'); }


/* =====================================================
   4. 图标容器(政策 / 建设 / 在线工具 共用)
   56×56,居中,透明底,SVG 不变形
   ===================================================== */

.xh-icon {
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto 0.45rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    line-height: 0;
}

/* --- 政策图标 --- */
.xh-icon-player   { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_player.svg'); }
.xh-icon-rules    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_rules.svg'); }
.xh-icon-approve  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_approve.svg'); }
.xh-icon-feedback { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_feedback.svg'); }
.xh-icon-road     { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_road.svg'); }
.xh-icon-station  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_station.svg'); }
.xh-icon-lines    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_lines.svg'); }

/* --- 建设资讯图标 --- */
.xh-icon-construction { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_construction.svg'); }
.xh-icon-bids         { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_bids.svg'); }
.xh-icon-div          { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_div.svg'); }

/* --- 在线工具图标 --- */
.xh-icon-dmap    { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_dmap.svg'); }
.xh-icon-sysmap  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_sysmap.svg'); }
.xh-icon-custom  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_custom.svg'); }
.xh-icon-verify  { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_verify.svg'); }
.xh-icon-reset   { background-image: url('https://res.xhcity.top/other-resources/xhwiki/icon_reset.svg'); }


/* =====================================================
   5. 按钮(随机页面 / 入服指南)
   底部有厚度的“拟物按钮”
   ===================================================== */

.xh-random-btn {
    display: inline-block;
    padding: 0.55em 1.2em;
    background: #17b3a8;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 2px 0 #0e8a80, 0 3px 8px rgba(23, 179, 168, 0.28);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}
.xh-random-btn:hover {
    background: #15a89e;
    box-shadow: 0 2px 0 #0e8a80, 0 4px 12px rgba(23, 179, 168, 0.4);
    color: #ffffff !important;
}
.xh-random-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #0e8a80, 0 1px 3px rgba(23, 179, 168, 0.3);
}


/* =====================================================
   6. 顶部工具栏(方案 3)
   隐藏 Vector 2022 顶部的「文A + ...」,把整条挪到
   左侧边栏底部。若不需要此效果,整段删除即可。
   ===================================================== */

/* 把顶部工具栏固定在左侧边栏底部 */
.vector-page-toolbar-container {
    position: fixed !important;
    top: auto !important;
    bottom: 4.5rem;          /* 顶到用户头像上方,可微调 */
    left: 0.35rem;
    right: auto !important;
    width: auto !important;
    z-index: 200;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 让主内容顶到页面最上方 */
.vector-body {
    padding-top: 0 !important;
}

/* 隐藏顶栏预留的空间 */
.vector-sticky-header,
.vector-header-container {
    min-height: 0 !important;
}


/* =====================================================
   7. 线路表格(其他页面共用)
   ===================================================== */

.wikitable-routes tr th,
.wikitable-routes tr td {
    font-size: 1rem !important;
    padding: 5px 10px 5px 0 !important;
}
.wikitable-routes tr td:first-child {
    border-right: 10px solid white;
}
.wikitable-routes tr td:only-child {
    background-color: #f5f5f5 !important;
}
.wikitable-routes tr th {
    background-color: #eee !important;
}