aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-05-22 16:31:39 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-05-22 16:33:07 -0500
commitae9eca1bf2ccc5da9022a5fdfe37d7948e73cd10 (patch)
tree9479204ea59ee0979a2fac4b37db82998881c64b
parentcac478e5aac621fc80adf0ef4534c646ab3c4fdc (diff)
downloadmediagoblin-ae9eca1bf2ccc5da9022a5fdfe37d7948e73cd10.tar.lz
mediagoblin-ae9eca1bf2ccc5da9022a5fdfe37d7948e73cd10.tar.xz
mediagoblin-ae9eca1bf2ccc5da9022a5fdfe37d7948e73cd10.zip
Moved frontpage "welcome" stuff into its own bits file.
This should make it easier to override just that part of the page. This commit sponsored by David Rylander. Thank you!
-rw-r--r--mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html35
-rw-r--r--mediagoblin/templates/mediagoblin/root.html19
2 files changed, 37 insertions, 17 deletions
diff --git a/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html b/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html
new file mode 100644
index 00000000..544ee146
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html
@@ -0,0 +1,35 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
+#
+# 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 <http://www.gnu.org/licenses/>.
+#}
+
+{% if request.user %}
+ <h1>{% trans %}Explore{% endtrans %}</h1>
+{% else %}
+ <h1>{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}</h1>
+ <img class="right_align" src="{{ request.staticdirect('/images/frontpage_image.png') }}" />
+ <p>{% trans %}This site is running <a href="http://mediagoblin.org">MediaGoblin</a>, an extraordinarily great piece of media hosting software.{% endtrans %}</p>
+ <p>{% trans %}To add your own media, place comments, and more, you can log in with your MediaGoblin account.{% endtrans %}</p>
+ {% if allow_registration %}
+ <p>{% trans %}Don't have one yet? It's easy!{% endtrans %}</p>
+ {% trans register_url=request.urlgen('mediagoblin.auth.register') -%}
+ <a class="button_action_highlight" href="{{ register_url }}">Create an account at this site</a>
+ or
+ <a class="button_action" href="http://wiki.mediagoblin.org/HackingHowto">Set up MediaGoblin on your own server</a>
+ {%- endtrans %}
+ {% endif %}
+ <div class="clear"></div>
+{% endif %}
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html
index 529d89ef..15d53af1 100644
--- a/mediagoblin/templates/mediagoblin/root.html
+++ b/mediagoblin/templates/mediagoblin/root.html
@@ -27,23 +27,8 @@
{%- endblock mediagoblin_head %}
{% block mediagoblin_content %}
- {% if request.user %}
- <h1>{% trans %}Explore{% endtrans %}</h1>
- {% else %}
- <h1>{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}</h1>
- <img class="right_align" src="{{ request.staticdirect('/images/frontpage_image.png') }}" />
- <p>{% trans %}This site is running <a href="http://mediagoblin.org">MediaGoblin</a>, an extraordinarily great piece of media hosting software.{% endtrans %}</p>
- <p>{% trans %}To add your own media, place comments, and more, you can log in with your MediaGoblin account.{% endtrans %}</p>
- {% if allow_registration %}
- <p>{% trans %}Don't have one yet? It's easy!{% endtrans %}</p>
- {% trans register_url=request.urlgen('mediagoblin.auth.register') -%}
- <a class="button_action_highlight" href="{{ register_url }}">Create an account at this site</a>
- or
- <a class="button_action" href="http://wiki.mediagoblin.org/HackingHowto">Set up MediaGoblin on your own server</a>
- {%- endtrans %}
- {% endif %}
- <div class="clear"></div>
- {% endif %}
+ {% include "mediagoblin/bits/frontpage_welcome.html" %}
+
<h2>{% trans %}Most recent media{% endtrans %}</h2>
{{ object_gallery(request, media_entries, pagination) }}