Skip to content

Commit 0690a1b

Browse files
committed
Tiny tweak to the docs directory listing: icon detection
1 parent 6a211ca commit 0690a1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/html/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ <h1>🌐 OCANNL Directory</h1>
234234

235235
let filteredFiles = htmlFiles;
236236

237-
function getFileIcon(filename) {
238-
const name = filename.toLowerCase();
237+
function getFileIcon(filename, title) {
238+
const name = filename.toLowerCase() + ' ' + title.toLowerCase();
239239
if (name.includes('rl-')) return '🧠';
240240
if (name.includes('introduction') || name.includes('basics')) return '🚀';
241241
if (name.includes('api') || name.includes('/dev/')) return '🔌';
@@ -265,7 +265,7 @@ <h3>No files found</h3>
265265
fileGrid.innerHTML = files.map(file => `
266266
<a href="${file.name}" class="file-card">
267267
<div class="file-header">
268-
<div class="file-icon">${getFileIcon(file.name)}</div>
268+
<div class="file-icon">${getFileIcon(file.name, file.title)}</div>
269269
<div class="file-name">${file.title}</div>
270270
</div>
271271
<div class="file-info">

0 commit comments

Comments
 (0)