Skip to content

Commit b26daaf

Browse files
committed
Add total snippets count below version and make both smaller/less bright
1 parent a7cd096 commit b26daaf

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

public/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h1 class="text-2xl font-bold truncate">takeCode</h1>
2828
</button>
2929
</div>
3030
<div class="relative w-full sm:w-auto mt-2 sm:mt-0 flex-shrink">
31-
<input type="text" id="search" placeholder="Enter RegEx... (Ctrl+K to focus)" class="w-full sm:w-64 px-3 py-2 pr-8 border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400 transition-colors">
31+
<input type="text" id="search" placeholder="Enter RegEx... [Ctrl+K]" class="w-full sm:w-64 px-3 py-2 pr-8 border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-gray-900 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400 transition-colors">
3232
<button id="clear-search" class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors" onclick="clearSearch()" style="display: none;">×</button>
3333
</div>
3434
</header>
@@ -50,7 +50,10 @@ <h1 class="text-2xl font-bold truncate">takeCode</h1>
5050
About & Credits
5151
</button>
5252
</div>
53-
<span class="text-gray-500 text-sm dark:text-gray-400">__VERSION__</span>
53+
<div class="flex flex-col items-end space-y-1">
54+
<span class="text-gray-400 text-xs dark:text-gray-500">__VERSION__</span>
55+
<span id="total-snippets" class="text-gray-400 text-xs dark:text-gray-500">Loading...</span>
56+
</div>
5457
</div>
5558
</footer>
5659
</aside>

public/js/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ document.addEventListener('DOMContentLoaded', () => {
172172
loadMoreIfNeeded();
173173
}, 100);
174174
renderTree(data.folders, activeSnippets);
175+
176+
// Update total snippets count
177+
document.getElementById('total-snippets').textContent = `${activeSnippets.length} snippets`;
175178
})
176179
.catch(error => {
177180
console.error('Error loading db.json:', error);

0 commit comments

Comments
 (0)