Template:Theme-HJ: Difference between revisions

From HUIJIA FUN
m Beautification
Sync with zh: ink-green headings; 1px heading rules (full width on h1/h2, fading on h3-h6); Archive Zone mark on h2; no page-title rule; flat language-variant button and dropdown; English-only copy labels
 
(13 intermediate revisions by the same user not shown)
Line 3: Line 3:
<style>
<style>
/**
/**
  * HUIJIA FUN - TIMELESS CONSOLIDATED THEME (v3.1)
  * HUIJIA FUN - TIMELESS THEME - HJ V5.0
  * Integrated Design: Forest Green / Academic Serif / Engineering Grid
  * VGR Design System: Archive Zone / site-wide default theme
  * Debugged: Pill Search Bar Alignment & Header Layout
  * Changes: uses VGR tokens; body text in Zhuque Fangsong; square corners, no shadows; keeps the dot pattern and graded heading rules;
*          scroll fade-ins removed; overrides the pink of Timeless and Tabber
  */
  */


/* --- 1. Imports & Root Variables --- */
/* === 0. Fonts ===
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Lora:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@600;800&display=swap');
  Source Sans 3 / Source Serif 4 are the Latin halves of the same families as Noto Sans SC / Noto Serif SC (Source Han Sans / Serif).
  Latin first, Chinese second: English italics come from the Latin font, while Chinese stays upright. */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@400;600&family=Source+Sans+3:ital,wght@0,400;0,500;0,700;1,400&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=JetBrains+Mono:wght@400;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/[email protected]/style.css');
/* Zhuque Fangsong: body font. Loaded in character slices, so only the glyphs a page uses are downloaded. SIL OFL 1.1 */
@import url('https://cdn.jsdelivr.net/npm/@chinese-fonts/[email protected]/dist/ZhuqueFangsong-Regular/result.css');


/* === 1. Tokens (light) === */
:root {
:root {
     --mw-primary: #025F32;
     /* Source colors */
     --mw-accent: #227F52;
    --src-huijia-green: #025F32;
     --mw-link: #008000;
     --src-dragon-green: #3B7E3D;
     --mw-bg-page: #E0EBE0;
    --src-gate-grey: #969682;
     --mw-bg-card: #FFFFFF;
    --src-plurimod-light: #C1E1A6;
     --mw-bg-sidebar: #C8D8C8;
    --src-huashao-blue: #002F9C;
     --mw-border: #A3B1A8;
 
     --mw-radius: 12px;
    /* Semantic colors */
     --font-heading: 'Montserrat', sans-serif;
    --paper: #F3F5F1;
     --font-body: 'Lora', serif;
    --paper-raised: #FFFFFF;
     --font-code: 'JetBrains Mono', monospace;
    --paper-sunk: #E7ECE5;
     --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.04);
    --ink: #16211B;
    --ink-muted: #4C5A51;
    --rule: #C9D3CA;
    --rule-strong: #7E8B81;
    --accent: #025F32;
     --accent-fill: #025F32;
    --on-accent: #FFFFFF;
     --accent-tint: #DCEBD9;
    --link: #0B6B3A;
     --link-new: #A8432F;
    --focus: #002F9C;
     --heading: #0F3D27;      /* heading text: ink green 12.2:1 */
    --heading-bar: #C8D8C8;   /* rule under sidebar group names */
     --heading-line: #8FB39A;  /* heading rules: full width on h1/h2, fading from h3 to h6 */
    --dot: #A3B1A8;           /* dot pattern on the content card */
 
     /* Type */
    --font-display: Huiwen, "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", serif;
    --font-serif: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
     --font-sans: "Source Sans 3", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    /* Body: Fangsong, the tone of archives and official documents. Falls back to Noto Serif SC if it fails to load */
     --font-body: "Source Serif 4", "Zhuque Fangsong (technical preview)", "Noto Serif SC", "Source Han Serif SC", "FangSong", "STFangsong", serif;
    --font-latin: "Cormorant Garamond", "EB Garamond", Georgia, serif;
    --font-scripture: "LXGW WenKai Screen", "Kaiti SC", STKaiti, KaiTi, serif;
     --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
 
    /* Spacing and radius */
     --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
    --space-6: 24px; --space-8: 32px; --space-12: 48px;
    --radius-none: 0; --radius-xs: 2px; --radius-sm: 4px; --radius-pill: 999px;
 
    /* Point the Timeless / Codex / FlowThread primary-color variables at Huijia Green, replacing the skin's pink */
    --color-primary: var(--accent);
    --color-progressive: var(--accent);
    --color-progressive--hover: var(--src-dragon-green);
    --background-color-progressive: var(--accent-fill);
    --border-color-progressive: var(--accent);
    --color-link: var(--link);
    --color-link--visited: var(--link);
    --color-link-red: var(--link-new);
 
    /* Legacy variable names, kept for other templates */
    --mw-primary: var(--accent);
    --mw-accent: var(--src-dragon-green);
    --mw-link: var(--link);
    --mw-border: var(--rule);
    --font-heading: var(--font-serif);
    --font-code: var(--font-mono);
}
 
