mirror of https://github.com/logos-co/open-law.git
102 lines
4.8 KiB
HTML
102 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>{{ config.APP_NAME }}</title>
|
|
<!-- meta -->
|
|
<meta name="description" content="OpenLaw Flask App" />
|
|
<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/styles.css') }}" rel="stylesheet" />
|
|
<!-- prettier-ignore -->
|
|
<link href="{{ url_for('static', filename='css/quill_readonly.snow.css') }}" rel="stylesheet" />
|
|
<!-- prettier-ignore -->
|
|
<link href="{{ url_for('static', filename='css/quill.snow.css') }}" rel="stylesheet" />
|
|
<script>
|
|
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
|
if (
|
|
localStorage.getItem('color-theme') === 'dark' ||
|
|
(!('color-theme' in localStorage) &&
|
|
window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
) {
|
|
document.documentElement.classList.add('dark');
|
|
} else {
|
|
document.documentElement.classList.remove('dark');
|
|
}
|
|
</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-[150] 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|safe}}</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 %}
|
|
|
|
{% if current_user.is_authenticated %}
|
|
{% block right_sidebar %}
|
|
{% include 'right_sidebar.html' %}
|
|
{% endblock %}
|
|
{% include 'book/add_book_modal.html' %}
|
|
{% endif %}
|
|
|
|
<!-- prettier-ignore -->
|
|
<script src="{{ url_for('static', filename='js/main.js') }}" type="text/javascript" defer></script>
|
|
|
|
<div class="p-0 mt-135 h-auto">
|
|
<!-- Main Content -->
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
{% endblock %}
|
|
<!-- scripts -->
|
|
{% block scripts %} {% endblock %}
|
|
|
|
<!-- DO NOT REMOVE THIS! -->
|
|
<!-- Adding tailwind classes that are not in html, but will be added by jinja -->
|
|
<span class="hidden text-orange-500 !no-underline"></span>
|
|
</body>
|
|
</html>
|