Skip to content

Commit a99895e

Browse files
Fixes to Cmd+K palette
1 parent d6a8625 commit a99895e

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

_includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h4>{{ site.heading }}</h4>
3939
<div class="navbar-item" onclick="openSearchModal()">
4040
<div class="buttons">
4141
<a class="button is-text">
42-
<span class="cmd-palette-btn-mobile">⌘K</span>
42+
<span class="cmd-palette-btn">⌘K</span>
4343
</a>
4444
</div>
4545
</div>

assets/css/style.css

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,20 +1607,32 @@ label.margin-toggle:not(.sidenote-number) {
16071607
text-decoration: none;
16081608
}
16091609

1610-
.cmd-palette-btn-mobile {
1611-
font-weight: 1000;
1612-
font-size: 20px;
1613-
text-decoration: none;
1610+
/* Override Bulma button styles with high specificity */
1611+
.navbar-item .button.is-text:hover,
1612+
.navbar-item .button.is-text:focus,
1613+
.navbar-item .button.is-text:active,
1614+
.button.is-text:hover,
1615+
.button.is-text:focus,
1616+
.button.is-text:active,
1617+
.button:hover,
1618+
.button:focus,
1619+
.button:active,
1620+
.cmd-palette-btn:hover,
1621+
.cmd-palette-btn:focus,
1622+
.cmd-palette-btn:active {
1623+
outline: none !important;
1624+
box-shadow: none !important;
1625+
background-color: transparent !important;
1626+
background: none !important;
1627+
color: inherit !important;
16141628
}
16151629

16161630
/* Remove underline from command palette button links */
1617-
a:has(.cmd-palette-btn),
1618-
a:has(.cmd-palette-btn-mobile) {
1631+
a:has(.cmd-palette-btn) {
16191632
text-decoration: none !important;
16201633
}
16211634

1622-
a:has(.cmd-palette-btn):hover,
1623-
a:has(.cmd-palette-btn-mobile):hover {
1635+
a:has(.cmd-palette-btn):hover {
16241636
text-decoration: none !important;
16251637
}
16261638

assets/js/commandPalette.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ document.addEventListener('DOMContentLoaded', function() {
7070

7171
// Add the current theme class
7272
ninjaKeys.classList.add(currentTheme);
73-
74-
console.log('Synced ninja-keys theme to:', currentTheme);
7573
}
7674

7775
// Fix ninja-keys blur, scrollbar, and hide "move to parent" footer element
@@ -130,7 +128,6 @@ document.addEventListener('DOMContentLoaded', function() {
130128
`;
131129
style.appendChild(document.createTextNode(css));
132130
ninjaKeys.shadowRoot.appendChild(style);
133-
console.log('Applied ninja-keys blur fix and scrollbar removal');
134131
} else {
135132
console.warn('ninja-keys shadowRoot not available');
136133
}
@@ -200,9 +197,6 @@ document.addEventListener('DOMContentLoaded', function() {
200197
`;
201198
colorStyle.appendChild(document.createTextNode(colorCSS));
202199
ninjaKeys.shadowRoot.appendChild(colorStyle);
203-
console.log('Applied dynamic color scheme to ninja-keys using CSS variables:', {
204-
bgMain, textMain, textSub, bgSub, border
205-
});
206200
}
207201
}, 150);
208202
}
@@ -408,7 +402,6 @@ document.addEventListener('DOMContentLoaded', function() {
408402

409403
// Listen for theme changes to keep popup in sync
410404
const observer = new MutationObserver(() => {
411-
console.log('Theme change detected, updating popup...');
412405
// Update theme class
413406
syncTheme();
414407
// Re-apply colors with new theme values
@@ -419,6 +412,4 @@ document.addEventListener('DOMContentLoaded', function() {
419412
attributes: true,
420413
attributeFilter: ['data-theme']
421414
});
422-
423-
console.log('Command palette initialized with', allActions.length, 'actions');
424415
});

0 commit comments

Comments
 (0)