/* === 1b. Tokens (dark)
  Applies only under MediaWiki's night-mode class and does not follow the system setting:
  Common.css and other templates are not dark-ready yet, so following the system would leave some elements dark-on-dark. */
html.skin-theme-clientpref-night {
    --paper: #111613;
    --paper-raised: #18201B;
    --paper-sunk: #0C100E;
    --ink: #E4EBE5;
    --ink-muted: #A2B0A6;
    --rule: #2A352E;
    --rule-strong: #667A6C;
    --accent: #C1E1A6;
    --accent-fill: #3B7E3D;
    --accent-tint: #1C2B21;
    --link: #8FD3A8;
    --link-new: #F0907E;
    --focus: #8FB0FF;
    --heading: #D2E8C6;
    --heading-bar: #2F4033;
    --heading-line: #4F7559;
    --dot: #2A352E;
    color-scheme: dark;
}
}


/* --- 2. Global Typography & Layout --- */
/* === 2. Page and body text === */
body {
body {
     background-color: var(--mw-bg-page);
     background-color: var(--paper);
     color: #2c3e50;
    color: var(--ink);
    font-family: var(--font-sans);
     font-size: 16px;
    line-height: 1.8;
    accent-color: var(--accent);
    -webkit-font-smoothing: antialiased;
}
 
/* Body text uses Fangsong; UI elements such as navigation, tables and buttons stay in sans (set in their own sections) */
.mw-parser-output {
     font-family: var(--font-body);
     font-family: var(--font-body);
     line-height: 1.75;
    font-size: 16px;
     line-height: 1.9;
    letter-spacing: 0.02em;
}
}
.mw-parser-output b,
.mw-parser-output strong { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0; }


#mw-content-wrapper {
/* Chinese has no true italic: stop the browser from faking slanted Chinese; Latin italics work as usual */
    background: transparent;
i, em, cite, .mw-parser-output i { font-synthesis: none; }
    padding-top: 0px;
}


#mw-content {
::selection { background: var(--accent-fill); color: var(--on-accent); }
    background-color: var(--mw-bg-card);
    padding: 30px 30px;
    border-radius: var(--mw-radius);
    border: 1px solid var(--mw-border);
    box-shadow: var(--shadow-subtle);
    background-image: radial-gradient(var(--mw-border) 0px, transparent 1px);
    background-size: 20px 20px;
}


/* --- 3. Avatar & Logo Symmetry --- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#p-logo, .mw-portlet-logo {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 20px 0 !important;
    margin-bottom: 10px;
}


#p-logo img {
/* === 3. Header === */
     border: 1px solid var(--mw-border);
#mw-header-container {
     border-radius: 8px;
     background: var(--paper-raised);
    background: #fff;
     border-bottom: 1px solid var(--rule);
    padding: 2px;
     box-shadow: none;
     box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}
}
 
