diff --git a/CHANGES.rst b/CHANGES.rst index 79d9b7ed..dd3e1970 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_, and this project adheres to `Semantic Versioning `_. +Changed +******* + +- Convert all the png in webp. :pr:`182` + [0.0.37] - 2023-12-01 ===================== diff --git a/README.md b/README.md index 9246679f..9857fb71 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- Canaille + Canaille
**Canaille** is a French word meaning *rascal*. It is roughly pronounced **Can I?**, @@ -16,9 +16,9 @@ It aims to be very light, simple to install and simple to maintain. Its main fea # Screenshots
- Canaille login page - Canaille profile page - Canaille consent page + Canaille login page + Canaille profile page + Canaille consent page
# Try it! diff --git a/canaille/config.sample.toml b/canaille/config.sample.toml index 2e8585b1..0c02b5eb 100644 --- a/canaille/config.sample.toml +++ b/canaille/config.sample.toml @@ -12,10 +12,10 @@ SECRET_KEY = "change me before you go in production" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -# LOGO = "/static/img/canaille-head.png" +# LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -# FAVICON = "/static/img/canaille-c.png" +# FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/canaille/core/templates/about.html b/canaille/core/templates/about.html index 381d03bc..945ec1f7 100644 --- a/canaille/core/templates/about.html +++ b/canaille/core/templates/about.html @@ -8,7 +8,7 @@ {% block content %}
- {{ website_name }} + {{ website_name }}

diff --git a/canaille/static/img/canaille-c.png b/canaille/static/img/canaille-c.png deleted file mode 100644 index 11b048cb..00000000 Binary files a/canaille/static/img/canaille-c.png and /dev/null differ diff --git a/canaille/static/img/canaille-c.webp b/canaille/static/img/canaille-c.webp new file mode 100644 index 00000000..0cbfd9e0 Binary files /dev/null and b/canaille/static/img/canaille-c.webp differ diff --git a/canaille/static/img/canaille-full.png b/canaille/static/img/canaille-full.png deleted file mode 100644 index 2653737b..00000000 Binary files a/canaille/static/img/canaille-full.png and /dev/null differ diff --git a/canaille/static/img/canaille-full.webp b/canaille/static/img/canaille-full.webp new file mode 100644 index 00000000..ea942233 Binary files /dev/null and b/canaille/static/img/canaille-full.webp differ diff --git a/canaille/static/img/canaille-head.png b/canaille/static/img/canaille-head.png deleted file mode 100644 index e869f9fb..00000000 Binary files a/canaille/static/img/canaille-head.png and /dev/null differ diff --git a/canaille/static/img/canaille-head.webp b/canaille/static/img/canaille-head.webp new file mode 100644 index 00000000..3de68940 Binary files /dev/null and b/canaille/static/img/canaille-head.webp differ diff --git a/canaille/static/img/canaille-label.png b/canaille/static/img/canaille-label.png deleted file mode 100644 index befb387b..00000000 Binary files a/canaille/static/img/canaille-label.png and /dev/null differ diff --git a/canaille/static/img/canaille-label.webp b/canaille/static/img/canaille-label.webp new file mode 100644 index 00000000..62e18094 Binary files /dev/null and b/canaille/static/img/canaille-label.webp differ diff --git a/demo/client/templates/index.html b/demo/client/templates/index.html index 4fafa056..f39fd6fb 100644 --- a/demo/client/templates/index.html +++ b/demo/client/templates/index.html @@ -18,7 +18,7 @@

