LINUX SB 快照站

网站的字体能不能加大一点

原帖: linux.sb/topic/11686 · 共 4 楼 · 标题快照 2026-08-12 12:00:59

楼主 · 历史 (1)
发帖 2026-08-12 11:59:34 · 快照 2026-08-12 12:06:29

现在看帖子列表和内容,感觉很费眼,最好是字体再大一点,页面宽度再大一点。
以及,导航栏能不能固定住,如果翻到很下面,想返回首页还要翻回去(也许可以有个返回顶部按钮?)。
😁😁😁
顺便再加一个,如果有大段代码,最好默认折叠,不然会占用很大版面空间。😁😁😁

#1
发帖 2026-08-12 12:00:31 · 快照 2026-08-12 12:00:59

有插件

// ==UserScript==
// @name         LINUX SB 布局优化
// @namespace    https://linux.sb/
// @version      1.3.0
// @description  通过可视化面板调节宽屏布局、字号、间距和主题颜色,默认使用高级中性深灰方案。
// @author       Codex
// @match        https://linux.sb/*
// @match        http://linux.sb/*
// @grant        GM_addStyle
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_registerMenuCommand
// @run-at       document-start
// @license      MIT
// @downloadURL https://update.greasyfork.org/scripts/590391/LINUX%20SB%20%E5%AE%BD%E5%B1%8F%E5%B8%83%E5%B1%80%E4%BC%98%E5%8C%96.user.js
// @updateURL https://update.greasyfork.org/scripts/590391/LINUX%20SB%20%E5%AE%BD%E5%B1%8F%E5%B8%83%E5%B1%80%E4%BC%98%E5%8C%96.meta.js
// ==/UserScript==