#p-banner, #p-banner a, .mw-wiki-title {
#p-logo img:hover {
    font-family: var(--font-sans);
     transform: translateY(-2px);
    font-weight: 500;
    letter-spacing: 0.04em;
     color: var(--ink) !important;
}
}


/* --- 4. Fixed Pill Search Bar (Debugged) --- */
/* === 4. Search box (the only pill shape) === */
#p-search {
#p-search {
     margin: 0 20px !important;
     margin: 0 20px !important;
Line 77: Line 151:
     align-items: center;
     align-items: center;
}
}
/* Container for the search input and button */
#searchform {
#searchform {
     background: #ffffff !important;
     background: var(--paper-raised) !important;
     border: 1px solid var(--mw-border) !important;
     border: 1px solid var(--rule-strong) !important;
     border-radius: 30px !important; /* Forces the pill shape */
     border-radius: var(--radius-pill) !important;
     display: flex !important;
     display: flex !important;
     flex-direction: row !important;
     flex-direction: row !important;
     align-items: center !important;
     align-items: center !important;
     padding: 2px 4px 2px 15px !important;
     padding: 2px 4px 2px 16px !important;
     transition: all 0.3s ease;
     max-width: 350px;
     overflow: hidden;
     overflow: hidden;
     max-width: 350px; /* Prevents the bar from stretching too far */
     box-shadow: none !important;
    transition: border-color 0.2s ease;
}
}
#searchform:focus-within {
#searchform:focus-within {
     border-color: var(--mw-primary) !important;
     border-color: var(--accent) !important;
     box-shadow: 0 0 0 4px rgba(2, 95, 50, 0.1) !important;
     outline: 2px solid var(--focus);
    outline-offset: 2px;
}
}
/* Targets the specific MediaWiki wrapper inside the form */
#simpleSearch {
#simpleSearch {
     background: transparent !important;
     background: transparent !important;
Line 105: Line 176:
     align-items: center !important;
     align-items: center !important;
}
}
#searchInput {
#searchInput {
     background: transparent !important;
     background: transparent !important;
     border: none !important;
     border: none !important;
     box-shadow: none !important;
     box-shadow: none !important;
     font-family: var(--font-body);
     font-family: var(--font-sans);
     font-size: 0.9em !important;
     font-size: 14px !important;
     padding: 8px 0 !important;
     padding: 8px 0 !important;
     color: #333 !important;
     color: var(--ink) !important;
     width: 100% !important;
     width: 100% !important;
    outline: none;
}
}
#searchInput::placeholder { color: var(--ink-muted); }


/* The Magnifying Glass / Search Button */
/* === 5. Logo === */
/* A lot of bugs!!!
#p-logo, .mw-portlet-logo {
     #searchButton, .searchButton {
    display: flex !important;
     background-color: var(--mw-primary) !important;
    justify-content: center;
    align-items: center;
    padding: 20px 0 !important;
     margin-bottom: 10px;
}
#p-logo img {
    border-radius: var(--radius-none);
    box-shadow: none;
}
 
/* === 6. Left and right sidebars === */
.sidebar-chunk {
     background-color: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius-none);
    box-shadow: none;
    margin-bottom: var(--space-4);
    padding: var(--space-4);
}
.sidebar-chunk h2,
.sidebar-chunk h3,
.mw-portlet h3 {
    /* Group names (Navigation / Hubs / Setting Zone / Page tools…): Source Serif / Noto Serif SC */
    font-family: var(--font-serif) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em;
    text-transform: none;
    color: var(--ink) !important;
     border: none !important;
     border: none !important;
     border-radius: 50% !important; /* Perfect circle button */
     border-bottom: 2px solid var(--heading-bar) !important;
     color: white !important;
    padding-bottom: 6px;
     width: 28px !important;
    margin-bottom: var(--space-3);
     height: 28px !important;
}
     min-width: 28px !important;
.sidebar-chunk li a,
     display: flex !important;
.sidebar-chunk li a span,
     justify-content: center !important;
.mw-portlet-body li a,
     align-items: center !important;
