refactor template structure

This commit is contained in:
j3d1 2021-10-17 22:45:49 +02:00
parent 73046dd6a7
commit 9e40022aca
8 changed files with 129 additions and 141 deletions

View file

@ -1,4 +1,4 @@
{% extends 'multimail/base.html' %} {% extends 'multimail/page.html' %}
{% block content %} {% block content %}
<h1 class="mt-4">Aliases</h1> <h1 class="mt-4">Aliases</h1>

View file

@ -22,65 +22,8 @@
<body> <body>
<div class="d-flex" id="wrapper"> {% block main %}
<!-- Sidebar -->
<div class="bg-dark border-right" id="sidebar-wrapper">
<div class="sidebar-heading">
<a href="{% url 'multimail:index' %}" class="link-unstyled">Multimail</a>
</div>
<div class="list-group list-group-flush">
<a href="{% url 'multimail:domains' %}" class="list-group-item list-group-item-action bg-dark">Domains</a>
<a href="{% url 'multimail:mailboxes' %}"
class="list-group-item list-group-item-action bg-dark">Mailboxes</a>
<a href="{% url 'multimail:aliases' %}" class="list-group-item list-group-item-action bg-dark">Aliases</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark border-bottom">
<button class="btn btn-link btn-lg" id="menu-toggle"><i class="fas fa-bars"></i></button>
<button class="navbar-toggler btn btn-link btn-lg" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-user"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<!--li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li-->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ user }}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Nothing</a>
<div class="dropdown-divider"></div>
<a href="{% url 'multimail:logout' %}" class="dropdown-item">Logout</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
{% block content %}
{% endblock %} {% endblock %}
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript --> <!-- Bootstrap core JavaScript -->
<script src="{% static 'vendor/jquery/jquery.slim.min.js' %}"></script> <script src="{% static 'vendor/jquery/jquery.slim.min.js' %}"></script>

View file

@ -1,4 +1,4 @@
{% extends 'multimail/base.html' %} {% extends 'multimail/page.html' %}
{% block content %} {% block content %}
<h1 class="mt-4">Domains</h1> <h1 class="mt-4">Domains</h1>

View file

@ -1,4 +1,4 @@
{% extends 'multimail/base.html' %} {% extends 'multimail/page.html' %}
{% load bootstrap4 %} {% load bootstrap4 %}
{% block content %} {% block content %}

View file

@ -1,4 +1,4 @@
{% extends 'multimail/base.html' %} {% extends 'multimail/page.html' %}
{% block content %} {% block content %}
<div class="pt-3"> <div class="pt-3">

View file

@ -1,25 +1,6 @@
{% load static %} {% extends 'multimail/base.html' %}
<!DOCTYPE html>
<html lang="en">
<head> {% block main %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Multimail</title>
<!-- Bootstrap core CSS -->
<link href="{% static 'multimail/css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{% static 'multimail/css/simple-sidebar.css' %}" rel="stylesheet">
<link href="{% static "fontawesome/css/all.min.css" %}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="container" style="height:100vh;"> <div class="container" style="height:100vh;">
<div class="row h-100 justify-content-center align-items-center"> <div class="row h-100 justify-content-center align-items-center">
@ -78,6 +59,5 @@
</div> </div>
</div> </div>
</div> </div>
</body>
</html> {% endblock %}

View file

@ -1,4 +1,4 @@
{% extends 'multimail/base.html' %} {% extends 'multimail/page.html' %}
{% block content %} {% block content %}
<h1 class="mt-4">Mailboxes</h1> <h1 class="mt-4">Mailboxes</h1>

View file

@ -0,0 +1,65 @@
{% extends 'multimail/base.html' %}
{% load static %}
{% block main %}
<div class="d-flex" id="wrapper">
<!-- Sidebar -->
<div class="bg-dark border-right" id="sidebar-wrapper">
<div class="sidebar-heading">
<a href="{% url 'multimail:index' %}" class="link-unstyled">Multimail</a>
</div>
<div class="list-group list-group-flush">
<a href="{% url 'multimail:domains' %}" class="list-group-item list-group-item-action bg-dark">Domains</a>
<a href="{% url 'multimail:mailboxes' %}"
class="list-group-item list-group-item-action bg-dark">Mailboxes</a>
<a href="{% url 'multimail:aliases' %}" class="list-group-item list-group-item-action bg-dark">Aliases</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark border-bottom">
<button class="btn btn-link btn-lg" id="menu-toggle"><i class="fas fa-bars"></i></button>
<button class="navbar-toggler btn btn-link btn-lg" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-user"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<!--li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li-->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ user }}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Nothing</a>
<div class="dropdown-divider"></div>
<a href="{% url 'multimail:logout' %}" class="dropdown-item">Logout</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
{% block content %}
{% endblock %}
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
{% endblock %}