Start switch to Bootstrap 5
- drop jQuery and fontawesome dependencies - add bootstrap5 and bootstrap-icons - update fonts mfizz - update base templates and the first set of other templates - replace blocktrans and trans with blocktranslate and translate to prepare for Django 4 - move hostingpakcage templates to hostingpackages/templates - update translations
This commit is contained in:
parent
5cf7ef7a23
commit
8e42cb9c18
124 changed files with 10873 additions and 4490 deletions
|
@ -1,26 +1,16 @@
|
|||
{% load static i18n account %}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{% block title %}gnuviechadmin{% endblock title %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Le styles -->
|
||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/bootstrap-icons.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'fonts/font-mfizz.css' %}" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- This file store project specific CSS -->
|
||||
<link href="{% static 'css/gnuviechadmin.css' %}" rel="stylesheet">
|
||||
|
@ -28,125 +18,163 @@
|
|||
<!-- Use this to quickly test CSS changes in a template,
|
||||
then move to gnuviechadmin.css -->
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{% if user.is_authenticated %}{% url 'customer_dashboard' slug=user.username %}{% else %}{% url 'dashboard' %}{% endif %}" title="{% trans "Dashboard" %}">gnuviechadmin</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% if user.is_staff %}
|
||||
<li class="dropdown{% if active_item == 'hostingpackage' %} active{% endif %}">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-server"></i> {% trans "Hosting" %} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{% url 'hosting_packages' user=user.username %}"><i class="fa fa-cube"></i> {% trans "Your hosting packages" %}</a></li>
|
||||
<li><a href="{% url 'all_hosting_packages' %}"><i class="fa fa-cubes"></i> {% trans "All hosting packages" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% elif user.is_authenticated %}
|
||||
<li{% if active_item == 'hostingpackage' %} class="active"{% endif %}><a href="{% url 'hosting_packages' user=user.username %}"><i class="fa fa-server"></i> {% trans "Hosting" %}</a></li>
|
||||
{% endif %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="glyphicon glyphicon-link"></i> {% trans "Links" %} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{ webmail_url }}" title="{% trans "Web based mail system" %}"><i class="fa fa-envelope"></i> {% trans "Webmail" %}</a></li>
|
||||
<li><a href="{{ phpmyadmin_url }}" title="{% trans "phpMyAdmin - MySQL database administration tool" %}"><i class="icon-mysql"></i> {% trans "phpMyAdmin" %}</a></li>
|
||||
<li><a href="{{ phppgadmin_url }}" title="{% trans "phpPgAdmin - PostgreSQL database administration tool" %}"><i class="icon-postgres"></i> {% trans "phpPgAdmin" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li{% if active_item == 'imprint' %} class="active"{% endif %}><a href="{% url 'imprint' %}"><i class="fa fa-info"></i> {% trans "Imprint" %}</a></li>
|
||||
<li{% if active_item == 'contact' %} class="active"{% endif %}><a href="{% url 'contact_form' %}"><i class="fa fa-paper-plane"></i> {% trans "Contact" %}</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% spaceless %}
|
||||
{% if user.is_authenticated %}
|
||||
{% url 'customer_dashboard' slug=user.username %}
|
||||
{% else %}
|
||||
{% url 'dashboard' %}
|
||||
{% endif %}
|
||||
{% endspaceless %}" title="{% translate "Dashboard" %}">gnuviechadmin</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent"
|
||||
aria-controls="navbarContent" aria-expanded="false" aria-label="{% translate "Toggle navigation" %}">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapes navbar-collapse" id="navbarContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mg-lg-0">
|
||||
{% if user.is_staff %}
|
||||
<li class="nav-item dropdown{% if active_item == 'hostingpackage' %} active{% endif %}">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button"
|
||||
aria-expanded="false"><i class="bi-server"></i> {% translate "Hosting" %}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a class="dropdown-item" href="{% url 'hosting_packages' user=user.username %}"><i
|
||||
class="bi-box2-fill"></i> {% translate "Your hosting packages" %}</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'all_hosting_packages' %}"><i
|
||||
class="bi-boxes"></i> {% translate "All hosting packages" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% elif user.is_authenticated %}
|
||||
<li class="nav-item{% if active_item == 'hostingpackage' %} active{% endif %}"><a
|
||||
class="nav-link" href="{% url 'hosting_packages' user=user.username %}"><i
|
||||
class="bi-server"></i> {% translate "Hosting" %}</a></li>
|
||||
{% endif %}
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button"
|
||||
aria-expanded="false"><i class="bi-link"></i> {% translate "Links" %} </a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a class="dropdown-item" href="{{ webmail_url }}"
|
||||
title="{% translate "Web based mail system" %}"><i
|
||||
class="bi-envelope-at"></i> {% translate "Webmail" %}</a></li>
|
||||
<li><a class="dropdown-item" href="{{ phpmyadmin_url }}"
|
||||
title="{% translate "phpMyAdmin - MySQL database administration tool" %}"><i
|
||||
class="icon-mysql"></i> {% translate "phpMyAdmin" %}</a></li>
|
||||
<li><a class="dropdown-item" href="{{ phppgadmin_url }}"
|
||||
title="{% translate "phpPgAdmin - PostgreSQL database administration tool" %}"><i
|
||||
class="icon-postgres"></i> {% translate "phpPgAdmin" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item{% if active_item == 'imprint' %} active{% endif %}"><a
|
||||
class="nav-link" href="{% url 'imprint' %}"><i class="bi-info"></i> {% translate "Imprint" %}
|
||||
</a></li>
|
||||
<li class="nav-item{% if active_item == 'privacy' %} active{% endif %}"><a
|
||||
class="nav-link" href="{% url 'privacy' %}"><i class="bi-file-text"></i> {% translate "Privacy policy" %}
|
||||
</a></li>
|
||||
<li class="nav-item{% if active_item == 'contact' %} active{% endif %}"><a
|
||||
class="nav-link" href="{% url 'contact_form' %}"><i
|
||||
class="bi-chat-dots"></i> {% translate "Contact" %}</a></li>
|
||||
</ul>
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown{% if active_item == 'account' %} active{% endif %}">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> {% trans "My Account" %} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{% if user.is_superuser %}<li><a href="{% url 'impersonate-search' %}"><i class="fa fa-angellist"></i> {% trans "Impersonate user" %}</a></li>{% endif %}
|
||||
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}"><i class="fa fa-wrench"></i> {% trans "Admin site" %}</a></li>{% endif %}
|
||||
<li><a href="{% url 'account_email' %}"><i class="fa fa-at"></i> {% trans "Change Email" %}</a></li>
|
||||
<li><a href="{% url 'socialaccount_connections' %}"><i class="fa fa-users"></i> {% trans "Social Accounts" %}</a></li>
|
||||
<li><a href="{% url 'account_logout' %}"><i class="fa fa-sign-out"></i> {% trans "Logout" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'account_login' %}?next={{ request.path }}"><i class="fa fa-sign-in"></i> {% trans "Sign In" %}</a></li>
|
||||
<li><a href="{% url 'account_signup' %}"><i class="fa fa-user-plus"></i> {% trans "Sign Up" %}</a></li>
|
||||
{% user_display user as user_display %}
|
||||
{% url 'user_profile' slug=user.username as profile_url %}
|
||||
{% if user.is_impersonate %}
|
||||
{% user_display user.impersonator as impersonator_display %}
|
||||
{% url 'impersonate-stop' as stop_impersonation_url %}
|
||||
<span class="navbar-text justify-content-end">{% blocktranslate trimmed %}
|
||||
Signed in as
|
||||
<a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a>
|
||||
<i class="bi-incognito" title="impersonated by {{ impersonator_display }}"></i>
|
||||
<a href="{{ stop_impersonation_url }}" class="navbar-link"><i class="bi-sign-stop" title="stop impersonation"></i></a>
|
||||
{% endblocktranslate %}</span>
|
||||
{% else %}
|
||||
<span class="navbar-text justify-content-end">{% blocktranslate trimmed %}
|
||||
Signed in as
|
||||
<a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a>
|
||||
{% endblocktranslate %}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if user.is_authenticated %}
|
||||
{% user_display user as user_display %}
|
||||
{% url 'user_profile' slug=user.username as profile_url %}
|
||||
{% if user.is_impersonate %}
|
||||
{% user_display user.impersonator as impersonator_display %}
|
||||
{% url 'impersonate-stop' as stop_impersonation_url %}
|
||||
<p class="navbar-text navbar-right">{% blocktrans %}Signed in as <a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a> (impersonated by {{ impersonator_display }}, <a href="{{ stop_impersonation_url }}" class="navbar-link">stop impersonation</a>){% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p class="navbar-text navbar-right">{% blocktrans %}Signed in as <a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a>{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<ul class="navbar-nav justify-content-end">
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item dropdown{% if active_item == 'account' %} active{% endif %}">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button"
|
||||
aria-expanded="false"><i class="bi-person"></i> {% translate "My Account" %}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{% if user.is_superuser %}
|
||||
<li><a class="dropdown-item" href="{% url 'impersonate-search' %}"><i
|
||||
class="bi-incognito"></i> {% translate "Impersonate user" %}</a>
|
||||
</li>{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<li><a class="dropdown-item" href="{% url 'admin:index' %}"><i
|
||||
class="bi-gear"></i> {% translate "Admin site" %}</a></li>{% endif %}
|
||||
<li><a class="dropdown-item" href="{% url 'account_email' %}"><i
|
||||
class="bi-envelope-at"></i> {% translate "Change Email" %}
|
||||
</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'socialaccount_connections' %}"><i
|
||||
class="bi-people"></i> {% translate "Social Accounts" %}</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'account_logout' %}"><i
|
||||
class="bi-door-closed"></i> {% translate "Logout" %}
|
||||
</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<li><a class="dropdown-item" href="{% url 'account_login' %}?next={{ request.path }}"><i
|
||||
class="bi-door-open"></i> {% translate "Sign In" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container gva-body">
|
||||
<main class="container gva-body mt-3">
|
||||
|
||||
<h1>{% block page_title %}Example Base Template{% endblock page_title %}</h1>
|
||||
<h1 class="mb-4">{% block page_title %}Example Base Template{% endblock page_title %}</h1>
|
||||
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-dismissible {{ message.tags }}" role="alert">
|
||||
<button type="close" class="close" data-dismiss="alert" aria-label="{% trans "Close" %}"><span aria-hidden="true">×</span></button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-dismissible {{ message.tags }}" role="alert">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"
|
||||
aria-label="{% translate "Close" %}"></button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% block content %}
|
||||
<p>Use this document as a way to quick start any new project.</p>
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
|
||||
</div> <!-- /container -->
|
||||
</main> <!-- /container -->
|
||||
|
||||
<footer class="gva-footer" role="contentinfo">
|
||||
<div class="container">
|
||||
<footer class="gva-footer bg-light sticky-lg-bottom small mt-4" role="contentinfo">
|
||||
<div class="container">
|
||||
<ul class="gva-footer-links text-muted">
|
||||
<li>gnuviechadmin {{ gnuviechadmin_version }}</li>
|
||||
<li>·</li>
|
||||
<li>built with:</li>
|
||||
<li><a href="https://www.python.org/"><i class="icon-python"></i> Python</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="https://www.djangoproject.com/">Django</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://www.postgresql.org/"><i class="icon-postgres"></i> PostgreSQL</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://getbootstrap.com/">Bootstrap</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://fontawesome.io/"><i class="fa fa-flag"></i> Font Awesome</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://mfizz.com/oss/font-mfizz"><i class="icon-mfizz"></i> Font Mfizz</a></li>
|
||||
<li>gnuviechadmin {{ gnuviechadmin_version }}</li>
|
||||
<li>·</li>
|
||||
<li>built with:</li>
|
||||
<li><a href="https://www.python.org/"><i class="icon-python"></i> Python</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="https://www.djangoproject.com/">Django</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="https://www.postgresql.org/"><i class="icon-postgres"></i> PostgreSQL</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="https://getbootstrap.com/"><i class="bi-bootstrap-fill"></i> Bootstrap</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="https://icons.getbootstrap.com/">Bootstrap Icons</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://mfizz.com/oss/font-mfizz">Font Mfizz</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Le javascript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="//code.jquery.com/jquery-latest.js"></script>
|
||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
||||
|
||||
<!-- place project specific Javascript in this file -->
|
||||
<script src="{% static 'js/gnuviechadmin.js' %}"></script>
|
||||
<!-- place project specific Javascript in this file -->
|
||||
<script src="{% static 'js/gnuviechadmin.js' %}"></script>
|
||||
|
||||
{% block extra_js %}{% endblock extra_js %}
|
||||
</body>
|
||||
{% block extra_js %}{% endblock extra_js %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue