Opal Companion

by Cyrius
5
4
3
2
1
Score: 51/100
Trending Plugin

Description

Companion plugin for the Opal Obsidian theme: a visual picker for per-note states, callouts, highlights, task states and image layouts.

Reviews

No reviews yet.

Stats

0
stars
95
downloads
0
forks
68
days
2
days
2
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
3
commits

Latest Version

3 days ago

Changelog

Drag the toolbar grip with touch, mouse or pen to move the Opal tools clear of other controls. Mobile and desktop positions are remembered separately. Positioning adapts to screen orientation, the visible viewport, keyboard-sized viewport changes and safe-area insets, with clearance for visible bottom navigation.

All six existing action entries are retained. Buttons use 44 px targets, and narrow screens support horizontal scrolling. The grip supports arrow-key movement, Shift for larger steps and Home to reset; a reset-position command is also available.

Verification: 15 Chromium browser regression checks passed, covering real browser touch events, mouse input, keyboard controls, position restoration, cancellation, bounds, rotation and cleanup. Obsidian persistence and software-keyboard viewport geometry were simulated; physical iOS and Android checks remain additional acceptance targets.

用手指拖动工具条起始处的手柄即可调整位置。移动端和桌面分别记忆位置,横竖屏切换与键盘可见区域变化时保持在屏幕范围内,并为底部导航留出间距。可通过「Opal:恢复工具条位置」命令恢复默认位置。

README file from

Github

Opal Companion

A small companion plugin for the Opal theme. It turns the per-note things you'd otherwise type by hand into a visual picker — every option renders a live preview before you apply it.

Opal 主题的配套小插件:把「每次用时要手打」的东西做成可视预览面板,每个选项先渲染真实效果,看到再点选。

What it does / 能做什么

One click, with a live preview, for:

  • Page states / layout / recolour — writes cssclasses frontmatter (important / alert / draft / archived / pinned / wide / narrow / full-width / note types / per-note accent recolour).
  • Callouts — insert any callout type.
  • Coloured highlights — wrap the selection in a coloured <mark>.
  • Task states — set the current line's checkbox state.
  • Image layouts — banner / grid / float / dark-invert via the image alt text.

一键 + 实时预览:页面态/布局/换色(写 cssclasses)、插入 callout、彩色高亮选区、设置任务态、图片版式。

How to use / 怎么用

Three entry points: the movable floating toolbar, the command palette (search "Opal"), and the editor right-click menu. Drag the grip at the start of the toolbar with touch, mouse or pen to choose its position. Mobile and desktop positions are remembered separately and adapt to the visible viewport, keyboard and screen orientation. The toolbar keeps a margin around screen safe areas and visible bottom navigation. Its 44 px buttons remain available through horizontal scrolling on narrow screens.

三个入口:可拖动悬浮工具条、命令面板(搜索「Opal」)和编辑器右键菜单。用手指、鼠标或触控笔拖动工具条起始处的手柄即可调整位置。移动端与桌面分别记忆位置,随可见窗口、键盘和横竖屏变化调整,并为屏幕安全区域和底部导航留出间距。按钮触控区域为 44 px,窄屏时可横向滚动功能按钮。

Toggle visibility from the ribbon icon or the "Opal:显示/隐藏浮动工具条" command. Use "Opal:恢复工具条位置" to return to the default position. With keyboard focus on the grip, use arrow keys to move, Shift with an arrow for a larger step, or Home to reset. The six existing note actions retain their visual pickers.

可通过侧边栏图标或「Opal:显示/隐藏浮动工具条」命令切换显示,通过「Opal:恢复工具条位置」命令回到默认位置。键盘聚焦手柄后,方向键可移动,Shift 加方向键可加大步长,Home 可恢复位置。原有六个笔记操作入口及可视预览保持原有功能。

Install / 安装

This plugin only styles things that the Opal theme understands, so install and enable Opal first. Then install this plugin (via the community list once listed, or BRAT, or manually copy the folder into <vault>/.obsidian/plugins/opal-companion/ and enable it).

配套 Opal 主题使用,请先装并启用 Opal

License

MIT © Cyrius.