Files
wger/wger/core/templates/template.html

245 lines
10 KiB
HTML

<!DOCTYPE html>
<!--
This file is part of wger Workout Manager
wger 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.
wger 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 Workout Manager. If not, see <http://www.gnu.org/licenses/>.
-->
{% load i18n static wger_extras compress django_bootstrap_breadcrumbs %}
{% block breadcrumbs %}
{% clear_breadcrumbs %}
{% endblock %}
<html lang="{{ language.short_name }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-language" content="{{ i18n_language.code }}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- OpenGraph -->
{% block opengraph %}
<meta property="og:url" content="{{ request_absolute_path }}">
<meta property="og:type" content="website">
{% endblock %}
{% block opengraphimages %}
<meta property="og:image" content="{{ image_absolute_path }}">
{% endblock %}
{% block twittercard %}
{% if twitter %}
<!-- twitter cards -->
<meta content="summary" name="twitter:card">
<meta content="@{{ twitter }}" name="twitter:site">
{% endif %}
{% endblock %}
{% compress css %}
<link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap-compiled.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'fontawesomefree/css/all.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'node/@wger-project/react-components/build/assets/index.css' %}" id="react-css">
{% endcompress %}
<link rel="stylesheet" href="{% static 'css/language-menu.css' %}">
<link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">
{% compress js %}
<script src="{% static 'node/jquery/dist/jquery.js' %}"></script>
<script src="{% static 'node/bootstrap/dist/js/bootstrap.bundle.min.js' %}"></script>
<script src="{% static 'node/htmx.org/dist/htmx.min.js' %}"></script>
<script src="{% static 'node/@popperjs/core/dist/umd/popper.js' %}"></script>
<script src="{% static 'node/devbridge-autocomplete/dist/jquery.autocomplete.min.js' %}">
</script>
<script src="{% static 'node/masonry-layout/dist/masonry.pkgd.min.js' %}"></script>
<script src="{% static 'js/nutrition.js' %}"></script>
<script src="{% static 'js/language.js' %}"></script>
{% endcompress %}
{# this needs to be outside of the compress block! #}
<script src="{% static 'node/@wger-project/react-components/build/main.js' %}" type="module" defer="defer"></script>
{% block header %}{% endblock %}
<script>
$(document).ready(function () {
if (typeof wgerCustomPageInit !== "undefined") {
wgerCustomPageInit();
}
});
</script>
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{# #}
{# Navigation #}
{# #}
{% include 'navigation.html' %}
{# #}
{# Main content #}
{# #}
<div id="main">
<div class="container pt-2">
<div class="modal fade" id="wger-ajax-info" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body" id="ajax-info-content">
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-light"
data-bs-dismiss="modal">
{% translate "Close" %}
</button>
</div>
</div>
</div>
</div>
<div id="current-url" data-current-url="{{ request_full_path }}"></div>
<div id="current-language" data-current-language="{{ i18n_language.code }}"></div>
{# #}
{# Guest users #}
{# #}
{# {% if not user.is_authenticated or user.userprofile.is_temporary %} #}
{% if user.is_authenticated and user.userprofile.is_temporary %}
<div class="alert alert-warning text-center" role="alert">
{% translate "You are using a guest account, data entered will be deleted after a week." %}
{% if not has_demo_data %}
<br>
<a href="{% url 'core:user:demo-entries' %}" rel="nofollow"
class="btn btn-link btn-sm">
{% translate "Create some demo entries" %}
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
{% else %}
<br>
<a href="{% url 'core:user:registration' %}" class="btn btn-link btn-sm">
{% translate "Register" %}
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
{% endif %}
</div>
{% endif %}
{% block template %}{% endblock %}
</div>
</div>
<footer id="main-footer" class="bg-light border-top">
<div class="container bg-wger-light">
<div class="row">
<div class="col-xl-4 col-md-7 mt-2">
<a href="https://play.google.com/store/apps/details?id=de.wger.flutter">
<img
src="{% static 'images/logos/play-store/badge.svg' %}"
alt="google play logo"
height="40"
/></a>
<a href="https://apps.apple.com/us/app/wger-workout-manager/id6502226792">
<img
src="{% static 'images/logos/app-store/black.svg' %}"
alt="app store logo"
height="40"/></a>
<a href="https://flathub.org/apps/de.wger.flutter">
<img
src="{% static 'images/logos/flathub/black.svg' %}"
alt="flathub logo"
height="40"
/></a>
</div>
<div class="col-xl-6 col-md-3">
<ul class="list-unstyled mb-0 pt-2">
<li>
<a href="{% url 'core:imprint' %}" class="text-muted small">
{% translate "Imprint" %}
</a>
</li>
<li>
<a href="{% url 'software:tos' %}" class="text-muted small">
{% translate "Terms of service" %}
</a>
</li>
</ul>
</div>
{# #}
{# Render the links to the other languages #}
{# #}
<div class="col-md-2">
{% if not is_api_path %}
{# Don't show language switcher in the generated API views #}
<div class="btn-group dropup">
<button class="btn btn-light dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false">
<span class="{% fa_class 'globe' %}"></span>
{% translate i18n_language.name %}
<span class="caret"></span>
</button>
<ul class="dropdown-menu language-menu" aria-labelledby="btnGroupLanguages">
<form id="language-form" action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}">
<input type="hidden" name="language" id="language-input">
<li>
<button class="dropdown-item" type="button" data-language="">
<span class="{% fa_class 'globe' %}"></span>
<span>{% translate "Browser language" %}</span>
</button>
</li>
{% for language in languages %}
{% language_select language %}
{% endfor %}
</form>
<li>
<hr class="dropdown-divider"></hr>
</li>
<li>
<a href="https://hosted.weblate.org/engage/wger/"
class="dropdown-item"
target="_blank">
<span class="{% fa_class 'plus' %}"></span>
{% translate "Translate" %}
</a>
</li>
</ul>
</div>
{% endif %}
</div>
</div>
</div>
</footer>
</body>
</html>