Commit graph libervia-backend/libervia/backend/tools/common/template.py
Author SHA1 Message Date
Goffi
65c775877e tools (common/template): skip empty icon names in _icon_defs 2026-11-03 18:02:05 +01:00
Goffi
099b107c29 tools (common/template): expose theme settings to the template:
- `css`: additional sheets rendered after the regular css files (can be used for a dark
  theme)
- `html_data_theme`: copied to the <html> data-theme attribute
- `themes_items`: theme selector entries (theme, label, icon)
- fix missing parenthesis in `is_file`
2026-10-26 18:36:41 +01:00
Goffi
5995b1e056 tools (common/template): use font-awesome names in _icon_from_client:
the frontend icons moved from fontello to font-awesome.
2026-10-26 18:36:41 +01:00
Goffi
0fbf74aad6 tools (common/template): add brands style in icon definitions:
`brands` is notably needed for the new XMPP icon available in font-awesome.
2026-09-20 12:10:11 +02:00
Goffi
2cfe6c7a82 tools (common/template): add jid_resource filter 2026-08-25 19:02:59 +02:00
Goffi
68da01a043 Dates update. 2026-03-31 12:57:17 +02:00
Goffi
82e2c6efac apply black to the whole codebase. 2026-03-09 09:22:04 +01:00
Goffi
919cafc68c Update use of media_dir following change in Libervia Media:
Libervia Media is now a Python package instead of files to put in a directory to specify
in settings. The discovery is now automatic, removing the need for settings and enabling
easier installation. Furthermore, it should now work even if the package is zipped.
`libervia_media` can now be specified as a dependency for frontends requiring it.
2026-01-13 10:57:19 +01:00
Goffi
c4c3b5bd7c update templates handling folling changes in Libervia Templates 2025-12-19 22:43:20 +01:00
Goffi
4fda71eeec config: remove web settings as they are now in web frontend. 2025-12-15 11:43:11 +01:00
Goffi
6a7b7bc36a core: Replace legacy INI config system with Pydantic-based TOML configuration.
This is a huge configuration refactoring.

The configuration system now uses Pydantic settings, with better validation, better
support for environment variables and other goodies.

The main config files now use TOML instead of INI, this allow for better handling of
complex types, notably dict.

Plugins, components and frontends can declare their config settings in a class which will
be imported dynamically.
2025-11-30 12:27:35 +01:00
Goffi
0f42421804 template: Add initials filter. 2025-04-11 18:19:17 +02:00
Goffi
ce5ba7123b template: fix name handling for icons. 2025-04-11 18:18:50 +02:00
Goffi
da51288c7a tools (common/template), cli (call/gui): use font-awesome instead of fontello:
following change in Libervia Media, code has been updated to use font-awesome now instead
of fontello.
2024-10-26 22:42:17 +02:00
Goffi
53fdaa9d09 Reformatted code base using black. 2024-06-19 18:44:57 +02:00
Goffi
ee4caf8ee7 template: add a bare_jid filter 2023-11-28 17:41:49 +01:00
Goffi
173519a630 tools (common/template): add filter to get media types:
Add 2 filters to get main type and subtype of media type. Jinja2 and Nunjucks don't handle
slices in the same way (Python way for Jinja2, JS way for Nunjucks), making it difficult
to retrieve main type of a media from media type. Thoses filters work in both cases.
2023-06-22 15:49:06 +02:00
Goffi
fbf72390da tools (common/template): allow use of extra attributes in icon function 2023-06-08 21:28:26 +02:00
Goffi
620f89f589 tools/common (template): add id argument to _icon_use 2023-06-07 22:26:54 +02:00
Goffi
7c6a675435 installation: moved from setup.py to pyproject.toml:
- updated installation to use the now standard `pyproject.toml` instead of legacy
`setup.py`. `setup.py` and other legacy files have been deleted.
- removed outdated README4PACKAGERS
- removed pylintrc which has not been correctly reviewed. Linter conf should go to
  `pyproject.toml` now.
- [hatch](https://hatch.pypa.io) is now used as main building tool. However, thanks to the
use of standards, other tools can be used too.
- update .hgignore
- several dependencies version bump, with code update to adapt to changes.
2023-06-06 16:45:16 +02:00
Goffi
fd16770c19 refactoring: rename libervia.frontends.jp to libervia.cli 2023-06-02 14:54:26 +02:00
Goffi
d2685ba11b refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
Renamed from sat/tools/common/template.py (Previous history)