From: Christopher Allan Webber Date: Wed, 22 May 2013 21:31:39 +0000 (-0500) Subject: Moved frontpage "welcome" stuff into its own bits file. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ae9eca1bf2ccc5da9022a5fdfe37d7948e73cd10;p=mediagoblin.git 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! --- 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 . +#} + +{% if request.user %} +

{% trans %}Explore{% endtrans %}

+{% else %} +

{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}

+ +

{% trans %}This site is running MediaGoblin, an extraordinarily great piece of media hosting software.{% endtrans %}

+

{% trans %}To add your own media, place comments, and more, you can log in with your MediaGoblin account.{% endtrans %}

+ {% if allow_registration %} +

{% trans %}Don't have one yet? It's easy!{% endtrans %}

+ {% trans register_url=request.urlgen('mediagoblin.auth.register') -%} + Create an account at this site + or + Set up MediaGoblin on your own server + {%- endtrans %} + {% endif %} +
+{% 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 %} -

{% trans %}Explore{% endtrans %}

- {% else %} -

{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}

- -

{% trans %}This site is running MediaGoblin, an extraordinarily great piece of media hosting software.{% endtrans %}

-

{% trans %}To add your own media, place comments, and more, you can log in with your MediaGoblin account.{% endtrans %}

- {% if allow_registration %} -

{% trans %}Don't have one yet? It's easy!{% endtrans %}

- {% trans register_url=request.urlgen('mediagoblin.auth.register') -%} - Create an account at this site - or - Set up MediaGoblin on your own server - {%- endtrans %} - {% endif %} -
- {% endif %} + {% include "mediagoblin/bits/frontpage_welcome.html" %} +

{% trans %}Most recent media{% endtrans %}

{{ object_gallery(request, media_entries, pagination) }}