Skip to content

Commit f88db72

Browse files
committed
style: Changed CSS and icon assets to Lucide Icons with proper attribution
1 parent 25ca744 commit f88db72

173 files changed

Lines changed: 731 additions & 29 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/LUCIDE-LICENSE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
The icons in themes/default/graphics/ subdirectories (admin/, actions/, apps/,
2+
status/, nav/) are derived from Lucide Icons, converted to PNG format.
3+
4+
Source: https://github.com/lucide-icons/lucide
5+
License: ISC (with some icons under MIT via Feather Icons)
6+
7+
The full license text follows below.
8+
9+
========================================================================
10+
11+
ISC License
12+
13+
Copyright (c) 2020 Lucide Icons and Contributors
14+
15+
Permission to use, copy, modify, and/or distribute this software for any
16+
purpose with or without fee is hereby granted, provided that the above
17+
copyright notice and this permission notice appear in all copies.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
20+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
21+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
22+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
24+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
25+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26+
27+
========================================================================
28+
29+
Some Lucide icons are derived from Feather Icons by Cole Bemis:
30+
31+
The MIT License (MIT)
32+
33+
Copyright (c) 2013-present Cole Bemis
34+
35+
Permission is hereby granted, free of charge, to any person obtaining a copy
36+
of this software and associated documentation files (the "Software"), to deal
37+
in the Software without restriction, including without limitation the rights
38+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
39+
copies of the Software, and to permit persons to whom the Software is
40+
furnished to do so, subject to the following conditions:
41+
42+
The above copyright notice and this permission notice shall be included in all
43+
copies or substantial portions of the Software.
44+
45+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
46+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
47+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
48+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
49+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
50+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
51+
SOFTWARE.

lib/Api.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ public function admin_list()
7171
'cache' => [
7272
'link' => '%application%/admin/cache.php',
7373
'name' => _("Cache"),
74-
'icon' => 'data',
74+
'icon' => 'cache',
7575
],
7676
'hashtable' => [
7777
'link' => '%application%/admin/hashtable.php',
7878
'name' => _("Hashtable"),
79-
'icon' => 'data',
79+
'icon' => 'hashtable',
8080
],
8181
'sessions' => [
8282
'link' => '%application%/admin/sessions.php',
8383
'name' => _("Sessions"),
84-
'icon' => 'user',
84+
'icon' => 'sessions',
8585
],
8686
'phpshell' => [
8787
'link' => '%application%/admin/phpshell.php',
@@ -111,7 +111,7 @@ public function admin_list()
111111
'apis' => [
112112
'link' => '%application%/admin/apis/',
113113
'name' => _("_API Registry"),
114-
'icon' => 'data',
114+
'icon' => 'api-registry',
115115
],
116116
];
117117