(function () {
    'use strict';

    var STORAGE_KEY = 'linux-sb-wide-layout-settings-v2';

    var SETTINGS_VERSION = 2;

    var DEFAULTS = {
        version: SETTINGS_VERSION,
        maxWidth: 1100,
        headerHeight: 68,
        fontSize: 15,
        radius: 6,
        sidebarWidth: 270,
        shellPadding: 28,
        columnGap: 28,
        theme: 'neutral',
        accent: '#b8b8b8',
        textPalette: 'neutral',
        textColor: '#eeeeee',
        homePersonalized: false,
        sidebarSwap: false,
        panelLeft: null,
        panelTop: null,
        toggleLeft: null,
        toggleTop: null,
        titleFilters: []
    };

    var TEXT_PALETTES = {
        neutral: { label: '中性银白', color: '#eeeeee' },
        mist: { label: '雾灰', color: '#d6d6d6' },
        silver: { label: '柔银', color: '#c7c7c7' },
        warm: { label: '暖白', color: '#eee9e1' },
        custom: { label: '自定义颜色', color: '#eeeeee' }
    };

    var HOME_LOGO_SVG = [
        '<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="LINUX SB logo">',
        '<circle fill="#EFEFEF" cx="256" cy="256" r="256"/>',
        '<path d="M279.69124,269.784594 C289.092146,253.471257 283.562201,232.595717 267.248865,223.194811 C250.935529,213.793906 230.059989,219.32385 220.659083,235.637186 L212.087669,250.429788 C202.686764,266.743124 208.216708,287.618664 224.530044,297.01957 C240.84338,306.420476 261.718921,300.890531 271.119826,284.577195 L279.69124,269.784594 Z" fill="#737373"/>',
        '<path d="M298.6313,68.356366 C308.032206,52.04303 302.502261,31.1674897 286.188925,21.7665841 C269.875589,12.3656785 249.000048,17.895623 239.599143,34.208959 L145.866584,196.651078 C136.465678,212.964414 141.995623,233.839955 158.308959,243.24086 C174.622295,252.641766 195.497836,247.111821 204.898741,230.798485 L298.6313,68.356366 Z" fill="#1E1E20"/>',
        '<path d="M355.419725,307.249829 C364.82523,290.910346 359.29258,270.001346 342.971263,260.585373 C326.649946,251.1694 305.764193,256.708207 296.358689,273.047691 L202.580275,435.750171 C193.17477,452.089654 198.70742,472.998654 215.028737,482.414627 C231.350054,491.8306 252.235807,486.291793 261.641311,469.952309 L355.419725,307.249829 Z" fill="#FEB005"/>',
        '</svg>'
    ].join('');

    var RANGE_DEFINITIONS = [
        { key: 'maxWidth', label: '页面最大宽度', min: 960, max: 2200, step: 20, unit: 'px' },
        { key: 'headerHeight', label: '顶部栏高度', min: 48, max: 100, step: 2, unit: 'px' },
        { key: 'fontSize', label: '正文基准字号', min: 13, max: 22, step: 1, unit: 'px' },
        { key: 'radius', label: '全局圆角', min: 0, max: 14, step: 1, unit: 'px' },
        { key: 'sidebarWidth', label: '侧栏宽度', min: 220, max: 420, step: 10, unit: 'px' },
        { key: 'shellPadding', label: '内容内边距', min: 12, max: 56, step: 2, unit: 'px' },
        { key: 'columnGap', label: '正文与侧栏间距', min: 12, max: 56, step: 2, unit: 'px' }
    ];

    /*
     * 默认中性深灰严格使用中性灰阶作为界面底色。
     * 彩色只用于成功、警告、错误等语义反馈,避免背景偏蓝或偏紫。
     */
    var THEMES = {
        neutral: {
            label: '中性深灰(默认)',
            accent: '#b8b8b8',
            textColor: '#eeeeee',
            vars: {
                '--bg': '#121212',
                '--panel': '#1b1b1b',
                '--line': '#343434',
                '--line-soft': '#272727',
                '--text': '#eeeeee',
                '--text-muted': '#b6b6b6',
                '--text-subtle': '#898989',
                '--text-disabled': '#666666',
                '--success': '#9fbea9',
                '--success-soft': '#223128',
                '--danger': '#e28b8b',
                '--danger-soft': '#3a2424',
                '--warning': '#d8b276',
                '--warning-soft': '#382e20',
                '--info': '#9bb4d0',
                '--info-soft': '#25303b',
                '--inverse': '#090909',
                '--inverse-border': '#3a3a3a',
                '--inverse-text': '#f5f5f5',
                '--color-dark-rgb': '0,0,0',
                '--backdrop': 'rgba(0,0,0,.68)',
                '--shadow-base': 'rgba(0,0,0,.28)',
                '--shadow-medium': 'rgba(0,0,0,.48)'
            }
        },
        graphite: {
            label: '石墨青',
            accent: '#7faea6',
            textColor: '#ecf0f2',
            vars: {
                '--bg': '#111416',
                '--panel': '#191d20',
                '--line': '#30363b',
                '--line-soft': '#24292d',
                '--text': '#ecf0f2',
                '--text-muted': '#a9b1b7',
                '--text-subtle': '#77818a',
                '--text-disabled': '#5f686f',
                '--success': '#8bb59b',
                '--success-soft': '#203329',
                '--danger': '#df8888',
                '--danger-soft': '#382326',
                '--warning': '#d2ab70',
                '--warning-soft': '#362d20',
                '--info': '#8fafd0',
                '--info-soft': '#24303c',
                '--inverse': '#090b0c',
                '--inverse-border': '#343b40',
                '--inverse-text': '#f4f7f8',
                '--color-dark-rgb': '3,5,6',
                '--backdrop': 'rgba(3,5,6,.68)',
                '--shadow-base': 'rgba(0,0,0,.30)',
                '--shadow-medium': 'rgba(0,0,0,.50)'
            }
        },
        warm: {
            label: '暖石墨',
            accent: '#b8a27f',
            textColor: '#eee9e1',
            vars: {
                '--bg': '#151310',
                '--panel': '#1e1b17',
                '--line': '#37322b',
                '--line-soft': '#29251f',
                '--text': '#eee9e1',
                '--text-muted': '#b8afa3',
                '--text-subtle': '#8b8277',
                '--text-disabled': '#685f55',
                '--success': '#a3b68e',
                '--success-soft': '#293022',
                '--danger': '#df8e84',
                '--danger-soft': '#3a2521',
                '--warning': '#d4ad70',
                '--warning-soft': '#392f20',
                '--info': '#99adc2',
                '--info-soft': '#283039',
                '--inverse': '#0b0a08',
                '--inverse-border': '#3b362f',
                '--inverse-text': '#f7f3ec',
                '--color-dark-rgb': '5,4,3',
                '--backdrop': 'rgba(5,4,3,.68)',
                '--shadow-base': 'rgba(0,0,0,.28)',
                '--shadow-medium': 'rgba(0,0,0,.48)'
            }
        },
        original: {
            label: '跟随原站主题',
            accent: '#5eaaa0',
            textColor: '#c8c9d9',
            vars: null
        }
    };

    var THEME_VARIABLES = [
        '--bg', '--panel', '--line', '--line-soft',
        '--text', '--text-muted', '--text-subtle', '--text-disabled',
        '--brand', '--brand-hover', '--brand-soft',
        '--success', '--success-soft', '--danger', '--danger-soft',
        '--warning', '--warning-soft', '--info', '--info-soft',
        '--inverse', '--inverse-border', '--inverse-text',
        '--color-dark-rgb', '--backdrop', '--shadow-base', '--shadow-medium',
        '--focus-ring', '--swal2-background', '--swal2-color',
        '--swal2-validation-message-background', '--swal2-validation-message-color'
    ];

    var BASE_CSS = [
        '@media (min-width: 721px) {',
        '  :root {',
        '    --font-size-sm: calc(var(--lsb-base-font-size) - 2px) !important;',
        '    --font-size-md: var(--lsb-base-font-size) !important;',
        '    --font-size-lg: calc(var(--lsb-base-font-size) + 1px) !important;',
        '  }',
        '  body { font-size: var(--lsb-base-font-size) !important; }',
        '  .top .bar {',
        '    width: min(var(--lsb-wide-max), calc(100vw - 48px)) !important;',
        '    max-width: none !important;',
        '    min-height: var(--lsb-header-height) !important;',
        '    padding: 0 20px !important;',
        '    grid-template-rows: var(--lsb-header-height) !important;',
        '    column-gap: 16px !important;',
        '  }',
        '  .top .brand { font-size: var(--lsb-base-font-size) !important; }',
        '  .top .brand::before { width: 28px !important; height: 28px !important; flex-basis: 28px !important; }',
        '  .top .search-form { width: 280px !important; height: 36px !important; }',
        '  main.wrap, .footer, .forum-more-panel {',
        '    width: min(var(--lsb-wide-max), calc(100vw - 48px)) !important;',
        '    max-width: none !important;',
        '  }',
        '  main.wrap { padding: 18px 0 28px !important; }',
        '  .home-shell { padding: var(--lsb-shell-padding) !important; }',
        '  .home-shell .forum-layout, .forum-layout { gap: var(--lsb-column-gap) !important; }',
        '  .home-shell .forum-layout {',
        '    display: grid !important; grid-template-columns: minmax(0, 1fr) var(--lsb-sidebar-width) !important;',
        '    align-items: start !important;',
        '  }',
        '  .home-shell .forum-main { grid-column: 1 !important; grid-row: 1 !important; }',
        '  .
#2
发帖 2026-08-12 12:00:50 · 快照 2026-08-12 12:03:43

有插件 你找下 我发不出来

#3
发帖 2026-08-12 13:14:10 · 快照 2026-08-12 13:17:26

有个最简单办法,直接按住键盘 <kbd>Ctrl</kbd> + <kbd>+</kbd> 可以实现,想恢复按 <kbd>Ctrl</kbd> + <kbd>0</kbd> hhh 🤪