diff --git a/LICENSES b/LICENSES index f9652eb6b..d0e7cd9b5 100644 --- a/LICENSES +++ b/LICENSES @@ -63,9 +63,9 @@ otherwise. - static/themes/default/icons/tahoe.png :: [[https://github.com/thekishanraval/Logos][GPLv3+]] - static/themes/default/icons/transmission.png :: [[https://transmissionbt.com/][GPL]] - static/themes/default/icons/ttrss.png :: [[https://tt-rss.org/gitlab/fox/tt-rss][GPL]] -- static/themes/default/icons/f-droid.png :: [[https://commons.wikimedia.org/wiki/File%3AGet_it_on_F-Droid_(material_design).svg][GPLv3]] -- static/themes/default/icons/google-play.png :: [[https://upload.wikimedia.org/wikipedia/commons/c/cd/Get_it_on_Google_play.svg][Public Domain]] -- static/themes/default/icons/app-store.png :: [[https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Download_on_the_App_Store_Badge.svg/500px-Download_on_the_App_Store_Badge.svg.png][Public Domain]] +- static/themes/default/icons/f-droid.png :: [[https://gitlab.com/fdroid/artwork/blob/master/fdroid-logo-2015/fdroid-logo.svg][CC-BY-SA 3.0 or GPLv3+]] +- static/themes/default/icons/google-play.png :: [[https://thenounproject.com/icon/887917/download/color/000000/png/][CC BY 3.0 US]] +- static/themes/default/icons/app-store.png :: [[https://thenounproject.com/icon/162372/download/color/000000/png/][CC BY 3.0 US]] - static/themes/default/icons/apple.png :: [[https://thenounproject.com/icon/1203053/download/color/000000/png][CC BY 3.0 US]] - static/themes/default/icons/windows.png :: [[https://thenounproject.com/icon/1206946/download/color/000000/png][CC BY 3.0 US]] - static/themes/default/icons/gnu-linux.png :: [[https://upload.wikimedia.org/wikipedia/commons/9/95/Tux-icon-mono.svg][Public Domain]] diff --git a/plinth/modules/ejabberd/manifest.py b/plinth/modules/ejabberd/manifest.py index 7c7d6f066..12d222b32 100644 --- a/plinth/modules/ejabberd/manifest.py +++ b/plinth/modules/ejabberd/manifest.py @@ -49,7 +49,7 @@ _clients = [{ }] }, { 'name': - _('Chat secure - Encrypted Messenger'), + _('Chat secure'), 'description': _('ChatSecure is a free and open source ' 'messaging app that features OTR encryption ' diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html index 069cfc951..0e9158d7b 100644 --- a/plinth/templates/clients.html +++ b/plinth/templates/clients.html @@ -33,78 +33,44 @@ {% if clients|has_web_clients %} {% with clients|of_type:'web' as web_clients %} - - Web - {% with web_clients|first as client %} + {% for client in web_clients %} + + {% if forloop.counter == 1 %} + Web + {% endif %} {% for platform in client.platforms %} {% if platform.type == 'web' %} {{ client.name }} - - + + Launch {% endif %} {% endfor %} - {% endwith %} - - {% for client in web_clients|slice:"1:" %} - {% for platform in client.platforms %} - {% if platform.type == 'web' %} - - {{ client.name }} - - - - - - - {% endif %} - {% endfor %} + {% endfor %} {% endwith %} {% endif %} {% if clients|has_desktop_clients %} {% with clients|of_type:'desktop' as desktop_clients %} - - Desktop - {% with desktop_clients|first as client %} - {{ client.name }} - -
- {% for platform in client.platforms %} - {% if platform.type == 'download' %} -
- - {% with 'theme/icons/'|add:platform.os|add:'.png' as icon %} - - {% endwith %} - -
- {% endif %} - {% endfor %} -
- - {% endwith %} - - {% for client in desktop_clients|slice:"1:" %} + {% for client in desktop_clients %} + {% if forloop.counter == 1 %} + Desktop + {% endif %} {{ client.name }} -
- {% for platform in client.platforms %} - {% if platform.type == 'download' %} -
- - {% with 'theme/icons/'|add:platform.os|add:'.png' as icon %} - - {% endwith %} - -
- {% endif %} - {% endfor %} -
+ {% for platform in client.platforms %} + {% if platform.type == 'download' %} + + {% with 'theme/icons/'|add:platform.os|add:'.png' as icon %} + {{ platform.os|display_name }} + {% endwith %} + + {% endif %} + {% endfor %} {% endfor %} @@ -113,44 +79,22 @@ {% if clients|has_mobile_clients %} {% with clients|of_type:'mobile' as mobile_clients %} - - Mobile - {% with mobile_clients|first as client %} - {{ client.name }} - -
- {% for platform in client.platforms %} - {% if platform.type == 'store' and platform.os == 'android' or platform.os == 'ios' %} -
- - {% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %} - - {% endwith %} - -
- {% endif %} - {% endfor %} -
- - {% endwith %} - - {% for client in mobile_clients|slice:"1:" %} + {% for client in mobile_clients %} + {% if forloop.counter == 1 %} + Mobile + {% endif %} {{ client.name }} -
- {% for platform in client.platforms %} - {% if platform.type == 'store' and platform.os == 'android' or platform.os == 'ios' %} -
- - {% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %} - - {% endwith %} - -
- {% endif %} - {% endfor %} -
+ {% for platform in client.platforms %} + {% if platform.type == 'store' and platform.os == 'android' or platform.os == 'ios' %} + + {% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %} + {{ platform.store_name|display_name }} + {% endwith %} + + {% endif %} + {% endfor %} {% endfor %} @@ -159,28 +103,11 @@ {% if clients|has_package_clients %} {% with clients|of_type:'package' as package_clients %} - - Package - {% with package_clients|first as client %} - {{ client.name }} - -
- -
- - {% endwith %} - - {% for client in package_clients|slice:"1:" %} + {% for client in package_clients %} + {% if forloop.counter == 1 %} + Package + {% endif %} {{ client.name }}
@@ -204,5 +131,5 @@ {% endif %} - {% endif %} + diff --git a/plinth/templatetags/plinth_extras.py b/plinth/templatetags/plinth_extras.py index d490a9996..c62ae89de 100644 --- a/plinth/templatetags/plinth_extras.py +++ b/plinth/templatetags/plinth_extras.py @@ -132,3 +132,16 @@ def of_type(clients, typ): 'package': has_package_clients, } return list(filter(filters.get(typ, lambda x: x), clients)) + + +@register.filter(name='display_name') +def display_name(string): + names = { + 'gnu-linux': 'GNU/Linux', + 'windows': 'Windows', + 'mac-os': 'macOS', + 'google-play': 'Play Store', + 'f-droid': 'F-Droid', + 'app-store': 'App Store' + } + return names.get(string, string) diff --git a/static/themes/default/css/plinth.css b/static/themes/default/css/plinth.css index 37ce770c4..a2aeb5583 100644 --- a/static/themes/default/css/plinth.css +++ b/static/themes/default/css/plinth.css @@ -144,19 +144,22 @@ footer license-info p { left: -18px; } -.store-icon { - display: block; +.client-icon { + display: inline-block; width: 100%; height: auto; + max-height: 20px; + max-width: 20px; + margin: auto; } -.os-icon { - display: block; - width: auto; - height: auto; - max-height: 40px; - max-width: 40px; - margin: auto; +#clients .btn { + width: 8em; + margin-right: 1em; +} + +#clients th, #clients td { + line-height: 3.1em; } .shortcut-label { diff --git a/static/themes/default/icons/app-store.png b/static/themes/default/icons/app-store.png index 1842b0fae..0c582da2a 100644 Binary files a/static/themes/default/icons/app-store.png and b/static/themes/default/icons/app-store.png differ diff --git a/static/themes/default/icons/app-store.svg b/static/themes/default/icons/app-store.svg new file mode 100644 index 000000000..585314db5 --- /dev/null +++ b/static/themes/default/icons/app-store.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/themes/default/icons/f-droid.png b/static/themes/default/icons/f-droid.png index d12c7c485..7c94bbdd4 100644 Binary files a/static/themes/default/icons/f-droid.png and b/static/themes/default/icons/f-droid.png differ diff --git a/static/themes/default/icons/f-droid.svg b/static/themes/default/icons/f-droid.svg new file mode 100644 index 000000000..cf403478e --- /dev/null +++ b/static/themes/default/icons/f-droid.svg @@ -0,0 +1,129 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/themes/default/icons/google-play.png b/static/themes/default/icons/google-play.png index e757ccd4b..9d0d83290 100644 Binary files a/static/themes/default/icons/google-play.png and b/static/themes/default/icons/google-play.png differ diff --git a/static/themes/default/icons/google-play.svg b/static/themes/default/icons/google-play.svg new file mode 100644 index 000000000..1bbc4b48c --- /dev/null +++ b/static/themes/default/icons/google-play.svg @@ -0,0 +1 @@ + \ No newline at end of file