spark/templates/mobile/page.html

80 строки
2.6 KiB
HTML

{% extends "mobile/base.html" %}
{% set num_new_challenges = 2 %}
{% set num_new_badges = 11 %}
{% set num_notifications = num_new_challenges + num_new_badges %}
{% block content %}
<div id="wrapper">
<div id="header">
{% if body_id not in ['home', 'myspark'] %}
<div ontouchstart="" class="back" onclick="history.back()">
</div>
{% endif %}
<h1>
{{ pagetitle }}
</h1>
</div> <!-- end header -->
<div id="content">
{% block pagecontent %}{% endblock %}
</div> <!-- end content -->
</div> <!-- end wrapper -->
{% if not hide_menu %}
<div id="menu-wrapper" class="closed">
<div id="menu" class="closed">
<hr id="menu-hr">
<div id="menu-header" class="closed">
{% if num_notifications %}
<div id="notifications">{{ num_notifications }}</div>
{% endif %}
{# L10n: Name of the mobile navigation menu #}
{{ _('Menu') }}
</div>
<div id="menu-content">
<ul>
<li><a href="{{ url('mobile.boost') }}">{{ _('Boost your Spark') }}</a></li>
<li><a href="{{ url('mobile.stats') }}">{{ _('Stats') }}</a></li>
<li><a href="{{ url('mobile.challenges') }}">{{ _('Challenges') }}
{% if num_new_challenges %}
{# L10n: {n} is the number of recently completed challenges. #}
<span>{{ ngettext('+{n} new','+{n} new', num_new_challenges)|f(n=num_new_challenges) }}</span>
{% endif %}
</a>
</li>
<li><a href="{{ url('mobile.badges') }}">{{ _('Badges') }}
{% if num_new_badges %}
{# L10n: {n} is the number of recently obtained badges. #}
<span>{{ ngettext('+{n} new','+{n} new', num_new_badges)|f(n=num_new_badges) }}</span>
{% endif %}
</a>
</li>
<li><a href="{{ url('mobile.about') }}">{{ _('About Mozilla') }}</a></li>
</ul>
<a href="#" id="logout">{{ _('Do you wanna log out?') }}</a>
</div>
<div id="logout-confirmation">
<p class="section sans confirmation">
{{ _('Are you sure you want to log out ?') }}
</p>
<div class="buttons-wrapper">
<div class="button left-button"><a href="#">{{ _('Cancel') }}</a></div>
<div class="button right-button"><a href="{{ url('users.mobile_logout') }}">{{ _('Yes') }}</a></div>
</div>
</div>
</div>
</div> <!-- end menu wrapper -->
{% endif %}
{% endblock %}
{% block script %}
<script>
$(document).ready(function() {
initMenu();
});
</script>
{% endblock %}