.mw-portlet-body li a span {
     cursor: pointer;
    /* Nav links: Zhuque Fangsong, matching the body text */
     margin-left: 0px !important;
     color: var(--ink) !important;
     transition: background 0.2s ease, transform 0.2s ease;
     font-family: var(--font-body) !important;
     font-size: 15.5px;
     letter-spacing: 0.04em;
}
.sidebar-chunk li a:hover,
.mw-portlet-body li a:hover {
     color: var(--accent) !important;
     text-decoration: none;
}
 
/* === 7. Content card === */
#mw-content-wrapper {
    background: transparent;
    padding-top: 0;
     box-shadow: none;
}
#mw-content {
     background-color: var(--paper-raised);
     /* dot pattern: 1px dots on a 20px grid */
    background-image: radial-gradient(var(--dot) 0px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-none);
    box-shadow: none;
    padding: var(--space-6) var(--space-8);
}
 
/* Page tabs (Read / Edit / History / Discussion): the selected tab uses Huijia Green instead of pink */
#mw-content-block .mw-portlet li a,
#mw-content-block .mw-portlet li a .mw-ui-icon::before {
    color: var(--ink-muted) !important;
}
/* Page tab labels (Template / Discussion / Read / Edit / History): Zhuque Fangsong */
#mw-content-block .mw-portlet li a,
#mw-content-block .mw-portlet li a span {
    font-family: var(--font-body) !important;
     font-size: 15.5px;
    letter-spacing: 0.06em;
}
#mw-content-block .mw-portlet li.selected a,
#mw-content-block .mw-portlet li.selected a .mw-ui-icon::before {
    color: var(--accent) !important;
}
#mw-content-block .mw-portlet li.selected a {
    box-shadow: none !important;
}
}
#mw-content-block .mw-portlet li a:hover { color: var(--ink) !important; }


#searchButton:hover {
/* Language variant button: remove the underline the skin puts under the label; remove the skin's pink shadow from the dropdown */
    background-color: var(--mw-accent) !important;
#p-variants-desktop h3,
    transform: scale(1.05);
#p-variants-desktop-label { border-bottom: none !important; box-shadow: none !important; }
} */
#p-variants-desktop .dropdown { box-shadow: none !important; }


/* --- 5. Headings with "◈" Decoration --- */
/* Tabber (e.g. the Main Page "Site info / Create a page" tabs) */
h1, h2, h3, h4, h5, h6 {
.tabber__tab { color: var(--ink-muted) !important; font-family: var(--font-body) !important; font-size: 15.5px; letter-spacing: 0.06em; }
    font-family: var(--font-heading);
.tabber__tab[aria-selected="true"] { color: var(--accent) !important; }
     font-weight: 800;
.tabber__indicator { background: var(--accent) !important; }
     letter-spacing: -0.01em;
.tabber .tabbernav li a { color: var(--ink-muted) !important; font-family: var(--font-body) !important; letter-spacing: 0.06em; }
.tabber .tabbernav li.tabberactive a {
     color: var(--accent) !important;
     border-bottom-color: var(--accent) !important;
}
}


/* === 8. Headings ===
  Text in ink green (--heading). The page title has no rule. h1/h2: a full-width 1px green-grey rule; h2 gets the Archive Zone mark ■.
  h3-h6: a rule of the same color and weight (1px) fading out to the right, shorter and fainter at each level (same approach as Theme-VGR, in Archive Zone green-grey). */
h1.firstHeading {
h1.firstHeading {
     color: var(--mw-primary) !important;
    font-family: var(--font-serif);
     font-size: 2em;
    font-size: 30px;
     border-bottom: 4px solid var(--mw-bg-sidebar);
    font-weight: 600;
     padding-bottom: 8px;
    line-height: 1.3;
     margin-bottom: 1em;
     color: var(--heading) !important;
     letter-spacing: 0.02em;
     border-bottom: none !important;
    padding-bottom: 10px;
    margin-bottom: var(--space-6);
    text-wrap: balance;
}
 
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output h5,
.mw-parser-output h6 {
    font-family: var(--font-serif) !important;
    font-weight: 600;
    color: var(--heading) !important;
    letter-spacing: 0.02em;
    text-wrap: balance;
     padding-bottom: var(--space-2);
     overflow: hidden;
    border: none !important;
}
}


