Skip to content

Instantly share code, notes, and snippets.

@onespaceman
onespaceman / panel.lua
Created April 26, 2026 18:09
shadowdom panel example
command.define {
name = "TEST PANEL: OPEN",
run = function(args) showPanel() end
}
function showPanel()
local panel = dom.div { id = "panel-content" }
-- implement script in lua like this ->
panel.onclick = function() panel.textContent = panel.textContent .. "\n Clicked on panel from lua" end
@onespaceman
onespaceman / admonitions.md
Last active March 6, 2024 18:14
Silverbullet Admonitions

Admonition styles for silverbullet
Add them to your custom STYLES
All icons from https://icons.getbootstrap.com/

Abstract

.sb-admonition[admonition="abstract"] {
  --admonition-icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0z"/></svg>'); 
  --admonition-color: dodgerblue;
}
@onespaceman
onespaceman / STYLES.css
Last active May 21, 2026 03:15
silverbullet theme
html {
--crust: #dce0e8;
--mantle: #e6e9ef;
--base: #eff1f5;
--surface0: #ccd0da;
--surface1: #bcc0cc;
--surface2: #acb0be;
--overlay0: #9ca0b0;
--overlay1: #8c8fa1;
--overlay2: #7c7f93;