mirror of https://github.com/snachodog/mybuddy.git
Refactor overall template structure.
This commit is contained in:
parent
0c9b953ab4
commit
f474ccb8b9
|
@ -0,0 +1,32 @@
|
|||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{% block title %}{% endblock %} | Baby Blotter</title>
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
|
||||
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
|
||||
crossorigin="anonymous" />
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
|
||||
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
|
||||
crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="{% static "css/tempusdominus-bootstrap-4.min.css" %}" />
|
||||
</head>
|
||||
<body style="padding-top: 5rem;">
|
||||
|
||||
{% block nav %}{% endblock %}
|
||||
{% block page %}{% endblock %}
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"
|
||||
integrity="sha256-1hjUhpc44NwiNg8OwMu2QzJXhD8kcj+sJA3aCQZoUjg="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="{% static "js/tempusdominus-bootstrap-4.min.js" %}"></script>
|
||||
{% block javascript %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,71 @@
|
|||
{% extends 'babyblotter/base.html' %}
|
||||
|
||||
{% block nav %}
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||
<a class="navbar-brand" href="/"><span class="text-info">Baby</span> Blotter</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
||||
data-target="#navbarsExampleDefault"
|
||||
aria-controls="navbarsExampleDefault" aria-expanded="false"
|
||||
aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'index' %}">
|
||||
<i class="fa fa-dashboard" aria-hidden="true"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if perms.core.view_child %}
|
||||
<li class="nav-item{% if request.path == '/children/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'child-list' %}">
|
||||
<i class="fa fa-child" aria-hidden="true"></i> Children
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_diaperchange %}
|
||||
<li class="nav-item{% if request.path == '/changes/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'diaperchange-list' %}">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i> Changes
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_feeding %}
|
||||
<li class="nav-item{% if request.path == '/feedings/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'feeding-list' %}">
|
||||
<i class="fa fa-spoon" aria-hidden="true"></i> Feedings
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_sleep %}
|
||||
<li class="nav-item{% if request.path == '/sleep/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'sleep-list' %}">
|
||||
<i class="fa fa-bed" aria-hidden="true"></i> Sleep
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_tummytime %}
|
||||
<li class="nav-item{% if request.path == '/tummy-time/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'tummytime-list' %}">
|
||||
<i class="fa fa-smile-o" aria-hidden="true"></i> Tummy Time
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_note %}
|
||||
<li class="nav-item{% if request.path == '/notes/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'note-list' %}">
|
||||
<i class="fa fa-sticky-note" aria-hidden="true"></i> Notes
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
|
@ -0,0 +1,22 @@
|
|||
{% extends 'babyblotter/nav-horizontal.html' %}
|
||||
{% load static %}
|
||||
{% load timers %}
|
||||
|
||||
{% block page %}
|
||||
<div id="view-{{ request.resolver_match.view_name }}" class="container-fluid">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-lg-10 mb-4">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
{% if perms.core.view_timer %}
|
||||
<div class="col-lg-2">
|
||||
<h1>Timers</h1>
|
||||
{% if perms.core.add_timer %}
|
||||
{% add_timer request.path %}
|
||||
{% endif %}
|
||||
{% list_timers %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,114 +0,0 @@
|
|||
{% load static %}
|
||||
{% load timers %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{% block title %}{% endblock %} | Baby Blotter</title>
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
|
||||
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
|
||||
crossorigin="anonymous" />
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
|
||||
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
|
||||
crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="{% static "css/tempusdominus-bootstrap-4.min.css" %}" />
|
||||
</head>
|
||||
<body style="padding-top: 5rem;">
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||
<a class="navbar-brand" href="/"><span class="text-info">Baby</span> Blotter</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
||||
data-target="#navbarsExampleDefault"
|
||||
aria-controls="navbarsExampleDefault" aria-expanded="false"
|
||||
aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'index' %}">
|
||||
<i class="fa fa-dashboard" aria-hidden="true"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if perms.core.view_child %}
|
||||
<li class="nav-item{% if request.path == '/children/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'child-list' %}">
|
||||
<i class="fa fa-child" aria-hidden="true"></i> Children
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_diaperchange %}
|
||||
<li class="nav-item{% if request.path == '/changes/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'diaperchange-list' %}">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i> Changes
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_feeding %}
|
||||
<li class="nav-item{% if request.path == '/feedings/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'feeding-list' %}">
|
||||
<i class="fa fa-spoon" aria-hidden="true"></i> Feedings
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_sleep %}
|
||||
<li class="nav-item{% if request.path == '/sleep/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'sleep-list' %}">
|
||||
<i class="fa fa-bed" aria-hidden="true"></i> Sleep
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_tummytime %}
|
||||
<li class="nav-item{% if request.path == '/tummy-time/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'tummytime-list' %}">
|
||||
<i class="fa fa-smile-o" aria-hidden="true"></i> Tummy Time
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_note %}
|
||||
<li class="nav-item{% if request.path == '/notes/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'note-list' %}">
|
||||
<i class="fa fa-sticky-note" aria-hidden="true"></i> Notes
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div id="view-{{ request.resolver_match.view_name }}" class="container-fluid">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-lg-8 mb-4">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
{% if perms.core.view_timer %}
|
||||
<div class="col-lg-2">
|
||||
<h1>Timers</h1>
|
||||
{% if perms.core.add_timer %}
|
||||
{% add_timer request.path %}
|
||||
{% endif %}
|
||||
{% list_timers %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"
|
||||
integrity="sha256-1hjUhpc44NwiNg8OwMu2QzJXhD8kcj+sJA3aCQZoUjg="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="{% static "js/tempusdominus-bootstrap-4.min.js" %}"></script>
|
||||
{% block javascript %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Child{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Children{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Diaper Change{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Diaper Changes{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Feeding{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Feedings{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
|
||||
{% block title %}Welcome!{% endblock %}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Note{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Notes{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Sleep Entry{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Sleep{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Tummy Time Entry{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% extends 'babyblotter/page.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Tummy Time{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue