跳转到内容
打开/关闭菜单
  • 1 条目
  • 1 用户
  • 147 编辑
Anachronism
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Citizen.css:修订间差异

MediaWiki界面页面
Ancimen​(留言 | 贡献)
无编辑摘要
Ancimen​(留言 | 贡献)
无编辑摘要
第66行: 第66行:
         padding: 1rem !important;
         padding: 1rem !important;
         overflow-y: auto !important;
         overflow-y: auto !important;
        z-index: 9999;
     }
     }
}
}

2026年9月27日 (日) 23:12的版本

/* ============================================
   Citizen原生组件禁用
   ============================================ */
/* ===== 隐藏 Citizen header,但保留偏好设置面板 ===== */
.citizen-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 9999;
    pointer-events: none;
}
/* 隐藏 header 里除 preferences 之外的所有内容 */
.citizen-header__logo,
.citizen-search,
.citizen-drawer,
.citizen-header__start,
.citizen-userMenu,
.citizen-preferences-dropdown > details {
    display: none !important;
}
.citizen-preferences-dropdown {
    display: block !important;
    pointer-events: auto;
}
/* 把偏好设置面板拉到屏幕中央 */
#citizen-preferences-dropdown__card {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 32rem !important;
    max-width: 92vw !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    background: #fff !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
    padding: 1rem !important;
    z-index: 10000 !important;
    display: none;
}
/* 显示状态:details 打开 或 body 上有触发类 */
#citizen-preferences-details[open] + #citizen-preferences-dropdown__card,
body.citizen-preferences-shown #citizen-preferences-dropdown__card {
    display: block !important;
}
/* ===== 移动端:偏好设置面板全屏 ===== */
@media (max-width: 700px) {
    #citizen-preferences-dropdown__card {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        transform: none !important;
        border-radius: 0 !important;
        padding: 1rem !important;
        overflow-y: auto !important;
        z-index: 9999;
    }
}
/* ============================================
			侧边工具栏Rail
   ============================================ */
/* 按钮容器:左上角垂直排列 */
.rail-container {
    position: fixed;
    top: 5rem;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform 0.3s ease;
}
/* 面板打开时,按钮整体往左平移面板宽度,贴在面板左边缘 */
body.rail-open .rail-container {
    transform: translateX(-19.5rem);
}
/* 单个按钮 */
.rail-button {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    background: #56000d;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}
.rail-button:hover {
    background: #8b1a2b;
    transform: translateX(-2px);
}
.rail-button.is-active {
    background: #8b1a2b;
    transform: translateX(-4px);
}
.rail-button__icon {
    line-height: 1;
    pointer-events: none;
}

/* 面板 */
.rail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 20rem;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body.rail-open .rail-panel {
    transform: translateX(0);
}

/* 面板头部 */
.rail-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #56000d;
    color: #fff;
    flex-shrink: 0;
}
.rail-panel__title {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}
.rail-panel__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}
.rail-panel__close:hover {
    opacity: 0.7;
}

/* 面板内容 */
.rail-panel__content {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}
.rail-panel__loading {
    color: #888;
    text-align: center;
    padding: 2rem 0;
}

/* 面板内容里的 wikitext 渲染结果 */
.rail-panel__content .mw-parser-output h3 {
    font-size: 1rem;
    color: #56000d;
    border-left: 3px solid #56000d;
    padding-left: 0.5rem;
    margin: 1rem 0 0.5rem 0;
}
.rail-panel__content .mw-parser-output h3:first-child {
    margin-top: 0;
}
.rail-panel__content .mw-parser-output ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
}
.rail-panel__content .mw-parser-output li {
    margin-bottom: 0.25rem;
}
.rail-panel__content .mw-parser-output a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #333;
    text-decoration: none;
    border-radius: 0.4rem;
    transition: background 0.15s, color 0.15s;
}
.rail-panel__content .mw-parser-output a:hover {
    background: rgba(86, 0, 13, 0.08);
    color: #56000d;
}

/* 遮罩 */
.rail-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
body.rail-open .rail-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* 移动端适配 */
@media (max-width: 700px) {
    .rail-panel {
        width: 80vw;
    }
    .rail-container {
        top: 4rem;
    }
    body.rail-open .rail-container {
        transform: translateX(-80vw+0.5rem);
    }
}
/* ============================================
				`	页脚FOOTER
   ============================================ */
/* ========== Footer 整体:暗红渐变 + 与上方内容留空隙 ========== */
.citizen-footer {
    margin-top: 4rem;
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(180deg, #2a0006 0%, #56000d 100%);
    color: rgba(255, 255, 255, 0.85);
    border-top: none;
}

.citizen-footer__container {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 0;
}

/* ========== Footer 上半区:居中布局 ========== */
.citizen-footer__content {
    display: block;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.citizen-footer__siteinfo {
    display: inline-block;
    text-align: center;
    margin: 0 auto;
}

/* ========== 站点标题 + Logo ========== */
.citizen-footer__sitetitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.citizen-footer__sitetitle .mw-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    filter: brightness(0) invert(1);
}

.citizen-footer__sitetitle .mw-logo-wordmark {
    color: #fff;
}

/* ========== 站点描述 ========== */
.citizen-footer__desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 40rem;
}

/* ========== 隐藏三个跳转链接 ========== */
#footer-places-privacy,
#footer-places-about,
#footer-places-disclaimers {
    display: none;
}

/* 如果整个 footer-places 里没有任何其他链接,也一并隐藏,避免留空白 */
#footer-places {
    display: none;
}

/* ========== Footer 下半区:tagline 居中 ========== */
.citizen-footer__bottom {
    padding-top: 1.5rem;
    text-align: center;
}

#footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}



/* 1. 定义字体 */
@font-face {
    font-family: 'LXGW WenKai Medium';
    src:  url('/fonts/LXGWWenKai-Medium.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* 2. 应用为全局默认字体 */
:root {
    --font-family-base: 'LXGW WenKai Medium', system-ui, sans-serif;
}

/* 3. 确保正文内容也使用该字体(覆盖性更强) */
html, body, .mw-body, .mw-parser-output {
    font-family: 'LXGW WenKai Medium', system-ui, sans-serif;
}