web/web_iconify_proxy
jwaes 12e11b00c6 Adding extra functionality for svg (rotate, color, ... ) 2025-02-24 19:36:41 +00:00
..
controllers Adding extra functionality for svg (rotate, color, ... ) 2025-02-24 19:36:41 +00:00
readme Adding extra functionality for svg (rotate, color, ... ) 2025-02-24 19:36:41 +00:00
static Adding extra functionality for svg (rotate, color, ... ) 2025-02-24 19:36:41 +00:00
tests Adding extra functionality for svg (rotate, color, ... ) 2025-02-24 19:36:41 +00:00
README.rst Adding extra functionality for svg (rotate, color, ... ) 2025-02-24 19:36:41 +00:00
__init__.py initial release for web_iconify and web_iconify_proxy 2025-02-23 21:31:36 +00:00
__manifest__.py squashing syntax fixes and using assertLog in unittest 2025-02-24 17:48:07 +00:00
pyproject.toml initial release for web_iconify and web_iconify_proxy 2025-02-23 21:31:36 +00:00

README.rst

=================
Web Iconify Proxy
=================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:540c039653c052dd03103f8763a28c639f23b6e3a74191b78a2dd984352b5127
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
    :target: https://github.com/OCA/web/tree/18.0/web_iconify_proxy
    :alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_iconify_proxy
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module acts as a proxy for the Iconify API, allowing Odoo to fetch
icons through the Odoo server rather than directly from the Iconify API.
This improves performance by caching the icons locally using Odoo's
ir.attachment model.

**Table of contents**

.. contents::
   :local:

Usage
=====

This module works in conjunction with web_iconify. Once installed, icons
will be served through the proxy and cached locally.

SVG Icon Parameters
-------------------

You can customize SVG icons by adding query parameters to the URL. The
format is:

``/web_iconify_proxy/<prefix>/<icon>.svg?param1=value1&param2=value2...``

Available parameters:

- **color**: Icon color (e.g., ``color=red``, ``color=%23ff0000``).
- **width**: Icon width (e.g., ``width=50``, ``width=50px``).
- **height**: Icon height (e.g., ``height=50``, ``height=50px``). If
  only one dimension is specified, the other will be calculated
  automatically to maintain aspect ratio.
- **flip**: Flip the icon. Possible values: ``horizontal``,
  ``vertical``, or both (e.g., ``flip=horizontal``, ``flip=vertical``,
  ``flip=horizontal,vertical``).
- **rotate**: Rotate the icon by 90, 180, or 270 degrees (e.g.,
  ``rotate=90``, ``rotate=180``).
- **box**: Set to ``true`` to add an empty rectangle to the SVG that
  matches the viewBox (e.g., ``box=true``).

Example:

``/web_iconify_proxy/mdi/home.svg?color=blue&width=64&flip=horizontal``

Changelog
=========

18.0.1.0.0 (2025-02-23)
-----------------------

- Initial version.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_iconify_proxy%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* jaco.tech

Contributors
------------

- Jaco Waes <jaco@jaco.tech>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_iconify_proxy>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.