h1.firstHeading::before {
/* h1/h2: full-width 1px rule, same color and weight as the h3-h6 fading rules */
     content: "◈";
.mw-parser-output h1,
     color: var(--mw-accent);
.mw-parser-output h2 {
    background: linear-gradient(var(--heading-line) 0 0) left bottom / 100% 1px no-repeat;
}
.mw-parser-output h1 {
    font-size: 26px;
    line-height: 1.3;
    margin: var(--space-8) 0 var(--space-3);
}
.mw-parser-output h2 {
     font-size: 23px;
    line-height: 1.35;
     margin: var(--space-8) 0 var(--space-3);
}
/* Archive Zone mark: a small solid square (drawn in CSS, font-independent, matching the sidebar ■) */
.mw-parser-output h2::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
     margin-right: 12px;
     margin-right: 12px;
     font-size: 0.8em;
     vertical-align: 0.2em;
     vertical-align: middle;
     background: var(--accent);
}
}
.toc h2::before, #toc h2::before, .mw-parser-output .toctitle h2::before { content: none; display: none; }
.toc h2, #toc h2, .mw-parser-output .toctitle h2 { background: none; }


h2 {
.mw-parser-output h3 {
     color: var(--mw-primary) !important;
    font-size: 19px;
     border-bottom: 1px solid var(--mw-border);
    line-height: 1.45;
     padding-bottom: 5px;
    margin: var(--space-6) 0 var(--space-2);
     margin-top: 2em;
}
.mw-parser-output h4 {
    font-size: 17px;
    line-height: 1.5;
     color: var(--ink) !important;
    margin: var(--space-4) 0 var(--space-2);
}
.mw-parser-output h5 {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink) !important;
     margin: var(--space-4) 0 var(--space-1);
}
.mw-parser-output h6 {
    font-family: var(--font-sans) !important;
    font-size: 13px;
     font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ink-muted) !important;
     margin: var(--space-4) 0 var(--space-1);
}
}


/* --- 6. Source Code Beautification --- */
/* h3-h6: fade out to the right */
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output h5,
.mw-parser-output h6 { position: relative; }
.mw-parser-output h3::after,
.mw-parser-output h4::after,
.mw-parser-output h5::after,
.mw-parser-output h6::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--heading-line), transparent);
}
.mw-parser-output h3::after { width: 85%; height: 1px; }
.mw-parser-output h4::after { width: 65%; height: 1px; opacity: 0.8; }
.mw-parser-output h5::after { width: 45%; height: 1px; opacity: 0.7; }
.mw-parser-output h6::after { width: 25%; height: 1px; opacity: 0.6; }
 
#personal h2,
#personal .header-avatar { overflow: visible; }
 
/* === 9. Links === */
.mw-parser-output a,
#catlinks a { color: var(--link); text-decoration: none; }
.mw-parser-output a:visited { color: var(--link); }
.mw-parser-output a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mw-parser-output a.new,
.mw-parser-output a.new:visited { color: var(--link-new); }
 
/* === 10. Code === */
code {
code {
     background-color: #f1f4f1;
     background-color: var(--paper-sunk);
     color: #b33939;
     color: var(--ink);
     padding: 3px 7px;
     padding: 2px 6px;
     border-radius: 6px;
     border-radius: var(--radius-xs);
     font-family: var(--font-code);
     font-family: var(--font-mono);
     font-size: 0.9em;
     font-size: 13px;
}
}
pre {
pre {
     background-color: #f9fbf9 !important;
    position: relative;
     border: 1px solid var(--mw-border) !important;
     background-color: var(--paper-sunk) !important;
     border-left: 6px solid var(--mw-primary) !important;
    color: var(--ink);
     padding: 20px !important;
     border: 1px solid var(--rule) !important;
    border-radius: var(--mw-radius);
     border-radius: var(--radius-none);
     font-family: var(--font-code) !important;
     padding: var(--space-4) !important;
     font-family: var(--font-mono) !important;
    font-size: 13px;
     line-height: 1.6;
     line-height: 1.6;
     overflow-x: auto;
     overflow-x: auto;
    color: #333;
}
}


