From 0dd0dd022429c0d1646093bd887f8a75f7237880 Mon Sep 17 00:00:00 2001 From: Surya Handika Putratama Date: Sat, 24 Jan 2026 12:02:35 +0800 Subject: [PATCH] feat: add related icons section to modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add "Maybe Related" section showing icons with similar names - Find related icons by base name matching (e.g., time-check → time-delete) - Add icons to modal section labels (settings-sliders, link) - Style related icons grid with hover effects Co-Authored-By: Claude Opus 4.5 --- explorer.css | 54 ++++++++++++++++++++++++++++++++++++++ explorer.html | 7 ++++- explorer.js | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 1 deletion(-) diff --git a/explorer.css b/explorer.css index 5c1d5ff..fc6ef50 100644 --- a/explorer.css +++ b/explorer.css @@ -1030,6 +1030,14 @@ body { font-weight: 700; margin-bottom: 8px; letter-spacing: 0.6px; + display: flex; + align-items: center; + gap: 6px; + + & .fi { + font-size: 12px; + color: var(--accent-primary); + } } .modal-variations { @@ -1038,6 +1046,48 @@ body { gap: 8px; } +.related-icons { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); + gap: 8px; +} + +.related-icon { + text-align: center; + padding: 10px 8px; + background: var(--bg-tertiary); + border-radius: var(--radius-sm); + cursor: pointer; + border: 1px solid var(--border-color); + transition: var(--transition); + + &:hover { + background: var(--bg-elevated); + border-color: var(--accent-primary); + transform: translateY(-2px); + box-shadow: var(--shadow-md); + + & .related-icon-symbol { + color: var(--accent-primary); + } + } + + & .related-icon-symbol { + font-size: 20px; + display: block; + margin-bottom: 6px; + color: var(--text-primary); + } + + & .related-icon-name { + font-size: 9px; + color: var(--text-muted); + font-weight: 500; + word-break: break-all; + line-height: 1.3; + } +} + .modal-var { text-align: center; padding: 10px 6px; @@ -1374,6 +1424,10 @@ body { grid-template-columns: repeat(4, 1fr); } + .related-icons { + grid-template-columns: repeat(4, 1fr); + } + .modal-actions-inline { margin-left: 0; width: 100%; diff --git a/explorer.html b/explorer.html index 3f7f9c3..a2879a3 100644 --- a/explorer.html +++ b/explorer.html @@ -135,10 +135,15 @@