aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/404.html19
-rw-r--r--mediagoblin/templates/mediagoblin/auth/change_fp.html15
-rw-r--r--mediagoblin/templates/mediagoblin/auth/forgot_password.html11
-rw-r--r--mediagoblin/templates/mediagoblin/auth/login.html26
-rw-r--r--mediagoblin/templates/mediagoblin/auth/register.html9
-rw-r--r--mediagoblin/templates/mediagoblin/base.html56
-rw-r--r--mediagoblin/templates/mediagoblin/edit/attachments.html8
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit.html10
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit_account.html45
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit_profile.html8
-rw-r--r--mediagoblin/templates/mediagoblin/listings/tag.html19
-rw-r--r--mediagoblin/templates/mediagoblin/media_displays/ascii.html40
-rw-r--r--mediagoblin/templates/mediagoblin/media_displays/image.html (renamed from mediagoblin/templates/mediagoblin/auth/fp_changed_success.html)12
-rw-r--r--mediagoblin/templates/mediagoblin/media_displays/video.html52
-rw-r--r--mediagoblin/templates/mediagoblin/root.html37
-rw-r--r--mediagoblin/templates/mediagoblin/submit/start.html6
-rw-r--r--mediagoblin/templates/mediagoblin/test_submit.html2
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/gallery.html43
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html266
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html10
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/processing_panel.html6
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html52
-rw-r--r--mediagoblin/templates/mediagoblin/utils/object_gallery.html12
-rw-r--r--mediagoblin/templates/mediagoblin/utils/pagination.html8
-rw-r--r--mediagoblin/templates/mediagoblin/utils/prev_next.html46
-rw-r--r--mediagoblin/templates/mediagoblin/utils/tags.html24
-rw-r--r--mediagoblin/templates/mediagoblin/utils/wtforms.html14
-rw-r--r--mediagoblin/templates/mediagoblin/webfinger/host-meta.xml27
-rw-r--r--mediagoblin/templates/mediagoblin/webfinger/xrd.xml (renamed from mediagoblin/templates/mediagoblin/auth/fp_email_sent.html)29
29 files changed, 530 insertions, 382 deletions
diff --git a/mediagoblin/templates/mediagoblin/404.html b/mediagoblin/templates/mediagoblin/404.html
index 7db68941..392c14f5 100644
--- a/mediagoblin/templates/mediagoblin/404.html
+++ b/mediagoblin/templates/mediagoblin/404.html
@@ -18,17 +18,12 @@
{% extends "mediagoblin/base.html" %}
{% block mediagoblin_content %}
+ <img class="right_align" src="{{ request.staticdirect('/images/404.png') }}"
+ alt="{% trans %}Image of 404 goblin stressing out{% endtrans %}" />
<h1>{% trans %}Oops!{% endtrans %}</h1>
-
- <div class="grid_8 alpha">
- <p>{% trans %}There doesn't seem to be a page at this address. Sorry!{% endtrans %}</p>
- <p>
- {%- trans %}If you're sure the address is correct, maybe the page you're looking for has been moved or deleted.{% endtrans -%}
- </p>
- </div>
-
- <div class="grid_8 omega">
- <img src="{{ request.staticdirect('/images/404.png') }}"
- alt="{% trans %}Image of 404 goblin stressing out{% endtrans %}" />
- </div>
+ <p>{% trans %}There doesn't seem to be a page at this address. Sorry!{% endtrans %}</p>
+ <p>
+ {%- trans %}If you're sure the address is correct, maybe the page you're looking for has been moved or deleted.{% endtrans -%}
+ </p>
+ <div class="clear"></div>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/change_fp.html b/mediagoblin/templates/mediagoblin/auth/change_fp.html
index 53186cec..d95516e8 100644
--- a/mediagoblin/templates/mediagoblin/auth/change_fp.html
+++ b/mediagoblin/templates/mediagoblin/auth/change_fp.html
@@ -19,20 +19,21 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
-{% block mediagoblin_content %}
+{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/show_password.js') }}"></script>
+{% endblock mediagoblin_head %}
+{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.auth.verify_forgot_password') }}"
method="POST" enctype="multipart/form-data">
{{ csrf_token }}
-
- <div class="grid_6 prefix_1 suffix_1 form_box">
- <h1>{% trans %}Enter your new password{% endtrans %}</h1>
-
+ <div class="form_box">
+ <h1>{% trans %}Set your new password{% endtrans %}</h1>
{{ wtforms_util.render_divs(cp_form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button"/>
+ <input type="submit" value="{% trans %}Set password{% endtrans %}" class="button_form"/>
</div>
-
</div>
</form>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/forgot_password.html b/mediagoblin/templates/mediagoblin/auth/forgot_password.html
index b95a4dcb..672e9d9a 100644
--- a/mediagoblin/templates/mediagoblin/auth/forgot_password.html
+++ b/mediagoblin/templates/mediagoblin/auth/forgot_password.html
@@ -20,20 +20,15 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_content %}
-
<form action="{{ request.urlgen('mediagoblin.auth.forgot_password') }}"
method="POST" enctype="multipart/form-data">
{{ csrf_token }}
-
- <div class="grid_6 prefix_1 suffix_1 form_box">
- <h1>{% trans %}Enter your username or email{% endtrans %}</h1>
-
+ <div class="form_box">
+ <h1>{% trans %}Recover password{% endtrans %}</h1>
{{ wtforms_util.render_divs(fp_form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button"/>
+ <input type="submit" value="{% trans %}Send instructions{% endtrans %}" class="button_form"/>
</div>
-
</div>
</form>
{% endblock %}
-
diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html
index 61c5a203..993790eb 100644
--- a/mediagoblin/templates/mediagoblin/auth/login.html
+++ b/mediagoblin/templates/mediagoblin/auth/login.html
@@ -23,34 +23,30 @@
<form action="{{ request.urlgen('mediagoblin.auth.login') }}"
method="POST" enctype="multipart/form-data">
{{ csrf_token }}
- <div class="grid_6 prefix_1 suffix_1 form_box">
+ <div class="form_box">
<h1>{% trans %}Log in{% endtrans %}</h1>
{% if login_failed %}
<div class="form_field_error">
{% trans %}Logging in failed!{% endtrans %}
</div>
{% endif %}
- {{ wtforms_util.render_divs(login_form) }}
- <div class="form_submit_buttons">
- <input type="submit" value="{% trans %}Log in{% endtrans %}" class="button"/>
- </div>
- {% if next %}
- <input type="hidden" name="next" value="{{ next }}" class="button"
- style="display: none;"/>
- {% endif %}
{% if allow_registration %}
<p>
- {% trans %}Don't have an account yet?{% endtrans %}
- <br />
- <a href="{{ request.urlgen('mediagoblin.auth.register') }}">
+ {% trans %}Don't have an account yet?{% endtrans %} <a href="{{ request.urlgen('mediagoblin.auth.register') }}">
{%- trans %}Create one here!{% endtrans %}</a>
</p>
+ {% endif %}
+ {{ wtforms_util.render_divs(login_form) }}
<p>
- {% trans %}Forgot your password?{% endtrans %}
- <br />
<a href="{{ request.urlgen('mediagoblin.auth.forgot_password') }}">
- {%- trans %}Change it!{% endtrans %}</a>
+ {% trans %}Forgot your password?{% endtrans %}</a>
</p>
+ <div class="form_submit_buttons">
+ <input type="submit" value="{% trans %}Log in{% endtrans %}" class="button_form"/>
+ </div>
+ {% if next %}
+ <input type="hidden" name="next" value="{{ next }}" class="button_form"
+ style="display: none;"/>
{% endif %}
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/auth/register.html b/mediagoblin/templates/mediagoblin/auth/register.html
index 25b68058..afcfcda9 100644
--- a/mediagoblin/templates/mediagoblin/auth/register.html
+++ b/mediagoblin/templates/mediagoblin/auth/register.html
@@ -19,17 +19,22 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
+{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/show_password.js') }}"></script>
+{% endblock mediagoblin_head %}
+
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.auth.register') }}"
method="POST" enctype="multipart/form-data">
- <div class="grid_6 prefix_1 suffix_1 form_box">
+ <div class="form_box">
<h1>{% trans %}Create an account!{% endtrans %}</h1>
{{ wtforms_util.render_divs(register_form) }}
{{ csrf_token }}
<div class="form_submit_buttons">
<input type="submit" value="{% trans %}Create{% endtrans %}"
- class="button" />
+ class="button_form" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index b4c4dcf3..5335ebe3 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -19,79 +19,73 @@
<html>
<head>
<meta charset="utf-8">
- <title>{% block title %}{% trans %}GNU MediaGoblin{% endtrans %}{% endblock title %}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title>
<link rel="stylesheet" type="text/css"
href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
<link rel="stylesheet" type="text/css"
- href="{{ request.staticdirect('/css/extlib/text.css') }}"/>
- <link rel="stylesheet" type="text/css"
- href="{{ request.staticdirect('/css/extlib/960_16_col.css') }}"/>
- <link rel="stylesheet" type="text/css"
href="{{ request.staticdirect('/css/base.css') }}"/>
<link rel="shortcut icon"
href="{{ request.staticdirect('/images/goblin.ico') }}" />
+ <script src="{{ request.staticdirect('/js/extlib/jquery.js') }}"></script>
+ <!--[if lt IE 9]>
+ <script src="{{ request.staticdirect('/js/extlib/html5shiv.js') }}"></script>
+ <![endif]-->
{% block mediagoblin_head %}
{% endblock mediagoblin_head %}
</head>
-
<body>
{% block mediagoblin_body %}
- <div class="mediagoblin_body">
+ <div class="container">
{% block mediagoblin_header %}
- <div class="container_16">
- <div class="grid_16 mediagoblin_header">
+ <header>
{% block mediagoblin_logo %}
- <a class="mediagoblin_logo"
+ <a class="logo"
href="{{ request.urlgen('index') }}"
><img src="{{ request.staticdirect('/images/logo.png') }}"
alt="{% trans %}MediaGoblin logo{% endtrans %}" /></a>
- {% endblock %}
- {% if request.user and request.user['status'] == 'active' %}
- <a class="header_submit"
+ {% endblock mediagoblin_logo %}
+ {% if request.user and request.user.status == 'active' %}
+ <a class="button_action"
href="{{ request.urlgen('mediagoblin.submit.start') }}">
- {% trans %}Submit media{% endtrans %}
+ {% trans %}Add media{% endtrans %}
</a>
{% endif %}
{% block mediagoblin_header_title %}{% endblock %}
- <div class="mediagoblin_header_right">
+ <div class="header_right">
{% if request.user %}
{# the following link should only appear when verification is needed #}
{% if request.user.status == "needs_email_verification" %}
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
- user=request.user['username']) }}"
- class="header_submit">
- {% trans %}verify your email!{% endtrans %}</a>
+ user=request.user.username) }}"
+ class="button_action_highlight">
+ {% trans %}Verify your email!{% endtrans %}</a>
{% endif %}
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
- user= request.user['username']) }}">
- {{ request.user['username'] }}</a>
+ user= request.user.username) }}">
+ {{ request.user.username }}</a>
- (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">log out</a>)
+ (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>)
{% else %}
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">
{% trans %}Log in{% endtrans %}</a>
{% endif %}
</div>
- </div>
- </div>
+ </header>
{% endblock %}
- <div class="container_16 mediagoblin_content">
- <div class="grid_16">
+ <div class="mediagoblin_content">
{% include "mediagoblin/utils/messages.html" %}
{% block mediagoblin_content %}
{% endblock mediagoblin_content %}
- </div>
</div>
{% block mediagoblin_footer %}
- <div class="container_16">
- <div class="grid_16 mediagoblin_footer">
+ <footer>
{% trans -%}
Powered by <a href="http://mediagoblin.org">MediaGoblin</a>, a <a href="http://gnu.org/">GNU</a> project
{%- endtrans %}
- </div>
- </div>
- {% endblock %}
+ </footer>
+ {% endblock mediagoblin_footer %}
{% endblock mediagoblin_body %}
</div>
</body>
diff --git a/mediagoblin/templates/mediagoblin/edit/attachments.html b/mediagoblin/templates/mediagoblin/edit/attachments.html
index d8b55f58..bd972b2a 100644
--- a/mediagoblin/templates/mediagoblin/edit/attachments.html
+++ b/mediagoblin/templates/mediagoblin/edit/attachments.html
@@ -20,14 +20,14 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.edit.attachments',
- user= media.uploader().username,
+ user= media.get_uploader.username,
media= media._id) }}"
method="POST" enctype="multipart/form-data">
- <div class="grid_8 prefix_1 suffix_1 edit_box form_box">
+ <div class="form_box">
<h1>Editing attachments for {{ media.title }}</h1>
<div style="text-align: center;" >
<img src="{{ request.app.public_store.file_url(
- media['media_files']['thumb']) }}" />
+ media.media_files['thumb']) }}" />
</div>
{% if media.attachment_files|count %}
@@ -48,7 +48,7 @@
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
<a href="{{ media.url_for_self(request.urlgen) }}">Cancel</a>
- <input type="submit" value="Save changes" class="button" />
+ <input type="submit" value="Save changes" class="button_form" />
{{ csrf_token }}
</div>
</div>
diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html
index b4b3be85..fc6b1605 100644
--- a/mediagoblin/templates/mediagoblin/edit/edit.html
+++ b/mediagoblin/templates/mediagoblin/edit/edit.html
@@ -22,22 +22,22 @@
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.edit.edit_media',
- user= media.uploader().username,
+ user= media.get_uploader.username,
media= media._id) }}"
method="POST" enctype="multipart/form-data">
- <div class="grid_8 prefix_1 suffix_1 edit_box form_box">
+ <div class="form_box_xl edit_box">
<h1>{% trans media_title=media.title %}Editing {{ media_title }}{% endtrans %}</h1>
<div style="text-align: center;" >
<img src="{{ request.app.public_store.file_url(
- media['media_files']['thumb']) }}" />
+ media.media_files['thumb']) }}" />
</div>
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
<a href="{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}</a>
- <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button" />
+ <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" />
{{ csrf_token }}
</div>
</div>
</form>
-
+
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_account.html b/mediagoblin/templates/mediagoblin/edit/edit_account.html
new file mode 100644
index 00000000..e8a968e6
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/edit/edit_account.html
@@ -0,0 +1,45 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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/>.
+#}
+{% extends "mediagoblin/base.html" %}
+
+{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
+
+{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/show_password.js') }}"></script>
+{% endblock mediagoblin_head %}
+
+{% block mediagoblin_content %}
+
+ <form action="{{ request.urlgen('mediagoblin.edit.account') }}?username={{
+ user.username }}"
+ method="POST" enctype="multipart/form-data">
+ <div class="form_box edit_box">
+ <h1>
+ {%- trans username=user.username -%}
+ Changing {{ username }}'s account settings
+ {%- endtrans %}
+ </h1>
+ {{ wtforms_util.render_divs(form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" />
+ {{ csrf_token }}
+ </div>
+ </div>
+ </form>
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html
index 93b2a792..97c03e37 100644
--- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html
+++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html
@@ -22,17 +22,17 @@
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
- user['username'] }}"
+ user.username }}"
method="POST" enctype="multipart/form-data">
- <div class="grid_8 prefix_1 suffix_1 edit_box form_box">
+ <div class="form_box edit_box">
<h1>
- {%- trans username=user['username'] -%}
+ {%- trans username=user.username -%}
Editing {{ username }}'s profile
{%- endtrans %}
</h1>
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
- <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button" />
+ <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" />
{{ csrf_token }}
</div>
</div>
diff --git a/mediagoblin/templates/mediagoblin/listings/tag.html b/mediagoblin/templates/mediagoblin/listings/tag.html
index 58863015..a7cbe241 100644
--- a/mediagoblin/templates/mediagoblin/listings/tag.html
+++ b/mediagoblin/templates/mediagoblin/listings/tag.html
@@ -26,19 +26,18 @@
tag=tag_slug) }}">
{% endblock mediagoblin_head %}
+{% block title %}
+ {% trans %}Media tagged with: {{ tag_name }}{% endtrans %} &mdash; {{ super() }}
+{% endblock %}
+
{% block mediagoblin_content -%}
<h1>
- {% trans %}Media tagged with:{% endtrans %} {{ tag_name }}
+ {% trans %}Media tagged with: {{ tag_name }}{% endtrans %}
</h1>
- <div class="container_16 media_gallery">
- {{ object_gallery(request, media_entries, pagination) }}
- </div>
+ {{ object_gallery(request, media_entries, pagination) }}
- <div class="grid_16">
- {% set feed_url = request.urlgen(
- 'mediagoblin.listings.tag_atom_feed',
- tag=tag_slug) %}
- {% include "mediagoblin/utils/feed_link.html" %}
- </div>
+ {% set feed_url = request.urlgen('mediagoblin.listings.tag_atom_feed',
+ tag=tag_slug) %}
+ {% include "mediagoblin/utils/feed_link.html" %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/media_displays/ascii.html b/mediagoblin/templates/mediagoblin/media_displays/ascii.html
new file mode 100644
index 00000000..6b40bf08
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/media_displays/ascii.html
@@ -0,0 +1,40 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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/>.
+#}
+
+{% extends 'mediagoblin/user_pages/media.html' %}
+
+{% block mediagoblin_media %}
+ <div class="ascii-wrapper">
+ <pre>
+ {%- autoescape False -%}
+ {{- request.app.public_store.get_file(
+ media.media_files['unicode']).read()|string -}}
+ {%- endautoescape -%}
+ </pre>
+ </div>
+ {% if 'original' in media.media_files %}
+ <p>
+ <a href="{{ request.app.public_store.file_url(
+ media.media_files['original']) }}">
+ {%- trans -%}
+ Original
+ {%- endtrans -%}
+ </a>
+ </p>
+ {% endif %}
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/fp_changed_success.html b/mediagoblin/templates/mediagoblin/media_displays/image.html
index 7cea312d..94420e89 100644
--- a/mediagoblin/templates/mediagoblin/auth/fp_changed_success.html
+++ b/mediagoblin/templates/mediagoblin/media_displays/image.html
@@ -1,6 +1,6 @@
{#
# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 Free Software Foundation, Inc
+# Copyright (C) 2011 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
@@ -15,13 +15,5 @@
# 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/>.
#}
-{% extends "mediagoblin/base.html" %}
-
-{% block mediagoblin_content %}
- <p>
- {% trans -%}
- Your password has been changed. Try to log in now.
- {%- endtrans %}
- </p>
-{% endblock %}
+{% extends 'mediagoblin/user_pages/media.html' %}
diff --git a/mediagoblin/templates/mediagoblin/media_displays/video.html b/mediagoblin/templates/mediagoblin/media_displays/video.html
new file mode 100644
index 00000000..6b5e7a0e
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/media_displays/video.html
@@ -0,0 +1,52 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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/>.
+#}
+
+{% extends 'mediagoblin/user_pages/media.html' %}
+
+{% block mediagoblin_media %}
+ <div class="video-player" style="position: relative;">
+ <video class="video-js vjs-default-skin"
+ width="{{ media.media_data.video.width }}"
+ height="{{ media.media_data.video.height }}"
+ controls="controls"
+ preload="auto"
+ data-setup="">
+ <source src="{{ request.app.public_store.file_url(
+ media.media_files['webm_640']) }}"
+ type="video/webm; codecs=&quot;vp8, vorbis&quot;" />
+ <div class="no_html5">
+ {%- trans -%}Sorry, this video will not work because
+ your web browser does not support HTML5
+ video.{%- endtrans -%}<br/>
+ {%- trans -%}You can get a modern web browser that
+ can play this video at <a href="http://getfirefox.com">
+ http://getfirefox.com</a>!{%- endtrans -%}
+ </div>
+ </video>
+ </div>
+ {% if 'original' in media.media_files %}
+ <p>
+ <a href="{{ request.app.public_store.file_url(
+ media.media_files['original']) }}">
+ {%- trans -%}
+ Original
+ {%- endtrans -%}
+ </a>
+ </p>
+ {% endif %}
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html
index e3ca9726..3f834572 100644
--- a/mediagoblin/templates/mediagoblin/root.html
+++ b/mediagoblin/templates/mediagoblin/root.html
@@ -23,31 +23,18 @@
{% if request.user %}
<h1>{% trans %}Explore{% endtrans %}</h1>
{% else %}
- <div class="grid_11 alpha">
- <h1>{% trans %}Hi there, media lover! MediaGoblin is...{% endtrans %}</h1>
- <ul>
- <li>{% trans %}The perfect place for your media!{% endtrans %}</li>
- <li>{% trans %}A place for people to collaborate and show off original and derived creations!{% endtrans %}</li>
- <li>{% trans %}Free, as in freedom. (We’re a <a href="http://gnu.org">GNU</a> project, after all.){% endtrans %}</li>
- <li>{% trans %}Aiming to make the world a better place through decentralization and (eventually, coming soon!) federation!{% endtrans %}</li>
- <li>{% trans %}Built for extensibility. (Multiple media types coming soon to the software, including video support!){% endtrans %}</li>
- <li>{% trans %}Powered by people like you. (<a href="http://mediagoblin.org/pages/join.html">You can help us improve this software!</a>){% endtrans %}</li>
- </ul>
-
- {% if allow_registration %}
- <p>{% trans %}Excited to join us?{% endtrans %}<p>
- {% trans register_url=request.urlgen('mediagoblin.auth.register') -%}
- <a class="header_submit_highlight" href="{{ register_url }}">Create a free account</a>
- or
- <a class="header_submit" href="http://wiki.mediagoblin.org/HackingHowto">Set up MediaGoblin on your own server</a>
- {%- endtrans %}
- {% endif %}
- </div>
-
- <div class="grid_5 omega">
- <img src="{{ request.staticdirect('/images/frontpage_image.png') }}" />
- </div>
-
+ <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, save your favourites 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 %}
<h2>{% trans %}Most recent media{% endtrans %}</h2>
diff --git a/mediagoblin/templates/mediagoblin/submit/start.html b/mediagoblin/templates/mediagoblin/submit/start.html
index 29b01181..afae2f1f 100644
--- a/mediagoblin/templates/mediagoblin/submit/start.html
+++ b/mediagoblin/templates/mediagoblin/submit/start.html
@@ -22,12 +22,12 @@
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.submit.start') }}"
method="POST" enctype="multipart/form-data">
- <div class="grid_8 prefix_1 suffix_1 form_box">
- <h1>{% trans %}Submit yer media{% endtrans %}</h1>
+ <div class="form_box_xl">
+ <h1>{% trans %}Add your media{% endtrans %}</h1>
{{ wtforms_util.render_divs(submit_form) }}
<div class="form_submit_buttons">
{{ csrf_token }}
- <input type="submit" value="{% trans %}Submit{% endtrans %}" class="button" />
+ <input type="submit" value="{% trans %}Add{% endtrans %}" class="button_form" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/test_submit.html b/mediagoblin/templates/mediagoblin/test_submit.html
index 190b9ac3..38be8efc 100644
--- a/mediagoblin/templates/mediagoblin/test_submit.html
+++ b/mediagoblin/templates/mediagoblin/test_submit.html
@@ -25,7 +25,7 @@
{{ wtforms_util.render_table(image_form) }}
<tr>
<td></td>
- <td><input type="submit" value="submit" class="button" /></td>
+ <td><input type="submit" value="submit" class="button_form" /></td>
{{ csrf_token }}
</tr>
</table>
diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
index df931d9c..b0bfacf8 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
@@ -26,29 +26,26 @@
user=user.username) }}">
{% endblock mediagoblin_head %}
-{% block mediagoblin_content -%}
- {% if user %}
- <h1>
- {%- trans username=user.username,
- user_url=request.urlgen(
- 'mediagoblin.user_pages.user_home',
- user=user.username) -%}
- <a href="{{ user_url }}">{{ username }}</a>'s media
- {%- endtrans %}
- </h1>
+{% block title %}
+ {%- trans username=user.username -%}
+ {{ username }}'s media
+ {%- endtrans %} &mdash; {{ super() }}
+{% endblock %}
- <div class="container_16 media_gallery">
- {{ object_gallery(request, media_entries, pagination) }}
- </div>
+{% block mediagoblin_content -%}
+ <h1>
+ {%- trans username=user.username,
+ user_url=request.urlgen(
+ 'mediagoblin.user_pages.user_home',
+ user=user.username) -%}
+ <a href="{{ user_url }}">{{ username }}</a>'s media
+ {%- endtrans %}
+ </h1>
- <div class="grid_16">
- {% set feed_url = request.urlgen(
- 'mediagoblin.user_pages.atom_feed',
- user=user.username) %}
- {% include "mediagoblin/utils/feed_link.html" %}
- </div>
- {% else %}
- {# This *should* not occur as the view makes sure we pass in a user. #}
- <p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
- {% endif %}
+ {{ object_gallery(request, media_entries, pagination) }}
+
+ {% set feed_url = request.urlgen('mediagoblin.user_pages.atom_feed',
+ user=user.username) %}
+ {% include "mediagoblin/utils/feed_link.html" %}
+
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index efbd7e53..cbe26cbf 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -20,19 +20,25 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% from "mediagoblin/utils/pagination.html" import render_pagination %}
+{% block title %}{{ media.title }} &mdash; {{ super() }}{% endblock %}
+
+{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/comment_show.js') }}"></script>
+{% endblock mediagoblin_head %}
+
{% block mediagoblin_content %}
- {% if media %}
- <div class="grid_11 alpha">
- <div class="media_image_container">
+ <div class="media_pane">
+ <div class="media_image_container">
+ {% block mediagoblin_media %}
{% set display_media = request.app.public_store.file_url(
media.get_display_media(media.media_files)) %}
-
{# if there's a medium file size, that means the medium size
# isn't the original... so link to the original!
#}
- {% if media['media_files'].has_key('medium') %}
+ {% if media.media_files.has_key('medium') %}
<a href="{{ request.app.public_store.file_url(
- media['media_files']['original']) }}">
+ media.media_files['original']) }}">
<img class="media_image"
src="{{ display_media }}"
alt="Image for {{ media.title }}" />
@@ -42,139 +48,129 @@
src="{{ display_media }}"
alt="Image for {{ media.title }}" />
{% endif %}
- </div>
-
- <h2 class="media_title">
- {{ media.title }}
- </h2>
-
- <p class="media_uploader">
- {% trans date=media.created.strftime("%Y-%m-%d"),
- user_url=request.urlgen(
- 'mediagoblin.user_pages.user_home',
- user=media.uploader().username),
- username=media.uploader().username -%}
- Uploaded on {{ date }} by <a href="{{ user_url }}">{{ username }}</a>
- {%- endtrans %}
- </p>
-
- {% autoescape False %}
- <p>{{ media.description_html }}</p>
- {% endautoescape %}
-
- <br />
- <h3>{% trans %}Comments{% endtrans %}</h3>
-
+ {% endblock %}
+ </div>
+ <h2 class="media_title">
+ {{ media.title }}
+ </h2>
+ {% autoescape False %}
+ <p>{{ media.description_html }}</p>
+ {% endautoescape %}
+ <p class="media_specs">
+ {% trans date=media.created.strftime("%Y-%m-%d") -%}
+ Added on {{ date }}.
+ {%- endtrans %}
+ {% if request.user and
+ (media.uploader == request.user._id or
+ request.user.is_admin) %}
+ {% set edit_url = request.urlgen('mediagoblin.edit.edit_media',
+ user= media.get_uploader.username,
+ media= media._id) %}
+ <a class="button_action" href="{{ edit_url }}">{% trans %}Edit{% endtrans %}</a>
+ {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete',
+ user= media.get_uploader.username,
+ media= media._id) %}
+ <a class="button_action" href="{{ delete_url }}">{% trans %}Delete{% endtrans %}</a>
+ {% endif %}
+ </p>
+ {% if comments %}
+ <h3>
+ {% if comments.count()==1 %}
+ {% trans comment_count=comments.count() -%}{{ comment_count }} comment{%- endtrans %}
+ {% elif comments.count()>1 %}
+ {% trans comment_count=comments.count() -%}{{ comment_count }} comments{%- endtrans %}
+ {% else %}
+ {% trans %}No comments yet.{% endtrans %}
+ {% endif %}
+ <div class="right_align">
+ <a
+ {% if not request.user %}
+ href="{{ request.urlgen('mediagoblin.auth.login') }}"
+ {% endif %}
+ class="button_action" id="button_addcomment" title="Add a comment">
+ {% trans %}Add one{% endtrans %}
+ </a>
+ </div>
+ </h3>
{% if request.user %}
- <p><a href="#comment_form">{% trans %}Post a comment{% endtrans %}</a></p>
+ <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
+ user= media.get_uploader.username,
+ media=media._id) }}" method="POST" id="form_comment">
+ <p>
+ {% trans %}You can use <a href="http://daringfireball.net/projects/markdown/basics">Markdown</a> for formatting.{% endtrans %}
+ </p>
+ {{ wtforms_util.render_divs(comment_form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="{% trans %}Add this comment{% endtrans %}" class="button_action" />
+ {{ csrf_token }}
+ </div>
+ </form>
{% endif %}
-
- {% if comments %}
- {% for comment in comments %}
- {% set comment_author = comment.author() %}
- {% if pagination.active_id == comment._id %}
- <div class="comment_wrapper comment_active" id="comment-{{ comment['_id'] }}">
- <a name="comment" id="comment"></a>
- {% else %}
- <div class="comment_wrapper" id="comment-{{ comment['_id'] }}">
- {% endif %}
-
- <div class="comment_content">
- {% autoescape False %}
- {{ comment.content_html }}
- {% endautoescape %}
- </div>
-
- <div class="comment_author">&mdash;
- <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
- user = comment_author['username']) }}">
- {{ comment_author['username'] }}</a>
- {% trans %}at{% endtrans %}
- <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
- comment = comment['_id'],
- user = media.uploader().username,
- media = media._id) }}#comment">
- {{ comment.created.strftime("%Y-%m-%d %I:%M%p") }}
- </a>
- </div>
+ {% for comment in comments %}
+ {% set comment_author = comment.get_author %}
+ {% if pagination.active_id == comment._id %}
+ <div class="comment_wrapper comment_active" id="comment-{{ comment._id }}">
+ <a name="comment" id="comment"></a>
+ {% else %}
+ <div class="comment_wrapper" id="comment-{{ comment._id }}">
+ {% endif %}
+ <div class="comment_content">
+ {% autoescape False %}
+ {{ comment.content_html }}
+ {% endautoescape %}
+ <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
+ <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
+ user = comment_author.username) }}">
+ {{ comment_author.username }}
+ </a>
+ {% trans %}at{% endtrans %}
+ <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
+ comment = comment._id,
+ user = media.get_uploader.username,
+ media = media.slug) }}#comment">
+ {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }}
+ </a>
</div>
+ </div>
+ {% endfor %}
+ {{ render_pagination(request, pagination,
+ media.url_for_self(request.urlgen)) }}
+ {% endif %}
+ </div>
+ <div class="media_sidebar">
+ {% trans user_url=request.urlgen(
+ 'mediagoblin.user_pages.user_home',
+ user=media.get_uploader.username),
+ username=media.get_uploader.username -%}
+ <p>❖ Browsing media by <a href="{{ user_url }}">{{ username }}</a></p>
+ {%- endtrans %}
+ {% include "mediagoblin/utils/prev_next.html" %}
+ {% if media.attachment_files|count %}
+ <h3>Attachments</h3>
+ <ul>
+ {% for attachment in media.attachment_files %}
+ <li>
+ <a href="{{ request.app.public_store.file_url(attachment.filepath) }}">
+ {{ attachment.name }}
+ </a>
+ </li>
{% endfor %}
-
- {% if request.user %}
- <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
- user= media.uploader().username,
- media=media._id) }}" method="POST">
- {{ wtforms_util.render_divs(comment_form) }}
- <div class="form_submit_buttons">
- <input type="submit" value="{% trans %}Post comment!{% endtrans %}" class="button" />
- {{ csrf_token }}
- </div>
- </form>
- {% endif %}
-
- {{ render_pagination(request, pagination,
- request.urlgen('mediagoblin.user_pages.media_home',
- user = media.uploader().username,
- media = media._id)) }}
- </div>
+ </ul>
+ {% endif %}
+ {% if app_config['allow_attachments']
+ and request.user
+ and (media.uploader == request.user._id
+ or request.user.is_admin) %}
+ <p>
+ <a href="{{ request.urlgen('mediagoblin.edit.attachments',
+ user=media.get_uploader.username,
+ media=media._id) }}">Add attachment</a>
+ </p>
+ {% endif %}
+ {% if media.tags %}
+ {% include "mediagoblin/utils/tags.html" %}
{% endif %}
- <div class="grid_5 omega">
- {% include "mediagoblin/utils/prev_next.html" %}
-
- {% if media['uploader'] == request.user['_id'] or
- request.user['is_admin'] %}
- <h3>{% trans %}Actions{% endtrans %}</h3>
- <p>
- {% set edit_url = request.urlgen('mediagoblin.edit.edit_media',
- user= media.uploader().username,
- media= media._id) %}
- <a href="{{ edit_url }}"
- ><img src="{{ request.staticdirect('/images/icon_edit.png') }}"
- class="media_icon" /></a>
- <a href="{{ edit_url }}">{% trans %}edit{% endtrans %}</a>
- </p>
- <p>
- {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete',
- user= media.uploader().username,
- media= media._id) %}
- <a href="{{ delete_url }}"
- ><img src="{{ request.staticdirect('/images/icon_delete.png') }}"
- class="media_icon" /></a>
- <a href="{{ delete_url }}">{% trans %}delete{% endtrans %}</a>
- </p>
- {% endif %}
-
- {% if media.attachment_files|count %}
- <h3>Attachments</h3>
- <ul>
- {% for attachment in media.attachment_files %}
- <li>
- <a href="{{ request.app.public_store.file_url(attachment.filepath) }}">
- {{ attachment.name }}
- </a>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
-
- {% if app_config['allow_attachments']
- and (media['uploader'] == request.user['_id']
- or request.user['is_admin']) %}
- <p>
- <a href="{{ request.urlgen('mediagoblin.edit.attachments',
- user=media.uploader().username,
- media=media._id) }}">Add attachment</a>
- </p>
- {% endif %}
-
- {% if media.tags %}
- {% include "mediagoblin/utils/tags.html" %}
- {% endif %}
-
- {% include "mediagoblin/utils/license.html" %}
- </div>
- {% else %}
- <p>{% trans %}Sorry, no such media found.{% endtrans %}<p/>
- {% endif %}
+ {% include "mediagoblin/utils/license.html" %}
+ </div>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
index 8da90f79..dcb148e0 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
@@ -22,19 +22,19 @@
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.user_pages.media_confirm_delete',
- user=media.uploader().username,
+ user=media.get_uploader.username,
media=media._id) }}"
method="POST" enctype="multipart/form-data">
- <div class="grid_8 prefix_1 suffix_1 edit_box form_box">
+ <div class="form_box">
<h1>
- {%- trans title=media['title'] -%}
+ {%- trans title=media.title -%}
Really delete {{ title }}?
{%- endtrans %}
</h1>
<div style="text-align: center;" >
<img src="{{ request.app.public_store.file_url(
- media['media_files']['thumb']) }}" />
+ media.media_files['thumb']) }}" />
</div>
<br />
@@ -47,7 +47,7 @@
<div class="form_submit_buttons">
{# TODO: This isn't a button really... might do unexpected things :) #}
<a class="cancel_link" href="{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}</a>
- <input type="submit" value="{% trans %}Delete Permanently{% endtrans %}" class="button" />
+ <input type="submit" value="{% trans %}Delete Permanently{% endtrans %}" class="button_form" />
{{ csrf_token }}
</div>
</div>
diff --git a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html
index 9b4adeb5..a14b0123 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html
@@ -36,8 +36,8 @@
</tr>
{% for media_entry in processing_entries %}
<tr>
- <td>{{ media_entry['title'] }}</td>
- <td>{{ media_entry['created'].strftime("%m-%d-%Y %I:%M %p") }}</td>
+ <td>{{ media_entry.title }}</td>
+ <td>{{ media_entry.created.strftime("%m-%d-%Y %I:%M %p") }}</td>
<td></td>
</tr>
{% endfor %}
@@ -57,7 +57,7 @@
</tr>
{% for media_entry in failed_entries %}
<tr>
- <td>{{ media_entry['title'] }}</td>
+ <td>{{ media_entry.title }}</td>
<td>{{ media_entry['created'].strftime("%m-%d-%Y %I:%M %p") }}</td>
<td>{{ media_entry.get_fail_exception().general_message }}</td>
</tr>
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index c5beeaaa..d3b4021d 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -26,6 +26,17 @@
user=user.username) }}">
{% endblock mediagoblin_head %}
+{% block title %}
+ {%- if user -%}
+ {%- trans username=user.username -%}
+ {{ username }}'s profile
+ {%- endtrans %} &mdash; {{ super() }}
+ {%- else -%}
+ {{ super() }}
+ {%- endif -%}
+{% endblock %}
+
+
{% block mediagoblin_content -%}
{# If no user... #}
{% if not user %}
@@ -35,7 +46,7 @@
{% elif user.status == "needs_email_verification" %}
{% if user == request.user %}
{# this should only be visible when you are this user #}
- <div class="grid_6 prefix_1 suffix_1 form_box">
+ <div class="form_box">
<h1>{% trans %}Email verification needed{% endtrans %}</h1>
<p>
@@ -51,11 +62,11 @@
<p>{% trans %}In case it doesn't:{% endtrans %}</p>
<a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}"
- class="button">{% trans %}Resend verification email{% endtrans %}</a>
+ class="button_action_highlight">{% trans %}Resend verification email{% endtrans %}</a>
</div>
{% else %}
{# if the user is not you, but still needs to verify their email #}
- <div class="grid_6 prefix_1 suffix_1 form_box">
+ <div class="form_box">
<h1>{% trans %}Email verification needed{% endtrans %}</h1>
<p>
@@ -78,41 +89,46 @@
{%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
</h1>
- {% if not user['url'] and not user['profile'] %}
- {% if request.user['_id'] == user['_id'] %}
- <div class="grid_6 alpha empty_space">
+ {% if not user.url and not user.bio %}
+ {% if request.user and (request.user._id == user._id) %}
+ <div class="profile_sidebar empty_space">
<p>
{% trans %}Here's a spot to tell others about yourself.{% endtrans %}
</p>
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
user.username }}"
- class="header_submit">
+ class="button_action">
{%- trans %}Edit profile{% endtrans -%}
</a>
- </div>
{% else %}
- <div class="grid_6 alpha empty_space">
+ <div class="profile_sidebar empty_space">
<p>
{% trans -%}
This user hasn't filled in their profile (yet).
{%- endtrans %}
</p>
- </div>
{% endif %}
{% else %}
- <div class="grid_6 alpha">
+ <div class="profile_sidebar">
{% include "mediagoblin/utils/profile.html" %}
- {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
+ {% if request.user and
+ (request.user._id == user._id or request.user.is_admin) %}
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
user.username }}">
{%- trans %}Edit profile{% endtrans -%}
</a>
{% endif %}
- </div>
{% endif %}
+ {% if request.user and (request.user._id == user._id) %}
+ <a href="{{ request.urlgen('mediagoblin.edit.account') }}">
+ {%- trans %}Change account settings{% endtrans -%}
+ </a>
+ {% endif %}
+ </div>
+
{% if media_entries.count() %}
- <div class="grid_10 omega">
+ <div class="profile_showcase">
{{ object_gallery(request, media_entries, pagination,
pagination_base_url=user_gallery_url, col_number=3) }}
{% include "mediagoblin/utils/object_gallery.html" %}
@@ -129,20 +145,20 @@
{% include "mediagoblin/utils/feed_link.html" %}
</div>
{% else %}
- {% if request.user['_id'] == user['_id'] %}
- <div class="grid_10 omega empty_space">
+ {% if request.user and (request.user._id == user._id) %}
+ <div class="profile_showcase empty_space">
<p>
{% trans -%}
This is where your media will appear, but you don't seem to have added anything yet.
{%- endtrans %}
</p>
- <a class="header_submit"
+ <a class="button_action"
href="{{ request.urlgen('mediagoblin.submit.start') }}">
{%- trans %}Add media{% endtrans -%}
</a>
</div>
{% else %}
- <div class="grid_10 omega empty_space">
+ <div class="profile_showcase empty_space">
<p>
{% trans -%}
There doesn't seem to be any media here yet...
diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
index e1b8cc9b..5f628dc7 100644
--- a/mediagoblin/templates/mediagoblin/utils/object_gallery.html
+++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
@@ -31,11 +31,11 @@
{%- elif loop.last %} thumb_entry_last{% endif %}">
<a href="{{ entry_url }}">
<img src="{{ request.app.public_store.file_url(
- entry['media_files']['thumb']) }}" />
+ entry.media_files['thumb']) }}" />
</a>
- {% if entry['title'] %}
+ {% if entry.title %}
<br />
- <a href="{{ entry_url }}">{{ entry['title'] }}</a>
+ <a href="{{ entry_url }}">{{ entry.title }}</a>
{% endif %}
</td>
{% endfor %}
@@ -68,7 +68,11 @@
{% endif %}
{% else %}
<p>
- <i>There doesn't seem to be any media here yet...</i>
+ <i>
+ {%- trans -%}
+ There doesn't seem to be any media here yet...
+ {%- endtrans -%}
+ </i>
</p>
{% endif %}
{% endmacro %}
diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html
index 84336103..caa79fcc 100644
--- a/mediagoblin/templates/mediagoblin/utils/pagination.html
+++ b/mediagoblin/templates/mediagoblin/utils/pagination.html
@@ -36,18 +36,16 @@
{% set prev_url = pagination.get_page_url_explicit(
base_url, get_params,
pagination.page - 1) %}
- <a href="{{ prev_url }}"><img class="pagination_arrow" src="{{ request.staticdirect('/images/pagination_left.png') }}" alt="Previous page" /></a>
- <a href="{{ prev_url }}">{% trans %}Newer{% endtrans %}</a>
+ <a href="{{ prev_url }}">{% trans %}← Newer{% endtrans %}</a>
{% endif %}
{% if pagination.has_next %}
{% set next_url = pagination.get_page_url_explicit(
base_url, get_params,
pagination.page + 1) %}
- <a href="{{ next_url }}">{% trans %}Older{% endtrans %}</a>
- <a href="{{ next_url }}"><img class="pagination_arrow" src="{{ request.staticdirect('/images/pagination_right.png') }}" alt="Next page" /></a>
+ <a href="{{ next_url }}">{% trans %}Older →{% endtrans %}</a>
{% endif %}
<br />
- Go to page:
+ {% trans %}Go to page:{% endtrans %}
{%- for page in pagination.iter_pages() %}
{% if page %}
{% if page != pagination.page %}
diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html
index 75903076..66766555 100644
--- a/mediagoblin/templates/mediagoblin/utils/prev_next.html
+++ b/mediagoblin/templates/mediagoblin/utils/prev_next.html
@@ -21,28 +21,26 @@
{% set next_entry_url = media.url_to_next(request.urlgen) %}
{% if prev_entry_url or next_entry_url %}
- <div class="grid_5 alpha omega">
- {# There are no previous entries for the very first media entry #}
- {% if prev_entry_url %}
- <a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
- <img src="{{ request.staticdirect('/images/navigation_left.png') }}" alt="Previous image" />
- </a>
- {% else %}
- {# This is the first entry. display greyed-out 'previous' image #}
- <p class="navigation_button navigation_left">
- <img src="{{ request.staticdirect('/images/navigation_end.png') }}" alt="No previous images" />
- </p>
- {% endif %}
- {# Likewise, this could be the very last media entry #}
- {% if next_entry_url %}
- <a class="navigation_button" href="{{ next_entry_url }}">
- <img src="{{ request.staticdirect('/images/navigation_right.png') }}" alt="Next image" />
- </a>
- {% else %}
- {# This is the last entry. display greyed-out 'next' image #}
- <p class="navigation_button">
- <img src="{{ request.staticdirect('/images/navigation_end.png') }}" alt="No following images" />
- </p>
- {% endif %}
- </div>
+ {# There are no previous entries for the very first media entry #}
+ {% if prev_entry_url %}
+ <a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
+ &larr; {% trans %}newer{% endtrans %}
+ </a>
+ {% else %}
+ {# This is the first entry. display greyed-out 'previous' image #}
+ <p class="navigation_button navigation_left">
+ &larr; {% trans %}newer{% endtrans %}
+ </p>
+ {% endif %}
+ {# Likewise, this could be the very last media entry #}
+ {% if next_entry_url %}
+ <a class="navigation_button" href="{{ next_entry_url }}">
+ {% trans %}older{% endtrans %} &rarr;
+ </a>
+ {% else %}
+ {# This is the last entry. display greyed-out 'next' image #}
+ <p class="navigation_button">
+ {% trans %}older{% endtrans %} &rarr;
+ </p>
+ {% endif %}
{% endif %}
diff --git a/mediagoblin/templates/mediagoblin/utils/tags.html b/mediagoblin/templates/mediagoblin/utils/tags.html
index b3211bd9..1f587411 100644
--- a/mediagoblin/templates/mediagoblin/utils/tags.html
+++ b/mediagoblin/templates/mediagoblin/utils/tags.html
@@ -17,13 +17,25 @@
#}
{% block tags_content -%}
- <h3>Tags</h3>
- <ul class="mediaentry_tags">
+ <p>{% trans %}View more media tagged with{% endtrans %}
{% for tag in media.tags %}
- <li class="tag">
+ {% if loop.last %}
+ {# the 'and' should only appear if there is more than one tag #}
+ {% if media.tags|length > 1 %}
+ {% trans %}or{% endtrans %}
+ {% endif %}
<a href="{{ request.urlgen(
- 'mediagoblin.listings.tags_listing',
- tag=tag['slug']) }}">{{ tag['name'] }}</a></li>
+ 'mediagoblin.listings.tags_listing',
+ tag=tag['slug']) }}">{{ tag['name'] }}</a>.
+ {% elif loop.revindex == 2 %}
+ <a href="{{ request.urlgen(
+ 'mediagoblin.listings.tags_listing',
+ tag=tag['slug']) }}">{{ tag['name'] }}</a>
+ {% else %}
+ <a href="{{ request.urlgen(
+ 'mediagoblin.listings.tags_listing',
+ tag=tag['slug']) }}">{{ tag['name'] }}</a>,
+ {% endif %}
{% endfor %}
- </ul>
+ </p>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html
index 6a86fd24..44b27bb8 100644
--- a/mediagoblin/templates/mediagoblin/utils/wtforms.html
+++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html
@@ -18,18 +18,18 @@
{# Generically render a field #}
{% macro render_field_div(field) %}
- <div class="form_field_box">
- <div class="form_field_label">{{ _(field.label.text) }}</div>
- <div class="form_field_input">{{ field }}</div>
+ {% if field.label.text -%}
+ <p class="form_field_label"><label for="{{ field.label.field_id }}">{{ _(field.label.text) }}</label></p>
+ {%- endif %}
+ <div class="form_field_input">
+ {{ field }}
{%- if field.errors -%}
{% for error in field.errors %}
- <div class="form_field_error">
- {{ error }}
- </div>
+ <p class="form_field_error">{{ error }}</p>
{% endfor %}
{%- endif %}
{% if field.description -%}
- <div class="form_field_description">{{ _(field.description) }}</div>
+ <p class="form_field_description">{{ _(field.description)|safe }}</p>
{%- endif %}
</div>
{%- endmacro %}
diff --git a/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml b/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml
new file mode 100644
index 00000000..95a1a176
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml
@@ -0,0 +1,27 @@
+{# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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/>.
+-#}
+<?xml version="1.0" encoding="UTF-8"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"
+ xmlns:hm="http://host-meta.net/xrd/1.0">
+
+ <hm:Host>{{ request.host }}</hm:Host>
+
+ <Link rel="lrdd"
+ template="{{ lrdd_template|replace(placeholder, '{uri}') }}">
+ <Title>{{ lrdd_title }}</Title>
+ </Link>
+</XRD>
diff --git a/mediagoblin/templates/mediagoblin/auth/fp_email_sent.html b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml
index 69aac6b3..1fe34577 100644
--- a/mediagoblin/templates/mediagoblin/auth/fp_email_sent.html
+++ b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml
@@ -1,6 +1,5 @@
-{#
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 Free Software Foundation, Inc
+{# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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
@@ -14,15 +13,15 @@
#
# 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/>.
-#}
-{% extends "mediagoblin/base.html" %}
-
-{% block mediagoblin_content %}
- <p>
- {% trans -%}
- Check your inbox. We sent an email with a URL for changing your password.
- {%- endtrans %}
- </p>
-
-{% endblock %}
-
+-#}
+<?xml version="1.0" encoding="UTF-8"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
+
+ <Subject>{{ subject }}</Subject>
+ <Alias>{{ alias }}</Alias>
+ {% for link in links %}
+ <Link
+ {%- for attr, value in link.attrs.items() %} {{ attr }}="{{ value}}"
+ {%- endfor %} />
+ {%- endfor %}
+</XRD>