Replace Ferese logos with shared Fe mark
This commit is contained in:
1 parent
dbd6c6d446
commit
d4c8c10b39
17 files changed
+84
-103
No files matched your search
@@ -103,13 +103,13 @@ for page_number, (slug, title, source) in enumerate(PAGES):
|
||||
doc = f'''<!doctype html>
|
||||
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#10151c"><title>{escape(title)} — Ferese handbook</title><meta name="description" content="{escape(title)} in the Ferese handbook: setup, configuration, and guides for your Wayland desktop.">
|
||||
<link rel="icon" href="../assets/branding/ferese-blue-flat.svg" type="image/svg+xml"><link rel="icon" href="../assets/favicon.ico" sizes="16x16 32x32 48x48"><link rel="icon" href="../assets/favicon-32.png" type="image/png" sizes="32x32"><link rel="stylesheet" href="../styles.css"><script src="../app.js" defer></script></head>
|
||||
<link rel="icon" href="../assets/branding/ferese.svg" type="image/svg+xml"><link rel="icon" href="../assets/favicon.ico" sizes="16x16 32x32 48x48"><link rel="icon" href="../assets/favicon-32.png" type="image/png" sizes="32x32"><link rel="stylesheet" href="../styles.css"><script src="../app.js" defer></script></head>
|
||||
<body class="docs-page"><a class="skip" href="#main">Skip to content</a>
|
||||
<header class="site-header"><div class="header-inner"><a class="brand" href="../" aria-label="Ferese home"><img class="brand-icon" src="../assets/branding/ferese-blue-dark.svg" width="1024" height="1024" alt=""><span class="brand-name">Ferese</span></a><nav aria-label="Main navigation"><a href="../">Overview</a><a href="./" aria-current="page">Documentation</a><a href="{REPO}">GitHub <svg class="link-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M7 7h10v10"/></svg></a></nav></div></header>
|
||||
<header class="site-header"><div class="header-inner"><a class="brand" href="../" aria-label="Ferese home"><img class="brand-icon" src="../assets/branding/ferese.svg" width="950" height="950" alt=""><span class="brand-name">Ferese</span></a><nav aria-label="Main navigation"><a href="../">Overview</a><a href="./" aria-current="page">Documentation</a><a href="{REPO}">GitHub <svg class="link-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M7 7h10v10"/></svg></a></nav></div></header>
|
||||
<div class="docs-layout"><aside class="docs-sidebar"><div class="docs-search" hidden><label class="sr-only" for="docs-search">Search the handbook</label><input id="docs-search" type="search" placeholder="Search the handbook…" autocomplete="off" aria-controls="search-results"><div class="search-results" id="search-results" hidden></div><p class="sr-only" id="search-status" role="status"></p></div><details open><summary>FERESE HANDBOOK</summary><nav aria-label="Documentation">{navigation}</nav></details><div class="sidebar-links"><a href="{REPO}/issues">Report an issue <svg class="link-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M7 7h10v10"/></svg></a><a href="../">Back to Ferese ←</a></div></aside>
|
||||
<main class="docs-article" id="main"><div class="breadcrumb"><a href="./">Handbook</a><span aria-hidden="true">/</span><span>{escape(title)}</span></div><article class="prose">{body}</article><a class="edit-link" href="{REPO}/blob/main/{source.relative_to(ROOT)}">View this guide on GitHub <svg class="link-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M7 7h10v10"/></svg></a><nav class="docs-pager" aria-label="Previous and next guide">{pager}</nav></main>
|
||||
<aside class="docs-toc" aria-label="On this page">{'<p>ON THIS PAGE</p><nav>' + contents + '</nav>' if contents else ''}</aside></div>
|
||||
<footer class="site-footer page-width"><a class="brand" href="../" aria-label="Ferese home"><img class="brand-icon" src="../assets/branding/ferese-blue-dark.svg" width="1024" height="1024" alt=""></a><p>A Wayland desktop with scrolling layouts.</p><a href="{REPO}">Built in the open <svg class="link-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M7 7h10v10"/></svg></a></footer></body></html>'''
|
||||
<footer class="site-footer page-width"><a class="brand" href="../" aria-label="Ferese home"><img class="brand-icon" src="../assets/branding/ferese.svg" width="950" height="950" alt=""></a><p>A Wayland desktop with scrolling layouts.</p><a href="{REPO}">Built in the open <svg class="link-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M7 7h10v10"/></svg></a></footer></body></html>'''
|
||||
(OUTPUT / 'docs' / f'{slug}.html').write_text(doc)
|
||||
(OUTPUT / 'docs/search-index.json').write_text(json.dumps(search_index, ensure_ascii=False))
|
||||
print(f'Built website and {len(PAGES)} handbook pages at {OUTPUT}')
|
||||
@@ -130,14 +130,14 @@
|
||||
"policy": "managed"
|
||||
},
|
||||
{
|
||||
"source": "packaging/icons/ferese.svg",
|
||||
"source": "assets/branding/ferese.svg",
|
||||
"target": "integration/usr/local/share/icons/hicolor/scalable/apps/ferese.svg",
|
||||
"mode": "0644",
|
||||
"destination": "/usr/local/share/icons/hicolor/scalable/apps/ferese.svg",
|
||||
"policy": "managed"
|
||||
},
|
||||
{
|
||||
"source": "packaging/icons/ferese.svg",
|
||||
"source": "assets/branding/ferese.svg",
|
||||
"target": "integration/usr/local/share/icons/hicolor/scalable/apps/dev.ferese.Settings.svg",
|
||||
"mode": "0644",
|
||||
"destination": "/usr/local/share/icons/hicolor/scalable/apps/dev.ferese.Settings.svg",
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Export Ferese's symbolic icon and favicons from its canonical SVG."""
|
||||
from io import BytesIO
|
||||
from pathlib import Path
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
import cairo
|
||||
import gi
|
||||
from PIL import Image
|
||||
|
||||
gi.require_version('Rsvg', '2.0')
|
||||
from gi.repository import Rsvg
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
BRANDING = ROOT / 'assets/branding'
|
||||
SVG = 'http://www.w3.org/2000/svg'
|
||||
ET.register_namespace('', SVG)
|
||||
|
||||
|
||||
def render(path, size):
|
||||
handle = Rsvg.Handle.new_from_file(str(path))
|
||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, *size)
|
||||
viewport = Rsvg.Rectangle()
|
||||
viewport.x = viewport.y = 0
|
||||
viewport.width, viewport.height = size
|
||||
handle.render_document(cairo.Context(surface), viewport)
|
||||
output = BytesIO()
|
||||
surface.write_to_png(output)
|
||||
output.seek(0)
|
||||
with Image.open(output) as image:
|
||||
return image.convert('RGBA')
|
||||
|
||||
|
||||
def main():
|
||||
symbolic = ET.parse(BRANDING / 'ferese.svg').getroot()
|
||||
for defs in symbolic.findall(f'{{{SVG}}}defs'):
|
||||
symbolic.remove(defs)
|
||||
for path in symbolic.iter(f'{{{SVG}}}path'):
|
||||
path.set('fill', 'currentColor')
|
||||
ET.indent(symbolic, space=' ')
|
||||
(BRANDING / 'ferese-symbolic.svg').write_text(ET.tostring(symbolic, encoding='unicode') + '\n')
|
||||
|
||||
icon = render(BRANDING / 'ferese.svg', (512, 512))
|
||||
icon.resize((32, 32), Image.Resampling.LANCZOS).save(ROOT / 'site/assets/favicon-32.png')
|
||||
icon.save(ROOT / 'site/assets/favicon.ico', sizes=[(16, 16), (32, 32), (48, 48)])
|
||||
|
||||
print('Updated symbolic icon and favicons from the canonical Fe mark.')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in new issue
Block a user