feat: convert the png in webp

This commit is contained in:
Éloi Rivard 2023-12-01 22:09:54 +01:00
parent 0b2c980173
commit 066aed7735
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
43 changed files with 51 additions and 46 deletions

View file

@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
Changed
*******
- Convert all the png in webp. :pr:`182`
[0.0.37] - 2023-12-01
=====================

View file

@ -1,5 +1,5 @@
<div align="center">
<img src="canaille/static/img/canaille-full.png" height="200" alt="Canaille" />
<img src="canaille/static/img/canaille-full.webp" height="200" alt="Canaille" />
</div>
**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
<div align="center">
<img src="doc/_static/login.png" width="225" alt="Canaille login page" />
<img src="doc/_static/profile.png" width="225" alt="Canaille profile page" />
<img src="doc/_static/consent.png" width="225" alt="Canaille consent page" />
<img src="doc/_static/login.webp" width="225" alt="Canaille login page" />
<img src="doc/_static/profile.webp" width="225" alt="Canaille profile page" />
<img src="doc/_static/consent.webp" width="225" alt="Canaille consent page" />
</div>
# Try it!

View file

@ -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

View file

@ -8,7 +8,7 @@
{% block content %}
<div class="ui clearing segment">
<a href="{{ url_for('core.account.index') }}">
<img class="ui tiny centered image" src="/static/img/canaille-head.png" alt="{{ website_name }}">
<img class="ui tiny centered image" src="/static/img/canaille-head.webp" alt="{{ website_name }}">
</a>
<h2 class="ui center aligned header">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -18,7 +18,7 @@
<div class="ui masthead center aligned segment">
<div class="ui text container">
<h2 class="ui header">
<img class="ui image" src="/static/img/canaille-head.png" alt="Canaille client" />
<img class="ui image" src="/static/img/canaille-head.webp" alt="Canaille client" />
<div class="content">
{{ name }}
</div>

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
doc/_static/canaille-c.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
doc/_static/canaille-full.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

BIN
doc/_static/canaille-head.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

BIN
doc/_static/canaille-label.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
doc/_static/consent.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
doc/_static/login.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

BIN
doc/_static/login.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
doc/_static/logo.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

BIN
doc/_static/logo.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

BIN
doc/_static/profile.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -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 ---------------------------------------------

View file

@ -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

View file

@ -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()

View file

@ -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": {

View file

@ -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=[

View file

@ -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"

View file

@ -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"]

View file

@ -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"