open-law/app/templates/base.html

96 lines
4.5 KiB
HTML
Raw Normal View History

2023-04-20 13:10:16 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>{{ config.APP_NAME }}</title>
<!-- meta -->
2023-04-20 13:18:01 +00:00
<meta name="description" content="OpenLaw Flask App" />
2023-04-20 13:10:16 +00:00
<meta name="author" content="Simple2B" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
{% block meta %}{% endblock %}
<!-- styles -->
<!-- prettier-ignore -->
<!-- <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet"/> -->
<script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
if (
2023-04-20 13:18:01 +00:00
localStorage.getItem('color-theme') === 'dark' ||
(!('color-theme' in localStorage) &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
2023-04-20 13:10:16 +00:00
) {
2023-04-20 13:18:01 +00:00
document.documentElement.classList.add('dark');
2023-04-20 13:10:16 +00:00
} else {
2023-04-20 13:18:01 +00:00
document.documentElement.classList.remove('dark');
2023-04-20 13:10:16 +00:00
}
</script>
<!-- prettier-ignore -->
{% block links %}
{% endblock %}
</head>
<body class="bg-white dark:bg-gray-800">
<!-- Header -->
<!-- prettier-ignore -->
{% include 'header.html' %}
<!-- Flash Messages -->
<!-- prettier-ignore -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<!-- Flash message markup -->
<!-- prettier-ignore -->
<div id="toast-{{category}}" class="absolute top-10 left-10 z-50 flex items-center w-full max-w-xs p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800"role="alert">
<!-- prettier-ignore -->
{% if category == 'success' %}
<div class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200">
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>
<span class="sr-only">Check icon</span>
</div>
<!-- prettier-ignore -->
{% elif category == 'danger' %}
<div class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200">
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
<span class="sr-only">Error icon</span>
</div>
<!-- prettier-ignore -->
{% endif %}
<div class="ml-3 text-sm font-normal">{{message}}</div>
<!-- prettier-ignore -->
<button type="button" class="ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700" data-dismiss-target="#toast-{{category}}" aria-label="Close">
<span class="sr-only">Close</span>
<!-- prettier-ignore -->
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</button>
</div>
<!-- prettier-ignore -->
{% endfor %}
{% endif %}
{% endwith %}
{% block body %}
<!-- SideBar -->
<!-- prettier-ignore -->
{% include 'sidebar.html' %}
2023-04-21 07:48:06 +00:00
{% include 'right_sidebar.html' %}
2023-04-21 09:32:25 +00:00
{% include 'books/add_book_modal.html' %}
2023-04-20 13:10:16 +00:00
<div class="sm:ml-64 mt-14 h-full overflow-x-scroll">
<!-- Main Content -->
{% block content %}{% endblock %}
</div>
{% endblock %}
<!-- scripts -->
<!-- prettier-ignore -->
<script src="{{ url_for('static', filename='js/flowbite.min.js') }}" defer></script>
<!-- prettier-ignore -->
<script src="{{ url_for('static', filename='js/main.js') }}" type="text/javascript" defer></script>
<!-- prettier-ignore -->
{% block scripts %}
{% endblock %}
</body>
</html>