feat(help): vertical category posters on /help category pages
|
|
@ -33,6 +33,30 @@ banner("verify", "VERIFY", "react to unlock the server", "LOKI DEV / ACCESS")
|
|||
banner("welcome", "WELCOME", "good to have you here", "LOKI DEV / COMMUNITY")
|
||||
banner("help", "COMMANDS", "everything the bot can do", "LOKI DEV / HELP")
|
||||
|
||||
|
||||
def poster(name, title, sub, tag):
|
||||
"""Vertical 3:4 poster for help category pages; title size shrinks to fit the width."""
|
||||
w, h = 900, 1200
|
||||
size = min(150, int(760 / (0.66 * len(title))))
|
||||
defs = DEFS.replace('"W"', f'"{w}"').replace('"H"', f'"{h}"').replace('cx="82%" cy="50%"', 'cx="50%" cy="36%"')
|
||||
svg = f"""<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {w} {h}" width="{w}" height="{h}">
|
||||
{defs}
|
||||
<rect width="{w}" height="{h}" fill="#100f0e"/>
|
||||
<rect width="{w}" height="{h}" fill="url(#dots)" mask="url(#halo)" opacity="0.9"/>
|
||||
<g transform="translate(258 180) scale(8)">{MARK}</g>
|
||||
<text x="70" y="860" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="26" letter-spacing="4" fill="#ff793f">{tag}</text>
|
||||
<text x="64" y="{880 + size}" font-family="Inter,'Helvetica Neue',Arial,sans-serif" font-weight="800" font-size="{size}" letter-spacing="-4" fill="#f2ede5">{title}</text>
|
||||
<text x="70" y="1100" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="28" fill="#b8afa5">{sub}</text>
|
||||
<rect x="70" y="1130" width="160" height="6" fill="#ff793f"/>
|
||||
</svg>"""
|
||||
open(f"{name}.svg", "w").write(svg)
|
||||
subprocess.run(["rsvg-convert", "-w", str(w), f"{name}.svg", "-o", f"{name}.png"], check=True)
|
||||
|
||||
poster("help-information", "INFORMATION", "server & bot info", "LOKI DEV / INFORMATION")
|
||||
poster("help-moderation", "MODERATION", "mod tools - requires perms", "LOKI DEV / MODERATION")
|
||||
poster("help-tickets", "TICKETS", "support tickets & blacklist", "LOKI DEV / TICKETS")
|
||||
poster("help-utility", "UTILITY", "polls, reminders, blog", "LOKI DEV / UTILITY")
|
||||
|
||||
avatar = f"""<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1024" height="1024">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#ff9a5d"/><stop offset="1" stop-color="#ff5a1f"/></linearGradient>
|
||||
|
|
|
|||
BIN
assets/brand/help-information.png
Normal file
|
After Width: | Height: | Size: 218 KiB |
18
assets/brand/help-information.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1200" width="900" height="1200">
|
||||
|
||||
<defs>
|
||||
<linearGradient id="face" x1="0" y1="0" x2="0.4" y2="1"><stop offset="0" stop-color="#ffb27a"/><stop offset="1" stop-color="#ff5d1f"/></linearGradient>
|
||||
<mask id="cut"><rect width="48" height="48" fill="#fff"/><path d="M24 2V46" stroke="#000" stroke-width="3"/>
|
||||
<path d="M16 22l8 4 8-4" stroke="#000" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></mask>
|
||||
<radialGradient id="fade" cx="50%" cy="36%" r="55%"><stop offset="0" stop-color="#fff"/><stop offset="0.6" stop-color="#fff" stop-opacity="0.35"/><stop offset="1" stop-color="#000"/></radialGradient>
|
||||
<mask id="halo"><rect width="900" height="1200" fill="url(#fade)"/></mask>
|
||||
<pattern id="dots" width="8" height="8" patternUnits="userSpaceOnUse"><rect x="1" y="1" width="4" height="4" fill="#ff6a2b"/><rect x="5" y="5" width="2" height="2" fill="#ff6a2b"/></pattern>
|
||||
</defs>
|
||||
<rect width="900" height="1200" fill="#100f0e"/>
|
||||
<rect width="900" height="1200" fill="url(#dots)" mask="url(#halo)" opacity="0.9"/>
|
||||
<g transform="translate(258 180) scale(8)"><path d="M24 4l18 20-18 20L6 24z" fill="url(#face)" mask="url(#cut)"/></g>
|
||||
<text x="70" y="860" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="26" letter-spacing="4" fill="#ff793f">LOKI DEV / INFORMATION</text>
|
||||
<text x="64" y="984" font-family="Inter,'Helvetica Neue',Arial,sans-serif" font-weight="800" font-size="104" letter-spacing="-4" fill="#f2ede5">INFORMATION</text>
|
||||
<text x="70" y="1100" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="28" fill="#b8afa5">server & bot info</text>
|
||||
<rect x="70" y="1130" width="160" height="6" fill="#ff793f"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/brand/help-moderation.png
Normal file
|
After Width: | Height: | Size: 220 KiB |
18
assets/brand/help-moderation.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1200" width="900" height="1200">
|
||||
|
||||
<defs>
|
||||
<linearGradient id="face" x1="0" y1="0" x2="0.4" y2="1"><stop offset="0" stop-color="#ffb27a"/><stop offset="1" stop-color="#ff5d1f"/></linearGradient>
|
||||
<mask id="cut"><rect width="48" height="48" fill="#fff"/><path d="M24 2V46" stroke="#000" stroke-width="3"/>
|
||||
<path d="M16 22l8 4 8-4" stroke="#000" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></mask>
|
||||
<radialGradient id="fade" cx="50%" cy="36%" r="55%"><stop offset="0" stop-color="#fff"/><stop offset="0.6" stop-color="#fff" stop-opacity="0.35"/><stop offset="1" stop-color="#000"/></radialGradient>
|
||||
<mask id="halo"><rect width="900" height="1200" fill="url(#fade)"/></mask>
|
||||
<pattern id="dots" width="8" height="8" patternUnits="userSpaceOnUse"><rect x="1" y="1" width="4" height="4" fill="#ff6a2b"/><rect x="5" y="5" width="2" height="2" fill="#ff6a2b"/></pattern>
|
||||
</defs>
|
||||
<rect width="900" height="1200" fill="#100f0e"/>
|
||||
<rect width="900" height="1200" fill="url(#dots)" mask="url(#halo)" opacity="0.9"/>
|
||||
<g transform="translate(258 180) scale(8)"><path d="M24 4l18 20-18 20L6 24z" fill="url(#face)" mask="url(#cut)"/></g>
|
||||
<text x="70" y="860" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="26" letter-spacing="4" fill="#ff793f">LOKI DEV / MODERATION</text>
|
||||
<text x="64" y="995" font-family="Inter,'Helvetica Neue',Arial,sans-serif" font-weight="800" font-size="115" letter-spacing="-4" fill="#f2ede5">MODERATION</text>
|
||||
<text x="70" y="1100" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="28" fill="#b8afa5">mod tools - requires perms</text>
|
||||
<rect x="70" y="1130" width="160" height="6" fill="#ff793f"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/brand/help-tickets.png
Normal file
|
After Width: | Height: | Size: 215 KiB |
18
assets/brand/help-tickets.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1200" width="900" height="1200">
|
||||
|
||||
<defs>
|
||||
<linearGradient id="face" x1="0" y1="0" x2="0.4" y2="1"><stop offset="0" stop-color="#ffb27a"/><stop offset="1" stop-color="#ff5d1f"/></linearGradient>
|
||||
<mask id="cut"><rect width="48" height="48" fill="#fff"/><path d="M24 2V46" stroke="#000" stroke-width="3"/>
|
||||
<path d="M16 22l8 4 8-4" stroke="#000" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></mask>
|
||||
<radialGradient id="fade" cx="50%" cy="36%" r="55%"><stop offset="0" stop-color="#fff"/><stop offset="0.6" stop-color="#fff" stop-opacity="0.35"/><stop offset="1" stop-color="#000"/></radialGradient>
|
||||
<mask id="halo"><rect width="900" height="1200" fill="url(#fade)"/></mask>
|
||||
<pattern id="dots" width="8" height="8" patternUnits="userSpaceOnUse"><rect x="1" y="1" width="4" height="4" fill="#ff6a2b"/><rect x="5" y="5" width="2" height="2" fill="#ff6a2b"/></pattern>
|
||||
</defs>
|
||||
<rect width="900" height="1200" fill="#100f0e"/>
|
||||
<rect width="900" height="1200" fill="url(#dots)" mask="url(#halo)" opacity="0.9"/>
|
||||
<g transform="translate(258 180) scale(8)"><path d="M24 4l18 20-18 20L6 24z" fill="url(#face)" mask="url(#cut)"/></g>
|
||||
<text x="70" y="860" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="26" letter-spacing="4" fill="#ff793f">LOKI DEV / TICKETS</text>
|
||||
<text x="64" y="1030" font-family="Inter,'Helvetica Neue',Arial,sans-serif" font-weight="800" font-size="150" letter-spacing="-4" fill="#f2ede5">TICKETS</text>
|
||||
<text x="70" y="1100" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="28" fill="#b8afa5">support tickets & blacklist</text>
|
||||
<rect x="70" y="1130" width="160" height="6" fill="#ff793f"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/brand/help-utility.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
18
assets/brand/help-utility.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1200" width="900" height="1200">
|
||||
|
||||
<defs>
|
||||
<linearGradient id="face" x1="0" y1="0" x2="0.4" y2="1"><stop offset="0" stop-color="#ffb27a"/><stop offset="1" stop-color="#ff5d1f"/></linearGradient>
|
||||
<mask id="cut"><rect width="48" height="48" fill="#fff"/><path d="M24 2V46" stroke="#000" stroke-width="3"/>
|
||||
<path d="M16 22l8 4 8-4" stroke="#000" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></mask>
|
||||
<radialGradient id="fade" cx="50%" cy="36%" r="55%"><stop offset="0" stop-color="#fff"/><stop offset="0.6" stop-color="#fff" stop-opacity="0.35"/><stop offset="1" stop-color="#000"/></radialGradient>
|
||||
<mask id="halo"><rect width="900" height="1200" fill="url(#fade)"/></mask>
|
||||
<pattern id="dots" width="8" height="8" patternUnits="userSpaceOnUse"><rect x="1" y="1" width="4" height="4" fill="#ff6a2b"/><rect x="5" y="5" width="2" height="2" fill="#ff6a2b"/></pattern>
|
||||
</defs>
|
||||
<rect width="900" height="1200" fill="#100f0e"/>
|
||||
<rect width="900" height="1200" fill="url(#dots)" mask="url(#halo)" opacity="0.9"/>
|
||||
<g transform="translate(258 180) scale(8)"><path d="M24 4l18 20-18 20L6 24z" fill="url(#face)" mask="url(#cut)"/></g>
|
||||
<text x="70" y="860" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="26" letter-spacing="4" fill="#ff793f">LOKI DEV / UTILITY</text>
|
||||
<text x="64" y="1030" font-family="Inter,'Helvetica Neue',Arial,sans-serif" font-weight="800" font-size="150" letter-spacing="-4" fill="#f2ede5">UTILITY</text>
|
||||
<text x="70" y="1100" font-family="'JetBrains Mono','DejaVu Sans Mono',monospace" font-size="28" fill="#b8afa5">polls, reminders, blog</text>
|
||||
<rect x="70" y="1130" width="160" height="6" fill="#ff793f"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |