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
 
(17 intermediate revisions by the same user not shown)
Line 2: Line 2:
<html>
<html>
<style>
<style>
/**
* HUIJIA FUN - TIMELESS THEME - HJ V5.0
* VGR Design System: Archive Zone / site-wide default theme
* 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
*/
/* === 0. Fonts ===
  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 {
    /* Source colors */
    --src-huijia-green: #025F32;
    --src-dragon-green: #3B7E3D;
    --src-gate-grey: #969682;
    --src-plurimod-light: #C1E1A6;
    --src-huashao-blue: #002F9C;
    /* Semantic colors */
    --paper: #F3F5F1;
    --paper-raised: #FFFFFF;
    --paper-sunk: #E7ECE5;
    --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. Page and body text === */
body {
body {
     background-color: #E0EBE0;
     background-color: var(--paper);
     color: #333;
     color: var(--ink);
     font-family: sans-serif;
     font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    accent-color: var(--accent);
    -webkit-font-smoothing: antialiased;
}
}


#mw-content-wrapper {
/* Body text uses Fangsong; UI elements such as navigation, tables and buttons stay in sans (set in their own sections) */
     background: none;
.mw-parser-output {
     font-family: var(--font-body);
    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; }
/* Chinese has no true italic: stop the browser from faking slanted Chinese; Latin italics work as usual */
i, em, cite, .mw-parser-output i { font-synthesis: none; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }


#mw-content {
/* === 3. Header === */
     background-color: #FFFFFF;
#mw-header-container {
    padding: 20px;
     background: var(--paper-raised);
     border-radius: 8px;
     border-bottom: 1px solid var(--rule);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
     box-shadow: none;
     margin-bottom: 20px;
}
     border: 1px solid #A3B1A8;
#p-banner, #p-banner a, .mw-wiki-title {
     background-image: radial-gradient(circle at 0px 0px, #DDD 1px, transparent 2px);
     font-family: var(--font-sans);
     background-size: 10px 10px;
     font-weight: 500;
    background-repeat: repeat;
     letter-spacing: 0.04em;
     color: var(--ink) !important;
}
}


.sidebar-chunk {
/* === 4. Search box (the only pill shape) === */
     background-color: #C8D8C8;
#p-search {
     padding: 15px;
    margin: 0 20px !important;
     margin-bottom: 18px;
    display: flex;
     border-radius: 8px;
    align-items: center;
     border: 1px solid #8A9B8A;
}
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
#searchform {
     background: var(--paper-raised) !important;
    border: 1px solid var(--rule-strong) !important;
    border-radius: var(--radius-pill) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
     padding: 2px 4px 2px 16px !important;
    max-width: 350px;
    overflow: hidden;
     box-shadow: none !important;
     transition: border-color 0.2s ease;
}
#searchform:focus-within {
    border-color: var(--accent) !important;
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
#simpleSearch {
    background: transparent !important;
     border: none !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
}
#searchInput {
    background: transparent !important;
    border: none !important;
     box-shadow: none !important;
    font-family: var(--font-sans);
    font-size: 14px !important;
    padding: 8px 0 !important;
    color: var(--ink) !important;
    width: 100% !important;
    outline: none;
}
}
#searchInput::placeholder { color: var(--ink-muted); }


h1, h2{
/* === 5. Logo === */
     color: #025F32 !important;
#p-logo, .mw-portlet-logo {
     border-bottom-color: #8A9B8A;
     display: flex !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;
}
}


h3, h4, h5, h6 {
/* === 6. Left and right sidebars === */
     color: #227F52 !important;
.sidebar-chunk {
     border-bottom-color: #8A9B8A;
    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-bottom: 2px solid var(--heading-bar) !important;
    padding-bottom: 6px;
    margin-bottom: var(--space-3);
}
.sidebar-chunk li a,
.sidebar-chunk li a span,
.mw-portlet-body li a,
.mw-portlet-body li a span {
    /* Nav links: Zhuque Fangsong, matching the body text */
     color: var(--ink) !important;
     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;
}
}


a {
/* === 7. Content card === */
     color: #008000;
#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);
}
}


a:hover {
/* Page tabs (Read / Edit / History / Discussion): the selected tab uses Huijia Green instead of pink */
     color: #004D00;
#mw-content-block .mw-portlet li a,
    text-decoration: underline;
#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; }


a:visited {
/* Language variant button: remove the underline the skin puts under the label; remove the skin's pink shadow from the dropdown */
     color: #004D00;
#p-variants-desktop h3,
#p-variants-desktop-label { border-bottom: none !important; box-shadow: none !important; }
#p-variants-desktop .dropdown { box-shadow: none !important; }
 
/* Tabber (e.g. the Main Page "Site info / Create a page" tabs) */
.tabber__tab { color: var(--ink-muted) !important; font-family: var(--font-body) !important; font-size: 15.5px; letter-spacing: 0.06em; }
.tabber__tab[aria-selected="true"] { color: var(--accent) !important; }
.tabber__indicator { background: var(--accent) !important; }
.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;
}
}


table.wikitable {
/* === 8. Headings ===
     background-color: #FFFFFF;
  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 ■.
     border: 1px solid #A3B1A8;
  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). */
     border-collapse: collapse;
h1.firstHeading {
     margin: 1em 0;
     font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--heading) !important;
    letter-spacing: 0.02em;
     border-bottom: none !important;
     padding-bottom: 10px;
     margin-bottom: var(--space-6);
    text-wrap: balance;
}
}


