Skip to content

Commit

Permalink
feature(banira): docs page layout improv
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Schürmann committed Jan 4, 2025
1 parent ba101c4 commit ce1b939
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
13 changes: 10 additions & 3 deletions packages/banira/src/formatter/doc-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,22 @@ export class FormatterDocPage {
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
>
/>
</head>
<body>
<header>
<header class="container">
<hgroup>
<h1>${title}</h1>
</hgroup>
</header>
<main>
<main class="container">
<section id="preview">
<${tagName}></${tagName}>
</section>
</main>
<footer class="container">
<small>Built with banira</small>
</footer>
</body>
</html>`
}
Expand Down
7 changes: 4 additions & 3 deletions packages/component-webaudio/src/wa-knob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class WAKnob extends HTMLElement {

constructor() {
super();
this.attachShadow({ mode: 'open' });
this.render();
}

get value() {
Expand Down Expand Up @@ -105,6 +103,8 @@ class WAKnob extends HTMLElement {
}

connectedCallback() {
this.attachShadow({ mode: 'open' });

// Initialize from attributes if present
if (this.hasAttribute('min')) {
this.min = parseFloat(this.getAttribute('min') || '0');
Expand All @@ -130,6 +130,7 @@ class WAKnob extends HTMLElement {
this.setAttribute('min', this._min.toString());
this.setAttribute('max', this._max.toString());
this.setAttribute('default', this._default.toString());
this.render();
}

private render() {
Expand Down Expand Up @@ -168,7 +169,7 @@ class WAKnob extends HTMLElement {
text-align: center;
}
</style>
<div class='knob-body'>
<div class="knob-body">
<svg class="knob-svg" viewBox="0 0 60 60">
<circle class="knob-base" cx="30" cy="30" r="25"/>
<line class="knob-indicator"
Expand Down

0 comments on commit ce1b939

Please sign in to comment.