Axismundi Theme Switcher

外掛說明

The axismundi/theme-switcher block puts an Auto / Light / Dark control on the
page, as a connected button group or a single cycling button, and writes the
choice to html[data-theme]. The choice is kept in a first-party cookie and
reapplied before the next page paints, so returning to the site does not flash
the wrong scheme.

The block reads its colors, corner sizes and motion from the Material Design
system custom properties, so it looks as intended under any theme that publishes
them, and falls back to Material’s own baseline where a theme publishes none.
The Axismundi theme supports the html[data-theme] contract natively.

適用於區塊編輯器

這個外掛提供 1 個可供區塊編輯器使用的區塊。

  • Theme Switcher Switches between Auto, Light, and Dark theme modes.

安裝方式

  1. Install and activate the plugin.
  2. Insert the Theme Switcher block wherever a light / dark / auto control is
    needed — a header template part, a footer, or a page.
  3. For the switch to repaint the whole site, use a theme or stylesheet that
    responds to html[data-theme]. The Axismundi theme does so natively.

常見問題集

Does this plugin require an external service?

No. The switcher runs locally in WordPress and stores the selected mode in a
first-party cookie named axismundi_theme.

Can this plugin be used without the Axismundi theme?

Yes. The block reads its colors, corner sizes and motion from the Material
Design system custom properties — --md-sys-color-* and the shape and motion
scales beside it — so it looks as intended under any theme that publishes them.
Under a theme that publishes none it falls back to Material’s own baseline
colors, and it still renders and still toggles the data-theme attribute; the
site around it changes only if something consumes html[data-theme].

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Axismundi Theme Switcher〉的開發相關工作。

參與者

將〈Axismundi Theme Switcher〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.1.9

  • Stop the browser painting its own highlight over a button when a finger lands
    on it. The control answers a touch with its pressed state and nothing else.
  • Show the focus state layer only for keyboard focus. A tap focuses a button
    too, so the layer used to stay on the cycling button after the finger lifted,
    until something else was touched.

Earlier releases are listed in changelog.txt.