table.wikitable th,
.mw-parser-output h1,
table.wikitable td {
.mw-parser-output h2,
     border: 1px solid #A3B1A8;
.mw-parser-output h3,
     padding: 0.5em;
.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;
}
}


table.wikitable th {
/* h1/h2: full-width 1px rule, same color and weight as the h3-h6 fading rules */
     background-color: #C8D8C8;
.mw-parser-output h1,
     text-align: center;
.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;
     vertical-align: 0.2em;
    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; }


.mw-footer {
.mw-parser-output h3 {
     background-color: #C8D8C8;
     font-size: 19px;
     padding: 15px;
     line-height: 1.45;
     margin-top: 20px;
     margin: var(--space-6) 0 var(--space-2);
     border-radius: 8px;
}
     box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
.mw-parser-output h4 {
     font-size: 0.9em;
    font-size: 17px;
     color: #555;
     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);
}
}


#catlinks {
/* h3-h6: fade out to the right */
     margin-top: 20px;
.mw-parser-output h3,
     padding: 10px 15px;
.mw-parser-output h4,
     background-color: #C8D8C8;
.mw-parser-output h5,
     border: 1px solid #8A9B8A;
.mw-parser-output h6 { position: relative; }
     border-radius: 8px;
.mw-parser-output h3::after,
     font-size: 0.9em;
.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; }


#catlinks ul {
#personal h2,
     list-style: none;
#personal .header-avatar { overflow: visible; }
     padding: 0;
 
     margin: 0;
/* === 9. Links === */
     display: inline;
.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 {
    background-color: var(--paper-sunk);
     color: var(--ink);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 13px;
}
pre {
    position: relative;
    background-color: var(--paper-sunk) !important;
    color: var(--ink);
    border: 1px solid var(--rule) !important;
    border-radius: var(--radius-none);
     padding: var(--space-4) !important;
    font-family: var(--font-mono) !important;
    font-size: 13px;
     line-height: 1.6;
     overflow-x: auto;
}
}


#catlinks ul li {
/* === 11. Tables (override Common.css's solid deep-green header row and zebra striping) === */
     display: inline-block;
.mw-parser-output table.wikitable {
     margin-right: 10px;
    width: auto;
     line-height: 1.5;
    background: var(--paper-raised);
    color: var(--ink);
    border: none;
    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,
.mw-parser-output table.wikitable > tr > td {
    color: var(--ink);
    padding: 9px 12px;
    border: none;
    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); }


#catlinks ul li a {
/* === 12. Category bar and footer === */
     color: #006400;
#catlinks {
     text-decoration: none;
     background-color: var(--paper-sunk);
    border: 1px solid var(--rule);
    border-radius: var(--radius-none);
    padding: var(--space-3) var(--space-4);
    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; }


#catlinks ul li a:hover {
/* === 13. Pink from Common.css (temporary override; better to fix Common.css itself later) === */
    text-decoration: underline;
textarea:hover,
    color: #004D00; /* 已修复残缺颜色 */
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;
    }
 
    #mw-content-block { background: transparent !important; }
 
    .mw-parser-output table.wikitable {
        display: block;
        overflow-x: auto;
        white-space: normal;
    }
}
}


div.messagebox {
/* === 15. Reading progress bar and copy button === */
     margin: 1em 0;
#reading-progress-container {
     border: 1px solid #8A9B8A;
     position: fixed;
     background-color: #E0EBE0;
    left: 0;
     padding: 10px;
    bottom: 0;
     border-radius: 5px;
     width: 100%;
     font-size: 0.95em;
    height: 3px;
     background: var(--rule);
    z-index: 9999;
     pointer-events: none;
}
#reading-progress-bar {
     height: 100%;
     width: 0;
    background: var(--accent-fill);
}
}
 
.code-copy-btn {
input[type="submit"],
    position: absolute;
input[type="button"],
    top: 8px;
input[type="reset"],
    right: 8px;
.mw-ui-button {
    font-family: var(--font-sans);
     display: inline-block;
     font-size: 12px;
     padding: 8px 15px;
    font-weight: 500;
     margin: 5px;
     letter-spacing: 0.04em;
     color: #FFFFFF;
     padding: 4px 10px;
     background-color: #006400;
     color: var(--on-accent);
     border: 1px solid #004D00;
     background: var(--accent-fill);
     border-radius: 5px;
     border: none;
     border-radius: var(--radius-sm);
     cursor: pointer;
     cursor: pointer;
     font-size: 1em;
     opacity: 0;
    text-align: center;
     transition: opacity 0.2s ease;
    text-decoration: none;
     transition: background-color 0.3s ease;
}
}
pre:hover .code-copy-btn,
.code-copy-btn:focus-visible { opacity: 1; }


input[type="submit"]:hover,
@media (prefers-reduced-motion: reduce) {
input[type="button"]:hover,
     * { transition: none !important; animation: none !important; }
input[type="reset"]:hover,
.mw-ui-button:hover {
     background-color: #004D00;
    border-color: #003300;
    text-decoration: none;
}
}
</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