linkrobins/font-sizer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

linkrobins/font-sizer

Composer 安装命令:

composer require linkrobins/font-sizer

包简介

Accessibility-focused font size controls for Flarum 2.0. Users can adjust reading text size and interface size via a header button, with preferences saved in cookies. Admins set sitewide defaults from the extension settings.

README 文档

README

A Flarum 2.0 extension that gives users accessibility-focused font size controls directly in the forum header — no CSS editing required. Admins set sitewide defaults; users override them with their own preferences, saved in cookies.

Features

  • Header button — a fa-text-height icon in the forum header opens a modal for all users, including guests
  • Reading text slider — scales post body text and discussion titles from 100% to 150% in 5% increments
  • Interface size toggle — Default or Large (115%) mode for navigation, buttons, and other UI elements
  • Cookie persistence — preferences are saved for 1 year so returning visitors keep their settings
  • Admin defaults — set a sitewide default for both reading text size and interface size from the extension settings page
  • Live preview — the admin panel previews changes as you drag the slider
  • Debounced save — settings save 500ms after you stop dragging to prevent API conflicts
  • Theme agnostic — uses Flarum CSS variables throughout; works on all light and dark themes

How it works

The reading text slider runs from 100% (Flarum default) to 150% in 5% increments. The interface size toggle offers Default or Large (115%). Both values are stored as cookies (lr_text_scale and lr_ui_size) on the user's browser. If no cookie exists, the user sees whatever the admin has configured as the sitewide default.

Admin defaults are saved to Flarum's settings table under linkrobins-font-sizer.scale and linkrobins-font-sizer.ui, and served to the forum frontend in the page payload.

Installation

composer require linkrobins/font-sizer

Compatibility

  • Flarum 2.0 RC1+
  • No dependencies beyond flarum/core

License

MIT

统计信息

  • 总下载量: 544
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: TypeScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固