/* --- 7. Sidebar Elements --- */
/* === 11. Tables (override Common.css's solid deep-green header row and zebra striping) === */
.sidebar-chunk {
.mw-parser-output table.wikitable {
     background-color: var(--mw-bg-sidebar);
    width: auto;
     border-radius: var(--mw-radius);
     background: var(--paper-raised);
     border: 1px solid rgba(0,0,0,0.05);
    color: var(--ink);
     margin-bottom: 20px;
    border: none;
     padding: 15px;
    border-top: 2px solid var(--accent);
    border-bottom: 1px solid var(--rule-strong);
    border-collapse: collapse;
     border-radius: var(--radius-none);
    box-shadow: none;
    overflow: visible;
    font-family: var(--font-sans);
    font-size: 14px;
}
.mw-parser-output table.wikitable > * > tr > th,
.mw-parser-output table.wikitable > tr > th {
    background: transparent;
    color: var(--accent);
     font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
     text-align: left;
     padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--rule-strong);
}
}
 
.mw-parser-output table.wikitable > * > tr > td,
.sidebar-chunk h2 {
.mw-parser-output table.wikitable > tr > td {
     font-size: 0.85em;
     color: var(--ink);
    text-transform: uppercase;
     padding: 9px 12px;
     letter-spacing: 1.2px;
     border: none;
     border: none;
     margin-bottom: 12px;
     border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
}
.mw-parser-output table.wikitable > tbody > tr:nth-of-type(even) { background: transparent; }
.mw-parser-output table.wikitable > tbody > tr:last-of-type > td { border-bottom: none; }
.mw-parser-output table.wikitable > tbody > tr:hover td { background: var(--accent-tint); color: var(--ink); }


/* --- 8. Wikitables & Interactive Elements --- */
/* === 12. Category bar and footer === */
table.wikitable {
#catlinks {
     border-radius: var(--mw-radius);
    background-color: var(--paper-sunk);
     overflow: hidden;
    border: 1px solid var(--rule);
     border: 1px solid var(--mw-border);
    border-radius: var(--radius-none);
     border-collapse: separate;
    padding: var(--space-3) var(--space-4);
     border-spacing: 0;
    font-size: 13px;
    color: var(--ink-muted);
}
.mw-footer {
     background-color: var(--paper-sunk);
     color: var(--ink-muted);
     border-top: 1px solid var(--rule);
    border-radius: var(--radius-none);
     margin-top: var(--space-12);
     padding: var(--space-6) var(--space-8);
    font-size: 13px;
}
}
.mw-footer a { color: var(--ink-muted); }
.mw-footer-container { background: transparent; }
/* === 13. Pink from Common.css (temporary override; better to fix Common.css itself later) === */
textarea:hover,
textarea:focus-visible { border-color: var(--accent) !important; box-shadow: none !important; }
.navbox th, .navbox-title { background: var(--accent-tint) !important; color: var(--ink); }
.navbox-abovebelow, th.navbox-group, .navbox-subgroup .navbox-title { background: var(--paper-sunk) !important; }
.navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: var(--paper) !important; }
.navbox-even { background: var(--paper) !important; }
.repost-circle, .repost-circle a.external { color: var(--accent) !important; border-color: var(--accent) !important; }
/* === 14. Mobile (≤850px) === */
@media screen and (max-width: 850px) {
    #mw-content { padding: var(--space-4); }
    /* Restore Timeless mobile nav (in case global rules interfere) */
    #mw-mf-page-left, .dropdown, .dropdown-active,
    #mw-related-navigation,
    #site-tools, #personal {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    /* Cap the logo size so it can't blow up when the sidebar renders incorrectly */
    #p-logo img {
        max-width: 180px !important;
        width: auto !important;
        height: auto !important;
    }
    .dropdown .mw-portlet-body,
    .dropdown.dropdown-active .mw-portlet-body {
        display: block !important;
        height: auto !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
        background-color: var(--paper-raised) !important;
        border: 1px solid var(--rule) !important;
        border-radius: var(--radius-none) !important;
        box-shadow: none !important;
        z-index: 9999 !important;
        position: relative !important;
    }
    .dropdown-toggle, #ca-more, .mw-ui-icon {
        position: relative !important;
        z-index: 9999 !important;
    }
    /* Hide the empty sidebar/portlet shells */
    .sidebar-chunk:empty,
    .mw-portlet:empty,
    .mw-portlet:not(:has(li)):not(:has(a)) {
        display: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
    }
    #mw-content-block .sidebar-chunk {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
    }


