Add raster Easy Bee branding assets
This commit is contained in:
15
audit/internal/webui/assets.go
Normal file
15
audit/internal/webui/assets.go
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package webui
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "embed"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
//go:embed easy-bee-logo.png
|
||||||
|
var easyBeeLogoPNG []byte
|
||||||
|
|
||||||
|
func (h *handler) handleEasyBeeLogo(w http.ResponseWriter, _ *http.Request) {
|
||||||
|
w.Header().Set("Cache-Control", "public, max-age=3600")
|
||||||
|
w.Header().Set("Content-Type", "image/png")
|
||||||
|
_, _ = w.Write(easyBeeLogoPNG)
|
||||||
|
}
|
||||||
BIN
audit/internal/webui/easy-bee-logo.png
Normal file
BIN
audit/internal/webui/easy-bee-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -226,6 +226,7 @@ func NewHandler(opts HandlerOptions) http.Handler {
|
|||||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
_, _ = w.Write([]byte(loadingPageHTML))
|
_, _ = w.Write([]byte(loadingPageHTML))
|
||||||
})
|
})
|
||||||
|
mux.HandleFunc("GET /assets/easy-bee-logo.png", h.handleEasyBeeLogo)
|
||||||
|
|
||||||
// ── Existing read-only endpoints (preserved for compatibility) ──────────
|
// ── Existing read-only endpoints (preserved for compatibility) ──────────
|
||||||
mux.HandleFunc("GET /audit.json", h.handleAuditJSON)
|
mux.HandleFunc("GET /audit.json", h.handleAuditJSON)
|
||||||
@@ -1218,8 +1219,9 @@ const loadingPageHTML = `<!DOCTYPE html>
|
|||||||
*{margin:0;padding:0;box-sizing:border-box}
|
*{margin:0;padding:0;box-sizing:border-box}
|
||||||
html,body{height:100%;background:#0f1117;display:flex;align-items:center;justify-content:center;font-family:'Courier New',monospace;color:#e2e8f0}
|
html,body{height:100%;background:#0f1117;display:flex;align-items:center;justify-content:center;font-family:'Courier New',monospace;color:#e2e8f0}
|
||||||
.wrap{text-align:center;width:420px}
|
.wrap{text-align:center;width:420px}
|
||||||
.logo{font-size:11px;line-height:1.4;color:#f6c90e;margin-bottom:6px;white-space:pre;text-align:left}
|
.logo{margin:0 auto 8px;width:320px;max-width:80vw}
|
||||||
.subtitle{font-size:12px;color:#a0aec0;text-align:left;margin-bottom:24px;padding-left:2px}
|
.logo img{display:block;width:100%;height:auto}
|
||||||
|
.subtitle{font-size:12px;color:#a0aec0;margin-bottom:24px;letter-spacing:.2em;text-transform:uppercase}
|
||||||
.spinner{width:36px;height:36px;border:3px solid #2d3748;border-top-color:#f6c90e;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 14px}
|
.spinner{width:36px;height:36px;border:3px solid #2d3748;border-top-color:#f6c90e;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 14px}
|
||||||
.spinner.hidden{display:none}
|
.spinner.hidden{display:none}
|
||||||
@keyframes spin{to{transform:rotate(360deg)}}
|
@keyframes spin{to{transform:rotate(360deg)}}
|
||||||
@@ -1237,12 +1239,7 @@ td:first-child{color:#718096;width:55%}
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="logo"> ███████╗ █████╗ ███████╗██╗ ██╗ ██████╗ ███████╗███████╗
|
<div class="logo"><img src="/assets/easy-bee-logo.png" alt="Easy Bee logo"></div>
|
||||||
██╔════╝██╔══██╗██╔════╝╚██╗ ██╔╝ ██╔══██╗██╔════╝██╔════╝
|
|
||||||
█████╗ ███████║███████╗ ╚████╔╝ █████╗██████╔╝█████╗ █████╗
|
|
||||||
██╔══╝ ██╔══██║╚════██║ ╚██╔╝ ╚════╝██╔══██╗██╔══╝ ██╔══╝
|
|
||||||
███████╗██║ ██║███████║ ██║ ██████╔╝███████╗███████╗
|
|
||||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝</div>
|
|
||||||
<div class="subtitle">Hardware Audit LiveCD</div>
|
<div class="subtitle">Hardware Audit LiveCD</div>
|
||||||
<div class="spinner" id="spin"></div>
|
<div class="spinner" id="spin"></div>
|
||||||
<div class="status" id="st">Connecting to bee-web...</div>
|
<div class="status" id="st">Connecting to bee-web...</div>
|
||||||
|
|||||||
BIN
iso/builder/config/bootloaders/grub-pc/live-theme/background.png
Normal file
BIN
iso/builder/config/bootloaders/grub-pc/live-theme/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
@@ -1,5 +1,6 @@
|
|||||||
desktop-color: "#000000"
|
desktop-color: "#000000"
|
||||||
title-color: "#f5a800"
|
desktop-image: "background.png"
|
||||||
|
title-color: "#42b6ff"
|
||||||
title-font: "Unifont Regular 16"
|
title-font: "Unifont Regular 16"
|
||||||
title-text: ""
|
title-text: ""
|
||||||
message-font: "Unifont Regular 16"
|
message-font: "Unifont Regular 16"
|
||||||
@@ -13,7 +14,7 @@ terminal-font: "Unifont Regular 16"
|
|||||||
height = 20
|
height = 20
|
||||||
text = "@KEYMAP_SHORT@"
|
text = "@KEYMAP_SHORT@"
|
||||||
align = "center"
|
align = "center"
|
||||||
color = "#5a4800"
|
color = "#24425b"
|
||||||
font = "Unifont Regular 16"
|
font = "Unifont Regular 16"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,11 +22,11 @@ terminal-font: "Unifont Regular 16"
|
|||||||
+ boot_menu {
|
+ boot_menu {
|
||||||
left = 20%
|
left = 20%
|
||||||
width = 60%
|
width = 60%
|
||||||
top = 62%
|
top = 70%
|
||||||
height = 38%-80
|
height = 30%-80
|
||||||
item_color = "#c88000"
|
item_color = "#91d8ff"
|
||||||
item_font = "Unifont Regular 16"
|
item_font = "Unifont Regular 16"
|
||||||
selected_item_color= "#f5a800"
|
selected_item_color= "#f5f7fb"
|
||||||
selected_item_font = "Unifont Regular 16"
|
selected_item_font = "Unifont Regular 16"
|
||||||
item_height = 16
|
item_height = 16
|
||||||
item_padding = 0
|
item_padding = 0
|
||||||
@@ -44,8 +45,8 @@ terminal-font: "Unifont Regular 16"
|
|||||||
width = 60%
|
width = 60%
|
||||||
font = "Unifont Regular 16"
|
font = "Unifont Regular 16"
|
||||||
text_color = "#0a0a00"
|
text_color = "#0a0a00"
|
||||||
fg_color = "#f5a800"
|
fg_color = "#42b6ff"
|
||||||
bg_color = "#2a2200"
|
bg_color = "#101824"
|
||||||
border_color = "#5a4800"
|
border_color = "#24425b"
|
||||||
text = "@TIMEOUT_NOTIFICATION_LONG@"
|
text = "@TIMEOUT_NOTIFICATION_LONG@"
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
iso/builder/config/bootloaders/grub-pc/splash.png
Normal file
BIN
iso/builder/config/bootloaders/grub-pc/splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
@@ -1,117 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# 9001-wallpaper.hook.chroot — generate /usr/share/bee/wallpaper.png inside chroot
|
|
||||||
set -e
|
|
||||||
echo "=== generating bee wallpaper ==="
|
|
||||||
mkdir -p /usr/share/bee
|
|
||||||
|
|
||||||
python3 - <<'PYEOF'
|
|
||||||
from PIL import Image, ImageDraw, ImageFont, ImageFilter
|
|
||||||
import os
|
|
||||||
|
|
||||||
W, H = 1920, 1080
|
|
||||||
|
|
||||||
ASCII_ART = [
|
|
||||||
" ███████╗ █████╗ ███████╗██╗ ██╗ ██████╗ ███████╗███████╗",
|
|
||||||
" ██╔════╝██╔══██╗██╔════╝╚██╗ ██╔╝ ██╔══██╗██╔════╝██╔════╝",
|
|
||||||
" █████╗ ███████║███████╗ ╚████╔╝ █████╗██████╔╝█████╗ █████╗",
|
|
||||||
" ██╔══╝ ██╔══██║╚════██║ ╚██╔╝ ╚════╝██╔══██╗██╔══╝ ██╔══╝",
|
|
||||||
" ███████╗██║ ██║███████║ ██║ ██████╔╝███████╗███████╗",
|
|
||||||
" ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝",
|
|
||||||
]
|
|
||||||
SUBTITLE = " Hardware Audit LiveCD"
|
|
||||||
|
|
||||||
FG = (0xF6, 0xD0, 0x47)
|
|
||||||
FG_DIM = (0xD4, 0xA9, 0x1C)
|
|
||||||
SHADOW = (0x5E, 0x47, 0x05)
|
|
||||||
SUB = (0x96, 0x7A, 0x17)
|
|
||||||
BG = (0x05, 0x05, 0x05)
|
|
||||||
|
|
||||||
MONO_FONT_CANDIDATES = [
|
|
||||||
'/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf',
|
|
||||||
'/usr/share/fonts/truetype/liberation2/LiberationMono-Bold.ttf',
|
|
||||||
'/usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf',
|
|
||||||
'/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf',
|
|
||||||
]
|
|
||||||
SUB_FONT_CANDIDATES = [
|
|
||||||
'/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf',
|
|
||||||
'/usr/share/fonts/truetype/liberation2/LiberationSans-Bold.ttf',
|
|
||||||
'/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf',
|
|
||||||
'/usr/share/fonts/truetype/freefont/FreeSansBold.ttf',
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def load_font(candidates, size):
|
|
||||||
for path in candidates:
|
|
||||||
if os.path.exists(path):
|
|
||||||
return ImageFont.truetype(path, size)
|
|
||||||
return ImageFont.load_default()
|
|
||||||
|
|
||||||
|
|
||||||
def mono_metrics(font):
|
|
||||||
probe = Image.new('L', (W, H), 0)
|
|
||||||
draw = ImageDraw.Draw(probe)
|
|
||||||
char_w = int(round(draw.textlength("M", font=font)))
|
|
||||||
bb = draw.textbbox((0, 0), "Mg", font=font)
|
|
||||||
char_h = bb[3] - bb[1]
|
|
||||||
return char_w, char_h
|
|
||||||
|
|
||||||
|
|
||||||
def render_ascii_mask(font, lines, char_w, char_h, line_gap):
|
|
||||||
width = max(len(line) for line in lines) * char_w
|
|
||||||
height = len(lines) * char_h + line_gap * (len(lines) - 1)
|
|
||||||
mask = Image.new('L', (width, height), 0)
|
|
||||||
draw = ImageDraw.Draw(mask)
|
|
||||||
for row, line in enumerate(lines):
|
|
||||||
y = row * (char_h + line_gap)
|
|
||||||
for col, ch in enumerate(line):
|
|
||||||
if ch == ' ':
|
|
||||||
continue
|
|
||||||
x = col * char_w
|
|
||||||
draw.text((x, y), ch, font=font, fill=255)
|
|
||||||
return mask
|
|
||||||
|
|
||||||
|
|
||||||
img = Image.new('RGB', (W, H), BG)
|
|
||||||
draw = ImageDraw.Draw(img)
|
|
||||||
|
|
||||||
# Soft amber glow under the logo without depending on font rendering.
|
|
||||||
glow = Image.new('RGBA', (W, H), (0, 0, 0, 0))
|
|
||||||
glow_draw = ImageDraw.Draw(glow)
|
|
||||||
glow_draw.ellipse((360, 250, 1560, 840), fill=(180, 120, 10, 56))
|
|
||||||
glow_draw.ellipse((520, 340, 1400, 760), fill=(255, 190, 40, 36))
|
|
||||||
glow = glow.filter(ImageFilter.GaussianBlur(60))
|
|
||||||
img = Image.alpha_composite(img.convert('RGBA'), glow)
|
|
||||||
|
|
||||||
TARGET_LOGO_W = 400
|
|
||||||
max_chars = max(len(line) for line in ASCII_ART)
|
|
||||||
_probe_font = load_font(MONO_FONT_CANDIDATES, 64)
|
|
||||||
_probe_cw, _ = mono_metrics(_probe_font)
|
|
||||||
font_size_logo = max(6, int(64 * TARGET_LOGO_W / (_probe_cw * max_chars)))
|
|
||||||
font_logo = load_font(MONO_FONT_CANDIDATES, font_size_logo)
|
|
||||||
char_w, char_h = mono_metrics(font_logo)
|
|
||||||
logo_mask = render_ascii_mask(font_logo, ASCII_ART, char_w, char_h, 2)
|
|
||||||
logo_w, logo_h = logo_mask.size
|
|
||||||
logo_x = (W - logo_w) // 2
|
|
||||||
logo_y = 380
|
|
||||||
|
|
||||||
sh_off = max(1, font_size_logo // 6)
|
|
||||||
shadow_mask = logo_mask.filter(ImageFilter.GaussianBlur(1))
|
|
||||||
img.paste(SHADOW, (logo_x + sh_off * 2, logo_y + sh_off * 2), shadow_mask)
|
|
||||||
img.paste(FG_DIM, (logo_x + sh_off, logo_y + sh_off), logo_mask)
|
|
||||||
img.paste(FG, (logo_x, logo_y), logo_mask)
|
|
||||||
|
|
||||||
font_sub = load_font(SUB_FONT_CANDIDATES, 30)
|
|
||||||
sub_bb = draw.textbbox((0, 0), SUBTITLE, font=font_sub)
|
|
||||||
sub_x = (W - (sub_bb[2] - sub_bb[0])) // 2
|
|
||||||
sub_y = logo_y + logo_h + 48
|
|
||||||
draw = ImageDraw.Draw(img)
|
|
||||||
draw.text((sub_x + 2, sub_y + 2), SUBTITLE, font=font_sub, fill=(35, 28, 6))
|
|
||||||
draw.text((sub_x, sub_y), SUBTITLE, font=font_sub, fill=SUB)
|
|
||||||
|
|
||||||
img = img.convert('RGB')
|
|
||||||
|
|
||||||
img.save('/usr/share/bee/wallpaper.png', optimize=True)
|
|
||||||
print('wallpaper written: /usr/share/bee/wallpaper.png')
|
|
||||||
PYEOF
|
|
||||||
|
|
||||||
echo "=== wallpaper done ==="
|
|
||||||
BIN
iso/overlay/usr/share/bee/wallpaper.png
Normal file
BIN
iso/overlay/usr/share/bee/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user