Add wnjParams configuration for Nostr widget initialization across layouts and login page.

This commit is contained in:
HolgerHatGarKeineNode
2025-11-21 17:54:21 +01:00
parent e36401a75c
commit 76cd159b6a
4 changed files with 56 additions and 69 deletions

View File

@@ -154,7 +154,24 @@
});
});
</script>
<script>
window.wnjParams = {
position: 'bottom',
// The only accepted value is 'bottom', default is top
accent: 'orange',
// Supported values: cyan (default), green, purple, red, orange, neutral, stone
startHidden: false,
// If the host page has a button that call `getPublicKey` to start a
// login procedure, the minimized widget can be hidden until connected
compactMode: false,
// Show the minimized widget in a compact form
disableOverflowFix: false,
// If the host page on mobile has an horizontal scrolling, the floating
// element/modal are pushed to the extreme right/bottom and exit the
// viewport. A style is injected in the html/body elements fix this.
// This option permit to disable this default behavior
}
</script>
<script src="https://cdn.jsdelivr.net/npm/window.nostr.js/dist/window.nostr.min.js"></script>
</body>