diff --git a/plinth/client.py b/plinth/client.py new file mode 100644 index 000000000..4d40bb7ae --- /dev/null +++ b/plinth/client.py @@ -0,0 +1,30 @@ +# +# This file is part of Plinth. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +""" +Django models for the main application +""" + +from collections import namedtuple + +web_client = namedtuple('Web_Client', ['name', 'url']) + +desktop_client = namedtuple('Desktop_clients', ['name', 'url']) + +mobile_client = namedtuple('Mobile_clients', ['name', + 'fully_qualified_name', + 'fdroid_url', 'play_store_url']) diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html new file mode 100644 index 000000000..63786dd6c --- /dev/null +++ b/plinth/templates/clients.html @@ -0,0 +1,78 @@ +{% comment %} +# +# This file is part of Plinth. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +{% endcomment %} + +{% load i18n %} + +{% if module.web_clients %} +
+

{% trans "Web Clients" %}: +

    + {% for client in module.web_clients %} +
  • + {{ client.name}} +
  • + {% endfor %} +
+
+{% endif %} + +{% if module.desktop_clients %} +
+

{% trans "Desktop Clients" %}: +

    + {% for client in module.desktop_clients %} +
  • + + {{ client.name }} + +
  • + {% endfor %} +
+
+{% endif %} + +{% if module.mobile_clients %} +
+ {% load static %} +

{% trans "Mobile Clients" %}:

+
    + {% for client in module.mobile_clients %} +
  • {{ client.name }}
  • +
    + {% if client.fdroid_url %} +
    + + + +
    + {% endif %} + {% if client.play_store_url %} +
    + + + +
    + {% endif %} +
    + {% endfor %} +
+
+{% endif %} \ No newline at end of file diff --git a/static/themes/default/css/plinth.css b/static/themes/default/css/plinth.css index 8208111d6..5717e2e40 100644 --- a/static/themes/default/css/plinth.css +++ b/static/themes/default/css/plinth.css @@ -115,6 +115,24 @@ footer license-info p{ margin: 20px 0; } +.clients-info { + padding-top: 15px; +} + +.heading { + font-weight: bold; + display: inline; +} + +.clients-info li { + float: left; + padding-left: 15px; +} + +.clients-info li span { + position: relative; + left: -18px; +} .shortcut-label { min-height:50px; } \ No newline at end of file