- Canaille client + Canaille client
{{ name }}
diff --git a/demo/conf-docker/canaille-ldap.toml b/demo/conf-docker/canaille-ldap.toml index 208b1b48..848d6c71 100644 --- a/demo/conf-docker/canaille-ldap.toml +++ b/demo/conf-docker/canaille-ldap.toml @@ -12,10 +12,10 @@ NAME = "Canaille" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -LOGO = "/static/img/canaille-head.png" +LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -FAVICON = "/static/img/canaille-c.png" +FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/demo/conf-docker/canaille-memory.toml b/demo/conf-docker/canaille-memory.toml index 727add2c..6a19fa0b 100644 --- a/demo/conf-docker/canaille-memory.toml +++ b/demo/conf-docker/canaille-memory.toml @@ -12,10 +12,10 @@ NAME = "Canaille" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -LOGO = "/static/img/canaille-head.png" +LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -FAVICON = "/static/img/canaille-c.png" +FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/demo/conf-docker/canaille-sql.toml b/demo/conf-docker/canaille-sql.toml index 216e7959..8ce5875a 100644 --- a/demo/conf-docker/canaille-sql.toml +++ b/demo/conf-docker/canaille-sql.toml @@ -12,10 +12,10 @@ NAME = "Canaille" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -LOGO = "/static/img/canaille-head.png" +LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -FAVICON = "/static/img/canaille-c.png" +FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/demo/conf/canaille-ldap.toml b/demo/conf/canaille-ldap.toml index b249ef0c..8b90e029 100644 --- a/demo/conf/canaille-ldap.toml +++ b/demo/conf/canaille-ldap.toml @@ -12,10 +12,10 @@ SECRET_KEY = "change me before you go in production" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -LOGO = "/static/img/canaille-head.png" +LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -FAVICON = "/static/img/canaille-c.png" +FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/demo/conf/canaille-memory.toml b/demo/conf/canaille-memory.toml index 675333d5..1ab33cd9 100644 --- a/demo/conf/canaille-memory.toml +++ b/demo/conf/canaille-memory.toml @@ -12,10 +12,10 @@ SECRET_KEY = "change me before you go in production" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -LOGO = "/static/img/canaille-head.png" +LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -FAVICON = "/static/img/canaille-c.png" +FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/demo/conf/canaille-sql.toml b/demo/conf/canaille-sql.toml index bf630c4e..f87a7383 100644 --- a/demo/conf/canaille-sql.toml +++ b/demo/conf/canaille-sql.toml @@ -12,10 +12,10 @@ SECRET_KEY = "change me before you go in production" # PREFERRED_URL_SCHEME = "https" # You can display a logo to be recognized on login screens -LOGO = "/static/img/canaille-head.png" +LOGO = "/static/img/canaille-head.webp" # Your favicon. If unset the LOGO will be used. -FAVICON = "/static/img/canaille-c.png" +FAVICON = "/static/img/canaille-c.webp" # The name of a theme in the 'theme' directory, or an absolute path # to a theme. Defaults to 'default'. Theming is done with diff --git a/doc/_static/canaille-c.png b/doc/_static/canaille-c.png deleted file mode 100644 index 11b048cb..00000000 Binary files a/doc/_static/canaille-c.png and /dev/null differ diff --git a/doc/_static/canaille-c.webp b/doc/_static/canaille-c.webp new file mode 100644 index 00000000..0cbfd9e0 Binary files /dev/null and b/doc/_static/canaille-c.webp differ diff --git a/doc/_static/canaille-full.png b/doc/_static/canaille-full.png deleted file mode 100644 index 2653737b..00000000 Binary files a/doc/_static/canaille-full.png and /dev/null differ diff --git a/doc/_static/canaille-full.webp b/doc/_static/canaille-full.webp new file mode 100644 index 00000000..ea942233 Binary files /dev/null and b/doc/_static/canaille-full.webp differ diff --git a/doc/_static/canaille-head.png b/doc/_static/canaille-head.png deleted file mode 100644 index e869f9fb..00000000 Binary files a/doc/_static/canaille-head.png and /dev/null differ diff --git a/doc/_static/canaille-head.webp b/doc/_static/canaille-head.webp new file mode 100644 index 00000000..3de68940 Binary files /dev/null and b/doc/_static/canaille-head.webp differ diff --git a/doc/_static/canaille-label.png b/doc/_static/canaille-label.png deleted file mode 100644 index befb387b..00000000 Binary files a/doc/_static/canaille-label.png and /dev/null differ diff --git a/doc/_static/canaille-label.webp b/doc/_static/canaille-label.webp new file mode 100644 index 00000000..62e18094 Binary files /dev/null and b/doc/_static/canaille-label.webp differ diff --git a/doc/_static/consent.png b/doc/_static/consent.png deleted file mode 100644 index 57035f04..00000000 Binary files a/doc/_static/consent.png and /dev/null differ diff --git a/doc/_static/consent.webp b/doc/_static/consent.webp new file mode 100644 index 00000000..db57a595 Binary files /dev/null and b/doc/_static/consent.webp differ diff --git a/doc/_static/login.png b/doc/_static/login.png deleted file mode 100644 index 52c8005c..00000000 Binary files a/doc/_static/login.png and /dev/null differ diff --git a/doc/_static/login.webp b/doc/_static/login.webp new file mode 100644 index 00000000..4f02d536 Binary files /dev/null and b/doc/_static/login.webp differ diff --git a/doc/_static/logo.png b/doc/_static/logo.png deleted file mode 100644 index 13c4b122..00000000 Binary files a/doc/_static/logo.png and /dev/null differ diff --git a/doc/_static/logo.webp b/doc/_static/logo.webp new file mode 100644 index 00000000..0ff6934a Binary files /dev/null and b/doc/_static/logo.webp differ diff --git a/doc/_static/profile.png b/doc/_static/profile.png deleted file mode 100644 index 4e147c87..00000000 Binary files a/doc/_static/profile.png and /dev/null differ diff --git a/doc/_static/profile.webp b/doc/_static/profile.webp new file mode 100644 index 00000000..b9ee8be0 Binary files /dev/null and b/doc/_static/profile.webp differ diff --git a/doc/conf.py b/doc/conf.py index 63b1ca57..0da72a15 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -67,7 +67,7 @@ html_static_path = [] # -- Options for HTMLHelp output ------------------------------------------ htmlhelp_basename = "canailledoc" -html_logo = "_static/logo.png" +html_logo = "_static/logo.webp" # -- Options for LaTeX output --------------------------------------------- diff --git a/doc/index.rst b/doc/index.rst index b5a1d0f7..a321db79 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -16,15 +16,15 @@ It aims to be very light, simple to install and simple to maintain. Its main fea Screenshots =========== -.. image:: _static/login.png +.. image:: _static/login.webp :width: 225 :alt: Login -.. image:: _static/profile.png +.. image:: _static/profile.webp :width: 225 :alt: Profile -.. image:: _static/consent.png +.. image:: _static/consent.webp :width: 225 :alt: Consent diff --git a/tests/app/test_mails.py b/tests/app/test_mails.py index 22ea32ab..4d129998 100644 --- a/tests/app/test_mails.py +++ b/tests/app/test_mails.py @@ -108,7 +108,7 @@ def test_mail_with_default_no_logo(testclient, logged_admin, smtpd): def test_mail_with_default_logo(testclient, logged_admin, smtpd, httpserver): - logo_path = "/static/img/canaille-head.png" + logo_path = "/static/img/canaille-head.webp" with open(f"canaille/{logo_path}", "rb") as fd: raw_logo = fd.read() @@ -134,7 +134,7 @@ def test_mail_with_default_logo(testclient, logged_admin, smtpd, httpserver): def test_mail_with_logo_in_http(testclient, logged_admin, smtpd, httpserver): - logo_path = "/static/img/canaille-head.png" + logo_path = "/static/img/canaille-head.webp" with open(f"canaille/{logo_path}", "rb") as fd: raw_logo = fd.read() diff --git a/tests/conftest.py b/tests/conftest.py index cc86e23d..02eb7621 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -61,7 +61,7 @@ def configuration(smtpd): conf = { "SECRET_KEY": gen_salt(24), "JAVASCRIPT": False, - "LOGO": "/static/img/canaille-head.png", + "LOGO": "/static/img/canaille-head.webp", "TIMEZONE": "UTC", "ACL": { "DEFAULT": { diff --git a/tests/oidc/conftest.py b/tests/oidc/conftest.py index 7324a204..ed5d3fc8 100644 --- a/tests/oidc/conftest.py +++ b/tests/oidc/conftest.py @@ -51,7 +51,7 @@ def client(testclient, other_client, backend): "https://mydomain.tld/redirect1", "https://mydomain.tld/redirect2", ], - logo_uri="https://mydomain.tld/logo.png", + logo_uri="https://mydomain.tld/logo.webp", client_id_issued_at=datetime.datetime.now(datetime.timezone.utc), client_secret=gen_salt(48), grant_types=[ @@ -87,7 +87,7 @@ def other_client(testclient, backend): "https://myotherdomain.tld/redirect1", "https://myotherdomain.tld/redirect2", ], - logo_uri="https://myotherdomain.tld/logo.png", + logo_uri="https://myotherdomain.tld/logo.webp", client_id_issued_at=datetime.datetime.now(datetime.timezone.utc), client_secret=gen_salt(48), grant_types=[ diff --git a/tests/oidc/test_client_admin.py b/tests/oidc/test_client_admin.py index 221a0eed..6b42ff42 100644 --- a/tests/oidc/test_client_admin.py +++ b/tests/oidc/test_client_admin.py @@ -93,7 +93,7 @@ def test_client_add(testclient, logged_admin): "scope": "openid profile", "response_types": ["code", "token"], "token_endpoint_auth_method": "none", - "logo_uri": "https://foo.bar/logo.png", + "logo_uri": "https://foo.bar/logo.webp", "tos_uri": "https://foo.bar/tos", "policy_uri": "https://foo.bar/policy", "software_id": "software", @@ -121,7 +121,7 @@ def test_client_add(testclient, logged_admin): assert client.scope == ["openid", "profile"] assert client.response_types == ["code", "token"] assert client.token_endpoint_auth_method == "none" - assert client.logo_uri == "https://foo.bar/logo.png" + assert client.logo_uri == "https://foo.bar/logo.webp" assert client.tos_uri == "https://foo.bar/tos" assert client.policy_uri == "https://foo.bar/policy" assert client.software_id == "software" @@ -155,7 +155,7 @@ def test_client_edit(testclient, client, logged_admin, other_client): "scope": "openid profile", "response_types": ["code", "token"], "token_endpoint_auth_method": "none", - "logo_uri": "https://foo.bar/logo.png", + "logo_uri": "https://foo.bar/logo.webp", "tos_uri": "https://foo.bar/tos", "policy_uri": "https://foo.bar/policy", "software_id": "software", @@ -189,7 +189,7 @@ def test_client_edit(testclient, client, logged_admin, other_client): assert client.scope == ["openid", "profile"] assert client.response_types == ["code", "token"] assert client.token_endpoint_auth_method == "none" - assert client.logo_uri == "https://foo.bar/logo.png" + assert client.logo_uri == "https://foo.bar/logo.webp" assert client.tos_uri == "https://foo.bar/tos" assert client.policy_uri == "https://foo.bar/policy" assert client.software_id == "software" diff --git a/tests/oidc/test_dynamic_client_registration.py b/tests/oidc/test_dynamic_client_registration.py index e7e045ee..4fd05b46 100644 --- a/tests/oidc/test_dynamic_client_registration.py +++ b/tests/oidc/test_dynamic_client_registration.py @@ -21,7 +21,7 @@ def test_client_registration_with_authentication_static_token( ], "client_name": "My Example Client", "token_endpoint_auth_method": "client_secret_basic", - "logo_uri": "https://client.example.org/logo.png", + "logo_uri": "https://client.example.org/logo.webp", "jwks_uri": "https://client.example.org/my_public_keys.jwks", "grant_types": ["authorization_code"], "response_types": ["code"], @@ -38,7 +38,7 @@ def test_client_registration_with_authentication_static_token( "client_name": "My Example Client", "client_secret_expires_at": 0, "jwks_uri": "https://client.example.org/my_public_keys.jwks", - "logo_uri": "https://client.example.org/logo.png", + "logo_uri": "https://client.example.org/logo.webp", "redirect_uris": [ "https://client.example.org/callback", "https://client.example.org/callback2", @@ -54,7 +54,7 @@ def test_client_registration_with_authentication_static_token( "https://client.example.org/callback2", ] assert client.token_endpoint_auth_method == "client_secret_basic" - assert client.logo_uri == "https://client.example.org/logo.png" + assert client.logo_uri == "https://client.example.org/logo.webp" assert client.jwks_uri == "https://client.example.org/my_public_keys.jwks" client.delete() @@ -73,7 +73,7 @@ def test_client_registration_with_authentication_no_token( ], "client_name": "My Example Client", "token_endpoint_auth_method": "client_secret_basic", - "logo_uri": "https://client.example.org/logo.png", + "logo_uri": "https://client.example.org/logo.webp", "jwks_uri": "https://client.example.org/my_public_keys.jwks", "grant_types": ["authorization_code"], "response_types": ["code"], @@ -107,7 +107,7 @@ def test_client_registration_with_authentication_invalid_token( ], "client_name": "My Example Client", "token_endpoint_auth_method": "client_secret_basic", - "logo_uri": "https://client.example.org/logo.png", + "logo_uri": "https://client.example.org/logo.webp", "jwks_uri": "https://client.example.org/my_public_keys.jwks", "grant_types": ["authorization_code"], "response_types": ["code"], @@ -183,7 +183,7 @@ def test_client_registration_without_authentication_ok(testclient, backend): "client_name": "My Example Client", "client_uri": "https://example.com", "token_endpoint_auth_method": "client_secret_basic", - "logo_uri": "https://client.example.org/logo.png", + "logo_uri": "https://client.example.org/logo.webp", "jwks_uri": "https://client.example.org/my_public_keys.jwks", "grant_types": ["authorization_code", "implicit"], "response_types": ["code", "token"], @@ -206,7 +206,7 @@ def test_client_registration_without_authentication_ok(testclient, backend): "client_uri": "https://example.com", "client_secret_expires_at": 0, "jwks_uri": "https://client.example.org/my_public_keys.jwks", - "logo_uri": "https://client.example.org/logo.png", + "logo_uri": "https://client.example.org/logo.webp", "redirect_uris": [ "https://client.example.org/callback", "https://client.example.org/callback2", @@ -228,7 +228,7 @@ def test_client_registration_without_authentication_ok(testclient, backend): "https://client.example.org/callback2", ] assert client.token_endpoint_auth_method == "client_secret_basic" - assert client.logo_uri == "https://client.example.org/logo.png" + assert client.logo_uri == "https://client.example.org/logo.webp" assert client.jwks_uri == "https://client.example.org/my_public_keys.jwks" assert client.grant_types == ["authorization_code", "implicit"] assert client.response_types == ["code", "token"] diff --git a/tests/oidc/test_dynamic_client_registration_management.py b/tests/oidc/test_dynamic_client_registration_management.py index 496d2926..dd94c4d4 100644 --- a/tests/oidc/test_dynamic_client_registration_management.py +++ b/tests/oidc/test_dynamic_client_registration_management.py @@ -38,7 +38,7 @@ def test_get(testclient, backend, client, user): "response_types": ["code", "token", "id_token"], "client_name": "Some client", "client_uri": "https://mydomain.tld", - "logo_uri": "https://mydomain.tld/logo.png", + "logo_uri": "https://mydomain.tld/logo.webp", "scope": "openid email profile groups address phone", "contacts": ["contact@mydomain.tld"], "tos_uri": "https://mydomain.tld/tos", @@ -64,7 +64,7 @@ def test_update(testclient, backend, client, user): assert client.response_types != ["code", "token"] assert client.client_name != "new name" assert client.client_uri != "https://newname.example.org" - assert client.logo_uri != "https://newname.example.org/logo.png" + assert client.logo_uri != "https://newname.example.org/logo.webp" assert client.scope != ["openid", "profile", "email"] assert client.contacts != ["newcontact@example.org"] assert client.tos_uri != "https://newname.example.org/tos" @@ -81,7 +81,7 @@ def test_update(testclient, backend, client, user): "response_types": ["code", "token"], "client_name": "new name", "client_uri": "https://newname.example.org", - "logo_uri": "https://newname.example.org/logo.png", + "logo_uri": "https://newname.example.org/logo.webp", "scope": "openid profile email", "contacts": ["newcontact@example.org"], "tos_uri": "https://newname.example.org/tos", @@ -110,7 +110,7 @@ def test_update(testclient, backend, client, user): "response_types": ["code", "token"], "client_name": "new name", "client_uri": "https://newname.example.org", - "logo_uri": "https://newname.example.org/logo.png", + "logo_uri": "https://newname.example.org/logo.webp", "scope": "openid profile email", "contacts": ["newcontact@example.org"], "tos_uri": "https://newname.example.org/tos", @@ -127,7 +127,7 @@ def test_update(testclient, backend, client, user): assert client.response_types == ["code", "token"] assert client.client_name == "new name" assert client.client_uri == "https://newname.example.org" - assert client.logo_uri == "https://newname.example.org/logo.png" + assert client.logo_uri == "https://newname.example.org/logo.webp" assert client.scope == ["openid", "profile", "email"] assert client.contacts == ["newcontact@example.org"] assert client.tos_uri == "https://newname.example.org/tos"