mirror of
https://github.com/avinal/sciezka.git
synced 2026-07-03 23:30:09 +05:30
4f69f3b3f4
Custom fzy algorithm with fulltext and prefix modes, boxy dark-aware UI with keyboard navigation, mode switching, match highlighting, and auto-resizing iframe overlay. Assisted-by: Claude Code Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
340 lines
6.3 KiB
CSS
340 lines
6.3 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Color tokens */
|
|
:root {
|
|
--bg: #fff;
|
|
--bg-alt: #fafafa;
|
|
--border: #e8e8e8;
|
|
--text: #1a1a1a;
|
|
--text-secondary: #999;
|
|
--text-muted: #aaa;
|
|
--text-dim: #777;
|
|
--icon: #999;
|
|
--badge-bg: #f0f0f0;
|
|
--kbd-bg: #e8e8e8;
|
|
--kbd-text: #666;
|
|
--hover: #f7f7f7;
|
|
--selected: #eff6ff;
|
|
--accent: #3b82f6;
|
|
--mark-bg: #fde68a;
|
|
--mark-text: inherit;
|
|
--scrollbar: #ddd;
|
|
--scrollbar-hover: #ccc;
|
|
--badge-tabs-bg: #dbeafe;
|
|
--badge-tabs-text: #2563eb;
|
|
--badge-history-bg: #fef3c7;
|
|
--badge-history-text: #d97706;
|
|
--badge-bookmarks-bg: #dcfce7;
|
|
--badge-bookmarks-text: #16a34a;
|
|
--badge-closed-bg: #f3e8ff;
|
|
--badge-closed-text: #9333ea;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
--bg: #1e1e1e;
|
|
--bg-alt: #252525;
|
|
--border: #333;
|
|
--text: #e0e0e0;
|
|
--text-secondary: #666;
|
|
--text-muted: #555;
|
|
--text-dim: #888;
|
|
--icon: #666;
|
|
--badge-bg: #333;
|
|
--kbd-bg: #3a3a3a;
|
|
--kbd-text: #888;
|
|
--hover: #272727;
|
|
--selected: #1e3a5f;
|
|
--accent: #3b82f6;
|
|
--mark-bg: #854d0e;
|
|
--mark-text: #fef3c7;
|
|
--scrollbar: #444;
|
|
--scrollbar-hover: #555;
|
|
--badge-tabs-bg: #1e3a5f;
|
|
--badge-tabs-text: #60a5fa;
|
|
--badge-history-bg: #422006;
|
|
--badge-history-text: #fbbf24;
|
|
--badge-bookmarks-bg: #052e16;
|
|
--badge-bookmarks-text: #4ade80;
|
|
--badge-closed-bg: #2e1065;
|
|
--badge-closed-text: #c084fc;
|
|
}
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
--bg: #1e1e1e;
|
|
--bg-alt: #252525;
|
|
--border: #333;
|
|
--text: #e0e0e0;
|
|
--text-secondary: #666;
|
|
--text-muted: #555;
|
|
--text-dim: #888;
|
|
--icon: #666;
|
|
--badge-bg: #333;
|
|
--kbd-bg: #3a3a3a;
|
|
--kbd-text: #888;
|
|
--hover: #272727;
|
|
--selected: #1e3a5f;
|
|
--accent: #3b82f6;
|
|
--mark-bg: #854d0e;
|
|
--mark-text: #fef3c7;
|
|
--scrollbar: #444;
|
|
--scrollbar-hover: #555;
|
|
--badge-tabs-bg: #1e3a5f;
|
|
--badge-tabs-text: #60a5fa;
|
|
--badge-history-bg: #422006;
|
|
--badge-history-text: #fbbf24;
|
|
--badge-bookmarks-bg: #052e16;
|
|
--badge-bookmarks-text: #4ade80;
|
|
--badge-closed-bg: #2e1065;
|
|
--badge-closed-text: #c084fc;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
|
background: transparent;
|
|
font-size: 14px;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
#sciezka-root {
|
|
background: var(--bg);
|
|
border-radius: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Search bar */
|
|
#search-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
gap: 10px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
#search-icon {
|
|
flex-shrink: 0;
|
|
color: var(--icon);
|
|
}
|
|
|
|
#search-input {
|
|
flex: 1;
|
|
padding: 14px 0;
|
|
font-size: 17px;
|
|
border: none;
|
|
outline: none;
|
|
background: transparent;
|
|
color: var(--text);
|
|
font-family: inherit;
|
|
}
|
|
|
|
#search-input::placeholder {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
#method-badge {
|
|
font-size: 10px;
|
|
padding: 3px 8px;
|
|
border-radius: 0;
|
|
background: var(--badge-bg);
|
|
color: var(--text-dim);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
font-weight: 600;
|
|
flex-shrink: 0;
|
|
cursor: default;
|
|
}
|
|
|
|
/* Mode bar */
|
|
#mode-bar {
|
|
display: flex;
|
|
gap: 2px;
|
|
padding: 6px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-alt);
|
|
}
|
|
|
|
.mode-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
padding: 4px 10px;
|
|
border: none;
|
|
border-radius: 0;
|
|
background: transparent;
|
|
color: var(--text-dim);
|
|
font-size: 12px;
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
transition: background 0.12s, color 0.12s;
|
|
}
|
|
|
|
.mode-btn kbd {
|
|
font-size: 10px;
|
|
padding: 0 4px;
|
|
border-radius: 0;
|
|
background: var(--kbd-bg);
|
|
color: var(--text-secondary);
|
|
font-family: inherit;
|
|
line-height: 16px;
|
|
}
|
|
|
|
.mode-btn:hover {
|
|
background: var(--hover);
|
|
color: var(--text);
|
|
}
|
|
|
|
.mode-btn.active {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
}
|
|
|
|
.mode-btn.active kbd {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
color: #fff;
|
|
}
|
|
|
|
/* Results */
|
|
#results {
|
|
max-height: 360px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.result-row {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 7px 16px;
|
|
cursor: pointer;
|
|
gap: 10px;
|
|
border-left: 3px solid transparent;
|
|
transition: background 0.08s;
|
|
}
|
|
|
|
.result-row:hover {
|
|
background: var(--hover);
|
|
}
|
|
|
|
.result-row.selected {
|
|
background: var(--selected);
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
.result-icon {
|
|
flex-shrink: 0;
|
|
width: 20px;
|
|
height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.result-icon img {
|
|
border-radius: 0;
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
.result-text {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1px;
|
|
}
|
|
|
|
.result-title {
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.result-url {
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.result-badge {
|
|
flex-shrink: 0;
|
|
font-size: 10px;
|
|
padding: 2px 7px;
|
|
border-radius: 0;
|
|
font-weight: 500;
|
|
letter-spacing: 0.3px;
|
|
}
|
|
|
|
.badge-tabs { background: var(--badge-tabs-bg); color: var(--badge-tabs-text); }
|
|
.badge-history { background: var(--badge-history-bg); color: var(--badge-history-text); }
|
|
.badge-bookmarks { background: var(--badge-bookmarks-bg); color: var(--badge-bookmarks-text); }
|
|
.badge-closed { background: var(--badge-closed-bg); color: var(--badge-closed-text); }
|
|
|
|
.no-results {
|
|
padding: 32px;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
mark {
|
|
background: var(--mark-bg);
|
|
color: var(--mark-text);
|
|
border-radius: 0;
|
|
padding: 0 1px;
|
|
}
|
|
|
|
/* Footer */
|
|
#footer {
|
|
display: flex;
|
|
gap: 12px;
|
|
padding: 6px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: var(--bg-alt);
|
|
justify-content: center;
|
|
}
|
|
|
|
.hint {
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.hint kbd {
|
|
font-size: 10px;
|
|
padding: 1px 5px;
|
|
border-radius: 0;
|
|
background: var(--kbd-bg);
|
|
color: var(--kbd-text);
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* Scrollbar */
|
|
#results::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
#results::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
#results::-webkit-scrollbar-thumb {
|
|
background: var(--scrollbar);
|
|
border-radius: 0;
|
|
}
|
|
|
|
#results::-webkit-scrollbar-thumb:hover {
|
|
background: var(--scrollbar-hover);
|
|
}
|