scripts/generate-admin-icons.sh

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
#!/bin/bash
2+
#
3+
# Generate Horde icons from Tabler Icons (MIT license)
4+
# https://github.com/tabler/tabler-icons
5+
#
6+
# Requires: ImageMagick (convert), curl
7+
#
8+
# Usage:
9+
# ./generate-admin-icons.sh [size] [category]
10+
#
11+
# Categories:
12+
# admin - Admin dashboard icons (output: themes/default/graphics/admin/)
13+
# actions - Common action icons (output: themes/default/graphics/actions/)
14+
# apps - Application identity icons (output: themes/default/graphics/apps/)
15+
# status - Status/notification icons (output: themes/default/graphics/status/)
16+
# nav - Navigation icons (output: themes/default/graphics/nav/)
17+
# all - Generate all categories (default)
18+
#
19+
# Default size: 48px
20+
#
21+
22+
set -euo pipefail
23+
24+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
25+
BASE_URL="https://raw.githubusercontent.com/tabler/tabler-icons/main/icons/outline"
26+
THEMES_DIR="${SCRIPT_DIR}/../themes/default/graphics"
27+
SIZE="${1:-48}"
28+
CATEGORY="${2:-all}"
29+
TMPDIR="$(mktemp -d)"
30+
STROKE_COLOR="#333333"
31+
32+
trap 'rm -rf "$TMPDIR"' EXIT
33+
34+
generate_icons() {
35+
local dest="$1"
36+
shift
37+
local -n icons_ref=$1
38+
39+
mkdir -p "$dest"
40+
41+
local failed=0
42+
for key in "${!icons_ref[@]}"; do
43+
local icon="${icons_ref[$key]}"
44+
local url="${BASE_URL}/${icon}.svg"
45+
local svgfile="${TMPDIR}/${key}.svg"
46+
local pngfile="${dest}/${key}.png"
47+
48+
printf " %-20s <- tabler/%s.svg ... " "$key" "$icon"
49+
50+
if ! curl -sfL "$url" -o "$svgfile"; then
51+
echo "DOWNLOAD FAILED"
52+
failed=$((failed + 1))
53+
continue
54+
fi
55+
56+
if [ ! -s "$svgfile" ]; then
57+
echo "EMPTY FILE"
58+
failed=$((failed + 1))
59+
continue
60+
fi
61+
62+
# Replace currentColor with our stroke color for consistent rendering
63+
sed -i "s/currentColor/${STROKE_COLOR}/g" "$svgfile"
64+
65+
if convert -background none -density 192 "$svgfile" -resize "${SIZE}x${SIZE}" "$pngfile" 2>/dev/null; then
66+
echo "OK"
67+
else
68+
echo "CONVERT FAILED"
69+
failed=$((failed + 1))
70+
fi
71+
done
72+
73+
return $failed
74+
}
75+
76+
# =============================================================================
77+
# ADMIN DASHBOARD ICONS
78+
# Used by: AdminDashboardController, lib/Api.php admin_list()
79+
# Output: themes/default/graphics/admin/
80+
# =============================================================================
81+
declare -A ADMIN_ICONS=(
82+
[config]="settings"
83+
[user]="user"
84+
[group]="users-group"
85+
[perms]="shield-lock"
86+
[locked]="lock"
87+
[alarm]="bell"
88+
[data]="database"
89+
[cache]="server-bolt"
90+
[hashtable]="hash"
91+
[sessions]="users"
92+
[api-registry]="plug-connected"
93+
[php]="code"
94+
[sql]="sql"
95+
[shell]="terminal-2"
96+
[mobile]="device-mobile"
97+
[oauth]="key"
98+
[auth-status]="shield-check"
99+
)
100+
101+
# =============================================================================
102+
# COMMON ACTION ICONS
103+
# Used by: toolbars, buttons, context menus across all apps
104+
# Output: themes/default/graphics/actions/
105+
# =============================================================================
106+
declare -A ACTION_ICONS=(
107+
[add]="plus"
108+
[edit]="pencil"
109+
[delete]="trash"
110+
[search]="search"
111+
[download]="download"
112+
[upload]="upload"
113+
[import]="file-import"
114+
[export]="file-export"
115+
[refresh]="refresh"
116+
[close]="x"
117+
[copy]="copy"
118+
[cut]="cut"
119+
[print]="printer"
120+
[help]="help-circle"
121+
[info]="info-circle"
122+
[login]="login"
123+
[logout]="logout"
124+
[compose]="edit"
125+
[reply]="arrow-back-up"
126+
[replyall]="arrows-left"
127+
[forward]="arrow-forward-up"
128+
[attachment]="paperclip"
129+
[bookmark]="bookmark"
130+
[share]="share"
131+
[link]="link"
132+
[settings]="settings"
133+
[filter]="filter"
134+
[sort-asc]="sort-ascending"
135+
[sort-desc]="sort-descending"
136+
[expand]="chevron-down"
137+
[collapse]="chevron-up"
138+
[undo]="arrow-back"
139+
[redo]="arrow-forward"
140+
[move]="arrows-move"
141+
[tag]="tag"
142+
)
143+
144+
# =============================================================================
145+
# APPLICATION IDENTITY ICONS
146+
# Used by: app switcher, portal tiles, responsive portal grid
147+
# Output: themes/default/graphics/apps/
148+
# =============================================================================
149+
declare -A APP_ICONS=(
150+
[mail]="mail"
151+
[calendar]="calendar"
152+
[contacts]="address-book"
153+
[tasks]="list-check"
154+
[notes]="note"
155+
[files]="folder"
156+
[wiki]="notebook"
157+
[bookmarks]="bookmarks"
158+
[news]="news"
159+
[password]="lock-access"
160+
[passwd]="key"
161+
[content]="tags"
162+
[skeleton]="puzzle"
163+
[filters]="filter"
164+
[administration]="shield-cog"
165+
[webmail]="inbox"
166+
[timetracker]="clock"
167+
)
168+
169+
# =============================================================================
170+
# STATUS/NOTIFICATION ICONS
171+
# Used by: alerts, notifications, indicators
172+
# Output: themes/default/graphics/status/
173+
# =============================================================================
174+
declare -A STATUS_ICONS=(
175+
[error]="alert-circle"
176+
[warning]="alert-triangle"
177+
[success]="circle-check"
178+
[info]="info-circle"
179+
[message]="message"
180+
[alarm]="bell-ringing"
181+
[flagged]="flag"
182+
[spam]="flame"
183+
[read]="mail-opened"
184+
[unread]="mail"
185+
[private]="lock"
186+
[recurring]="repeat"
187+
[loading]="loader"
188+
)
189+
190+
# =============================================================================
191+
# NAVIGATION ICONS
192+
# Used by: pagination, tree controls, breadcrumbs
193+
# Output: themes/default/graphics/nav/
194+
# =============================================================================
195+
declare -A NAV_ICONS=(
196+
[first]="chevrons-left"
197+
[last]="chevrons-right"
198+
[prev]="chevron-left"
199+
[next]="chevron-right"
200+
[up]="chevron-up"
201+
[down]="chevron-down"
202+
[home]="home"
203+
[back]="arrow-left"
204+
[folder]="folder"
205+
[folder-open]="folder-open"
206+
[file]="file"
207+
[tree-plus]="square-plus"
208+
[tree-minus]="square-minus"
209+
)
210+
211+
# =============================================================================
212+
# MAIN
213+
# =============================================================================
214+
215+
TOTAL_FAILED=0
216+
217+
run_category() {
218+
local name="$1"
219+
local dest="$2"
220+
local -n ref=$3
221+
222+
echo ""
223+
echo "=== ${name} (${SIZE}px) ==="
224+
echo "Output: ${dest}"
225+
echo ""
226+
227+
if generate_icons "$dest" "$3"; then
228+
:
229+
else
230+
TOTAL_FAILED=$((TOTAL_FAILED + $?))
231+
fi
232+
}
233+
234+
case "$CATEGORY" in
235+
admin)
236+
run_category "Admin Dashboard" "${THEMES_DIR}/admin" ADMIN_ICONS
237+
;;
238+
actions)
239+
run_category "Common Actions" "${THEMES_DIR}/actions" ACTION_ICONS
240+
;;
241+
apps)
242+
run_category "Application Identity" "${THEMES_DIR}/apps" APP_ICONS
243+
;;
244+
status)
245+
run_category "Status/Notifications" "${THEMES_DIR}/status" STATUS_ICONS
246+
;;
247+
nav)
248+
run_category "Navigation" "${THEMES_DIR}/nav" NAV_ICONS
249+
;;
250+
all)
251+
run_category "Admin Dashboard" "${THEMES_DIR}/admin" ADMIN_ICONS
252+
run_category "Common Actions" "${THEMES_DIR}/actions" ACTION_ICONS
253+
run_category "Application Identity" "${THEMES_DIR}/apps" APP_ICONS
254+
run_category "Status/Notifications" "${THEMES_DIR}/status" STATUS_ICONS
255+
run_category "Navigation" "${THEMES_DIR}/nav" NAV_ICONS
256+
;;
257+
*)
258+
echo "Unknown category: $CATEGORY"
259+
echo "Valid: admin, actions, apps, status, nav, all"
260+
exit 1
261+
;;
262+
esac
263+
264+
echo ""
265+
echo "=========================================="
266+
echo "Done."
267+
if [ $TOTAL_FAILED -gt 0 ]; then
268+
echo "WARNING: ${TOTAL_FAILED} icon(s) failed."
269+
exit 1
270+
fi

0 commit comments

Comments
 (0)