mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
Convert help pages to templates
This commit is contained in:
parent
577dbb4fc5
commit
c50fe72587
@ -20,62 +20,15 @@ class Help(PagePlugin):
|
|||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
main="""
|
return util.render_template(template='help',
|
||||||
<p>There are a variety of places to go for help with Plinth
|
title=_('Documentation and FAQ'))
|
||||||
and the box it runs on.</p>
|
|
||||||
|
|
||||||
<p>This front end has a <a
|
|
||||||
href="/help/view/plinth">developer's manual</a>. It isn't
|
|
||||||
complete, but it is the first place to look. Feel free to
|
|
||||||
offer suggestions, edits, and screenshots for completing
|
|
||||||
it!</p>
|
|
||||||
|
|
||||||
<p><a href="http://wiki.debian.org/FreedomBox" target="_blank">A section of
|
|
||||||
the Debian wiki</a> is devoted to the %(box)s. At some
|
|
||||||
point the documentation in the wiki and the documentation in
|
|
||||||
the manual should dovetail.</p>
|
|
||||||
|
|
||||||
<p>There
|
|
||||||
are Debian gurus in the \#debian channels of both
|
|
||||||
irc.freenode.net and irc.oftc.net. They probably don't know
|
|
||||||
much about the %(box)s and almost surely know nothing of
|
|
||||||
this front end, but they are an incredible resource for
|
|
||||||
general Debian issues.</p>
|
|
||||||
|
|
||||||
<p>There is no <a href="/help/view/faq">FAQ</a> because
|
|
||||||
the question frequency is currently zero for all
|
|
||||||
questions.</p>
|
|
||||||
""" % {'box':cfg.box_name}
|
|
||||||
return util.render_template(title="Documentation and FAQ", main=main)
|
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def about(self):
|
def about(self):
|
||||||
return util.render_template(title=_("About the %s" % cfg.box_name),
|
return util.render_template(
|
||||||
main="""
|
template='about',
|
||||||
<img src="/static/theme/img/freedombox-logo-250px.png" class="main-graphic" />
|
title=_('About the {box_name}').format(box_name=cfg.box_name))
|
||||||
<p>We live in a world where our use of the network is
|
|
||||||
mediated by those who often do not have our best
|
|
||||||
interests at heart. By building software that does not rely on
|
|
||||||
a central service, we can regain control and privacy. By
|
|
||||||
keeping our data in our homes, we gain useful legal
|
|
||||||
protections over it. By giving back power to the users over
|
|
||||||
their networks and machines, we are returning the Internet to
|
|
||||||
its intended peer-to-peer architecture.</p>
|
|
||||||
|
|
||||||
<p>In order to bring about the new network order, it is
|
|
||||||
paramount that it is easy to convert to it. The hardware it
|
|
||||||
runs on must be cheap. The software it runs on must be easy to
|
|
||||||
install and administrate by anybody. It must be easy to
|
|
||||||
transition from existing services.</p>
|
|
||||||
<p><a class="btn btn-primary btn-large" href="http://wiki.debian.org/FreedomBox" target="_blank">Learn more »</a></p>""",
|
|
||||||
sidebar_right=_("""<strong>Our Goal</strong><p>There are a number of projects working to realize a future
|
|
||||||
of distributed services; we aim to bring them all together in
|
|
||||||
a convenient package.</p>
|
|
||||||
|
|
||||||
<p>For more information about the FreedomBox project, see the
|
|
||||||
<a href="http://wiki.debian.org/FreedomBox">Debian
|
|
||||||
Wiki</a>.</p>
|
|
||||||
"""))
|
|
||||||
|
|
||||||
class View(PagePlugin):
|
class View(PagePlugin):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
43
modules/installed/help/templates/about.html
Normal file
43
modules/installed/help/templates/about.html
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{% extends 'login_nav.html' %}
|
||||||
|
|
||||||
|
{% block main_block %}
|
||||||
|
|
||||||
|
<img src="{{ basehref }}/static/theme/img/freedombox-logo-250px.png"
|
||||||
|
class="main-graphic" />
|
||||||
|
|
||||||
|
<p>We live in a world where our use of the network is mediated by
|
||||||
|
those who often do not have our best interests at heart. By building
|
||||||
|
software that does not rely on a central service, we can regain
|
||||||
|
control and privacy. By keeping our data in our homes, we gain useful
|
||||||
|
legal protections over it. By giving back power to the users over
|
||||||
|
their networks and machines, we are returning the Internet to its
|
||||||
|
intended peer-to-peer architecture.</p>
|
||||||
|
|
||||||
|
<p>In order to bring about the new network order, it is
|
||||||
|
paramount that it is easy to convert to it. The hardware it
|
||||||
|
runs on must be cheap. The software it runs on must be easy to
|
||||||
|
install and administrate by anybody. It must be easy to
|
||||||
|
transition from existing services.</p>
|
||||||
|
|
||||||
|
<p><a class="btn btn-primary btn-large"
|
||||||
|
href="http://wiki.debian.org/FreedomBox" target="_blank">Learn more
|
||||||
|
»</a></p>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sidebar_right_block %}
|
||||||
|
|
||||||
|
<div class="well sidebar-nav">
|
||||||
|
|
||||||
|
<h3>Our Goal</h3>
|
||||||
|
|
||||||
|
<p>There are a number of projects working to realize a future of
|
||||||
|
distributed services; we aim to bring them all together in a
|
||||||
|
convenient package.</p>
|
||||||
|
|
||||||
|
<p>For more information about the FreedomBox project, see the
|
||||||
|
<a href="http://wiki.debian.org/FreedomBox">Debian Wiki</a>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
27
modules/installed/help/templates/help.html
Normal file
27
modules/installed/help/templates/help.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{% extends 'login_nav.html' %}
|
||||||
|
|
||||||
|
{% block main_block %}
|
||||||
|
|
||||||
|
<p>There are a variety of places to go for help with
|
||||||
|
{{ cfg.product_name }} and the box it runs on.</p>
|
||||||
|
|
||||||
|
<p>This front end has a <a href="{{ basehref }}/help/view/plinth">
|
||||||
|
developer's manual</a>. It isn't complete, but it is the first place
|
||||||
|
to look. Feel free to offer suggestions, edits, and screenshots for
|
||||||
|
completing it!</p>
|
||||||
|
|
||||||
|
<p><a href="http://wiki.debian.org/FreedomBox" target="_blank">A
|
||||||
|
section of the Debian wiki</a> is devoted to the {{ cfg.box_name }}.
|
||||||
|
At some point the documentation in the wiki and the documentation in
|
||||||
|
the manual should dovetail.</p>
|
||||||
|
|
||||||
|
<p>There are Debian gurus in the \#debian channels of both
|
||||||
|
irc.freenode.net and irc.oftc.net. They probably don't know much
|
||||||
|
about the {{ cfg.box_name }} and almost surely know nothing of this
|
||||||
|
front end, but they are an incredible resource for general Debian
|
||||||
|
issues.</p>
|
||||||
|
|
||||||
|
<p>There is no <a href="{{ basehref }}/help/view/faq">FAQ</a> because
|
||||||
|
the question frequency is currently zero for all questions.</p>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -129,11 +129,13 @@
|
|||||||
{{ sidebar_left|safe }}
|
{{ sidebar_left|safe }}
|
||||||
</div><!--/.well -->
|
</div><!--/.well -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if sidebar_right %}
|
{% block sidebar_right_block %}
|
||||||
<div class="well sidebar-nav">
|
{% if sidebar_right %}
|
||||||
{{ sidebar_right|safe }}
|
<div class="well sidebar-nav">
|
||||||
</div><!--/.well -->
|
{{ sidebar_right|safe }}
|
||||||
{% endif %}
|
</div><!--/.well -->
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user