table.wikitable th {
     #mw-content-block { background: transparent !important; }
     background-color: var(--mw-bg-sidebar);
    color: var(--mw-primary);
    font-family: var(--font-heading);
    padding: 12px;
}


table.wikitable td {
    .mw-parser-output table.wikitable {
    padding: 10px;
        display: block;
    border-top: 1px solid #f0f0f0;
        overflow-x: auto;
        white-space: normal;
    }
}
}


a {
/* === 15. Reading progress bar and copy button === */
     color: var(--mw-link);
#reading-progress-container {
     text-decoration: none;
     position: fixed;
     transition: all 0.2s ease;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--rule);
     z-index: 9999;
     pointer-events: none;
}
}
 
#reading-progress-bar {
a:hover {
    height: 100%;
     color: var(--mw-primary);
    width: 0;
    text-decoration: underline dotted;
     background: var(--accent-fill);
}
}
 
.code-copy-btn {
/* --- 9. Categorization & Footer --- */
    position: absolute;
#catlinks {
    top: 8px;
     background-color: #f4f8f4;
    right: 8px;
     border: 1px solid var(--mw-border);
    font-family: var(--font-sans);
     border-radius: var(--mw-radius);
    font-size: 12px;
     padding: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 4px 10px;
     color: var(--on-accent);
     background: var(--accent-fill);
    border: none;
     border-radius: var(--radius-sm);
     cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}
}
pre:hover .code-copy-btn,
.code-copy-btn:focus-visible { opacity: 1; }


