# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#}
<!doctype html>
+
<html
--{% block mediagoblin_html_tag %}
--{% endblock mediagoblin_html_tag %}
-->
- <head {% if is_rtl %} dir="rtl" {% endif %}>
++ {% block mediagoblin_html_tag %}
++ {% endblock mediagoblin_html_tag %}
++ {% if is_rtl -%}
++ dir="rtl"
++ {%- endif -%}
++ >
+ <head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title>
<link rel="stylesheet" type="text/css"
href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
from mediagoblin import messages
from mediagoblin import _version
from mediagoblin.tools import common
+ from mediagoblin.tools.translate import is_rtl
from mediagoblin.tools.translate import set_thread_locale
-from mediagoblin.tools.pluginapi import get_hook_templates
+ from mediagoblin.tools.translate import get_locale_from_request
+from mediagoblin.tools.pluginapi import get_hook_templates, hook_transform
from mediagoblin.tools.timesince import timesince
from mediagoblin.meddleware.csrf import render_csrf_form_token
template_env.globals['app_config'] = mg_globals.app_config
template_env.globals['global_config'] = mg_globals.global_config
template_env.globals['version'] = _version.__version__
-
+ template_env.globals['auth'] = mg_globals.app.auth
+ template_env.globals['is_rtl'] = is_rtl(locale)
template_env.filters['urlencode'] = url_quote_plus
# add human readable fuzzy date time