django-allauth-ens/allauth_ens/templates/allauth_ens/base.html
2018-06-22 22:05:42 +02:00

90 lines
2.3 KiB
HTML

{% load i18n static %}
{% load account allauth_ens %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}{% endblock %}{% if request.site.name %} · {{ request.site.name }}{% endif %}</title>
{# Responsive UI #}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{# CSS #}
<link rel="stylesheet"
href="{% static "vendor/font-awesome/4.7.0/css/font-awesome.min.css" %}">
<link rel="stylesheet"
href="{% static "allauth_ens/fonts/index.css" %}">
<link rel="stylesheet"
href="{% static "allauth_ens/screen.css" %}">
{# JS #}
<script type="text/javascript"
src="{% static "vendor/jquery/3.2.1/jquery-3.2.1.slim.min.js" %}"></script>
<script type="text/javascript"
src="{% static "allauth_ens/authens.js" %}"></script>
{% block extra_js %}{% endblock %}
</head>
<body>
<div class="wrapper">
<header>
<h1>{% block header-title %}{% endblock %}</h1>
<div class="right">
<div id="view-site">
{% get_home_url as home_url %}
{% if home_url %}
<a href="{{ home_url }}">
{{ request.site.name|default:"View site" }}
</a>
{% else %}
<span>{{ request.site.name|default:"View site" }}</span>
{% endif %}
</div>
<div id="connect-status">
{% if user.is_authenticated %}
{% get_profile_url as profile_url %}
{% if profile_url %}
<a href="{{ profile_url }}">
<i class="fa fa-user"></i>
{% user_display user %}
</a>
{% else %}
<span>
<i class="fa fa-user"></i>
{% user_display user %}
</span>
{% endif %}
{% else %}
<a href="{% url "account_login" %}">
<i class="fa fa-sign-in"></i>
{% trans "Not Connected" %}
</a>
{% endif %}
</div>
</div>
</header>
{% include "allauth_ens/block-messages.html" %}
{% block messages-extra %}{% endblock %}
<div class="content-wrapper {% block content-extra-classes %}{% endblock %}">
{% block content %}{% endblock %}
</div>
</div>
</body>
</html>