License updated ikiwiki icon added title indented

This commit is contained in:
mridulnagpal 2016-12-07 19:44:15 +05:30 committed by James Valleroy
parent 722451305c
commit 06fb7fab3b
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
19 changed files with 40 additions and 21 deletions

View File

@ -42,3 +42,16 @@ otherwise.
- static/themes/default/img/network-freedombox.svg :: [[http://thread.gmane.org/gmane.linux.debian.freedombox.user/4124/focus=4439][GPL3+/CC-BY-SA]]
- static/themes/default/img/network-internet.svg :: [[http://tango.freedesktop.org/][Public Domain]]
- static/themes/default/img/network-wireless.svg :: [[http://tango.freedesktop.org/][Public Domain]]
- static/themes/default/icons/deluge.png :: -
- static/themes/default/icons/ikiwiki.png :: -
- static/themes/default/icons/jsxc.png :: -
- static/themes/default/icons/minetest.png :: -
- static/themes/default/icons/mumble.png :: -
- static/themes/default/icons/privoxy.png :: -
- static/themes/default/icons/quassel.png :: -
- static/themes/default/icons/radicale.png :: -
- static/themes/default/icons/repro.png :: -
- static/themes/default/icons/roundcube.png :: -
- static/themes/default/icons/transmission.png :: -
- static/themes/default/icons/ttrss.png :: -
- static/themes/default/icons/xmpp.png :: -

View File

@ -28,12 +28,15 @@ def get_shortcuts():
def add_shortcut(id, label, url, icon, details=None, configure_url=None,
login_required=False):
login_required=False, icon_url=None):
"""Add shortcut to front page."""
if not url:
url = '?selected={id}'.format(id=id)
if not icon_url:
icon_url = id
shortcuts[id] = {
'id': id,
'label': label,
@ -42,6 +45,7 @@ def add_shortcut(id, label, url, icon, details=None, configure_url=None,
'login_required': login_required,
'details': details,
'configure_url': configure_url,
'icon_url': icon_url,
}

View File

@ -38,7 +38,7 @@ managed_services = ['deluge-web']
managed_packages = ['deluged', 'deluge-web']
title = _('BitTorrent Web Client (Deluge)')
title = ('BitTorrent Web Client \n (Deluge)')
description = [
_('Deluge is a BitTorrent client that features a Web UI.'),

View File

@ -84,7 +84,7 @@ def add_shortcuts():
for site in sites:
frontpage.add_shortcut(
'ikiwiki_' + site, site, '/ikiwiki/' + site, 'glyphicon-edit',
login_required=False)
login_required=False, icon_url='ikiwiki')
def is_enabled():

View File

@ -46,7 +46,7 @@ managed_packages = ['minetest-server', 'minetest-mod-advspawning',
'minetest-mod-nether', 'minetest-mod-torches',
]
title = _('Block Sandbox (Minetest)')
title = ('Block Sandbox \n (Minetest)')
description = [
format_lazy(

View File

@ -34,7 +34,7 @@ version = 1
depends = ['apps']
title = _('Voice Chat (Mumble)')
title = ('Voice Chat \n (Mumble)')
service = None

View File

@ -41,7 +41,7 @@ managed_services = ['privoxy']
managed_packages = ['privoxy']
title = _('Web Proxy (Privoxy)')
title = ('Web Proxy \n (Privoxy)')
description = [
_('Privoxy is a non-caching web proxy with advanced filtering '

View File

@ -40,7 +40,7 @@ managed_services = ['quasselcore']
managed_packages = ['quassel-core']
title = _('IRC Client (Quassel)')
title = ('IRC Client \n (Quassel)')
description = [
format_lazy(

View File

@ -40,7 +40,7 @@ managed_services = ['radicale']
managed_packages = ['radicale']
title = _('Calendar and Addressbook (Radicale)')
title = ('Calendar and Addressbook \n (Radicale)')
description = [
format_lazy(

View File

@ -37,7 +37,7 @@ managed_services = ['repro']
managed_packages = ['repro']
title = _('SIP Server (repro)')
title = ('SIP Server \n (repro)')
description = [
_('repro provides various SIP services that a SIP softphone can utilize '

View File

@ -34,7 +34,7 @@ managed_services = ['node-restore']
managed_packages = ['node-restore']
title = _('Unhosted Storage (reStore)')
title = ('Unhosted Storage \n (reStore)')
description = [
format_lazy(

View File

@ -34,7 +34,7 @@ depends = ['apps']
managed_packages = ['sqlite3', 'roundcube', 'roundcube-sqlite3']
title = _('Email Client (Roundcube)')
title = ('Email Client \n (Roundcube)')
description = [
_('Roundcube webmail is a browser-based multilingual IMAP '

View File

@ -34,7 +34,7 @@ depends = ['apps']
managed_packages = ['shaarli']
title = _('Bookmarks (Shaarli)')
title = ('Bookmarks \n (Shaarli)')
description = [
_('Shaarli allows you to save and share bookmarks.'),

View File

@ -39,7 +39,7 @@ depends = ['apps', 'names']
managed_packages = ['tor', 'tor-geoipdb', 'torsocks', 'obfs4proxy',
'apt-transport-tor']
title = _('Anonymity Network (Tor)')
title = ('Anonymity Network \n (Tor)')
description = [
_('Tor is an anonymous communication system. You can learn more '

View File

@ -37,7 +37,7 @@ managed_services = ['transmission-daemon']
managed_packages = ['transmission-daemon']
title = _('BitTorrent (Transmission)')
title = ('BitTorrent \n (Transmission)')
description = [
_('BitTorrent is a peer-to-peer file sharing protocol. '

View File

@ -36,7 +36,7 @@ managed_services = ['tt-rss']
managed_packages = ['tt-rss', 'postgresql', 'dbconfig-pgsql', 'php-pgsql']
title = _('News Feed Reader (Tiny Tiny RSS)')
title = ('News Feed Reader \n (Tiny Tiny RSS)')
description = [
_('Tiny Tiny RSS is a news feed (RSS/Atom) reader and aggregator, '

View File

@ -41,7 +41,7 @@ managed_services = ['ejabberd']
managed_packages = ['libjs-jsxc', 'ejabberd']
title = _('Chat Server (XMPP)')
title = ('Chat Server \n (XMPP)')
description = [
_('XMPP is an open and standardized communication protocol. Here '
@ -98,7 +98,7 @@ def setup(helper, old_version=None):
def add_shortcut():
frontpage.add_shortcut('jsxc', _('Chat Client (jsxc)'),
frontpage.add_shortcut('jsxc', ('Chat Client \n (jsxc)'),
reverse_lazy('xmpp:jsxc'), 'glyphicon-comment',
None, login_required=True)
frontpage.add_shortcut('xmpp', title, None, 'glyphicon-comment',

View File

@ -38,9 +38,9 @@
<a href="{{ shortcut.url }}">
{% endif %}
<center>
<img src="{% static 'theme/icons/' %}{{ shortcut.id }}.png" style="max-width: 100px; height: 100px"/>
<img src="{% static 'theme/icons/' %}{{ shortcut.icon_url }}.png" style="max-width: 100px; height: 100px" />
<br>
{{ shortcut.label }}
{{ shortcut.label|linebreaks }}
</center>
</a>
</li>

View File

@ -38,11 +38,12 @@ def index(request):
shortcuts = frontpage.get_shortcuts()
selection = request.GET.get('selected')
details, details_label, configure_url = None, None, None
details, details_label, configure_url, icon_url = None, None, None, None
if selection in frontpage.shortcuts:
details = frontpage.shortcuts[selection]['details']
details_label = frontpage.shortcuts[selection]['label']
configure_url = frontpage.shortcuts[selection]['configure_url']
icon_url = frontpage.shortcuts[selection]['icon_url']
return TemplateResponse(request, 'index.html',
{'title': _('FreedomBox'),
@ -50,7 +51,8 @@ def index(request):
'selected_id': selection,
'details': details,
'details_label': details_label,
'configure_url': configure_url})
'configure_url': configure_url,
'icon_url': icon_url, })
class ServiceView(FormView):