.mw-footer {
@media (prefers-reduced-motion: reduce) {
    background-color: var(--mw-bg-sidebar);
     * { transition: none !important; animation: none !important; }
    padding: 30px;
    border-radius: var(--mw-radius) var(--mw-radius) 0 0;
     margin-top: 40px;
    border-top: 4px solid var(--mw-primary);
}
}
</style>
</style>
</html></includeonly><noinclude>{{Theme-HJ}}
<script>
/**
* HUIJIA FUN - UI ENHANCEMENTS (v5.0)
* Kept: bottom reading progress bar, code copy button
* Removed: scroll fade-ins (headings started transparent and vanished if the script failed)
*/
(function () {
    "use strict";
    if (window.__hjThemeLoaded) return;  /* don't run twice when a page includes the template twice */
    window.__hjThemeLoaded = true;
 
    var LABEL = { copy: "Copy", done: "Copied", fail: "Copy failed" };
 
    function initProgressBar() {
        if (document.getElementById("reading-progress-container")) return;
        var container = document.createElement("div");
        container.id = "reading-progress-container";
        var bar = document.createElement("div");
        bar.id = "reading-progress-bar";
        container.appendChild(bar);
        document.body.appendChild(container);
 
        var ticking = false;
        function update() {
            var top = window.pageYOffset || document.documentElement.scrollTop;
            var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            bar.style.width = (height > 0 ? (top / height) * 100 : 0) + "%";
            ticking = false;
        }
        window.addEventListener("scroll", function () {
            if (!ticking) { ticking = true; window.requestAnimationFrame(update); }
        }, { passive: true });
        update();
    }
 
    function initCopyButtons() {
        document.querySelectorAll("#mw-content pre").forEach(function (block) {
            if (block.querySelector(".code-copy-btn")) return;
            var btn = document.createElement("button");
            btn.type = "button";
            btn.className = "code-copy-btn";
            btn.textContent = LABEL.copy;
            btn.addEventListener("click", function () {
                var clone = block.cloneNode(true);
                var own = clone.querySelector(".code-copy-btn");
                if (own) own.remove();
                var text = clone.textContent.trim();
                var done = function (label) {
                    btn.textContent = label;
                    setTimeout(function () { btn.textContent = LABEL.copy; }, 2000);
                };
                if (navigator.clipboard && navigator.clipboard.writeText) {
                    navigator.clipboard.writeText(text).then(
                        function () { done(LABEL.done); },
                        function () { done(LABEL.fail); }
                    );
                } else {
                    done(LABEL.fail);
                }
            });
            block.appendChild(btn);
        });
    }
 
    function init() {
        initProgressBar();
        initCopyButtons();
    }
 
    if (document.readyState === "loading") {
        document.addEventListener("DOMContentLoaded", init);
    } else {
        init();
    }
})();
</script>
</html>
</includeonly><noinclude>{{Theme-HJ}}
==Description==
==Description==
===Origin===
'''Theme-HJ''' is the theme for HUIJIA FUN's Archive Zone and the site-wide default pages, built strictly on the VGR Design System. Its features: a cool, green-tinted grey paper ground, a "Huijia Green" accent, square corners and no shadows; the content card carries a dot pattern, and headings are set in ink green on thin green-grey rules: full width under level-1 and level-2 headings (level 2 also carries the Archive Zone mark ■), fading out to the right and getting shorter at each level below.
Author: [[User:PlurimodSU|PlurimodSU]]
 
==Origin==
Author: [[User:PlurimodSU|Marina Malinti]]


===Note===
===Note===
To use this theme on a page, simply add the following code directly to the page's source code:
To use this theme on a page, simply add the following code directly to the page's source code:
<pre>{{Theme-HJ}}</pre>
<pre>{{Theme-HJ}}</pre>
==Test==
A body paragraph with an [[Main Page|internal link]], a [[Nonexistent Page|red link]] and some <code>inline code</code>. ''English italic stays italic; 中文不会被压斜。''
===Subheading 3===
====Subheading 4====
=====Subheading 5=====
======Subheading 6======
{| class="wikitable"
! Event !! S.C. !! O.
|-
| Sample event A || 1999 || 0
|-
| Sample event B || 2021 || 22
|}
<pre>{{Theme-HJ}}</pre>
==Test 2==
===Subheading 3===
====Subheading 4====
=====Subheading 5=====
======Subheading 6======
[[Category:Template-Theme]]
[[Category:Template-Theme]]
</noinclude>
</noinclude>

Latest revision as of 10:35, 13 October 2026

Description

Theme-HJ is the theme for HUIJIA FUN's Archive Zone and the site-wide default pages, built strictly on the VGR Design System. Its features: a cool, green-tinted grey paper ground, a "Huijia Green" accent, square corners and no shadows; the content card carries a dot pattern, and headings are set in ink green on thin green-grey rules: full width under level-1 and level-2 headings (level 2 also carries the Archive Zone mark ■), fading out to the right and getting shorter at each level below.

Origin

Author: Marina Malinti

Note

To use this theme on a page, simply add the following code directly to the page's source code:

{{Theme-HJ}}

Test

A body paragraph with an internal link, a red link and some inline code. English italic stays italic; 中文不会被压斜。

Subheading 3

Subheading 4

Subheading 5
Subheading 6
Event S.C. O.
Sample event A 1999 0
Sample event B 2021 22
{{Theme-HJ}}

Test 2

Subheading 3

Subheading 4

Subheading 5
Subheading 6