open-law/app/templates/base.html

109 lines
5.0 KiB
HTML
Raw Normal View History

2023-04-20 13:10:16 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
2023-05-26 13:01:31 +00:00
<title>{% block title %}{{ config.APP_NAME }}{% endblock %}</title>
2023-04-20 13:10:16 +00:00
<!-- 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 %}
2023-05-26 13:01:31 +00:00
<!-- favicon -->
<link
rel="icon"
type="image/x-icon"
2023-05-30 14:00:18 +00:00
href="{{ url_for('static', filename='img/logo.svg') }}" />
2023-04-20 13:10:16 +00:00
<!-- styles -->
<!-- prettier-ignore -->
2023-05-09 13:59:51 +00:00
<link href="{{ url_for('static', filename='css/styles.css') }}" rel="stylesheet" />
2023-05-03 14:29:56 +00:00
<!-- prettier-ignore -->
2023-05-15 19:07:56 +00:00
<link href="{{ url_for('static', filename='css/quill_readonly.snow.css') }}" rel="stylesheet" />
<!-- prettier-ignore -->
2023-05-03 14:29:56 +00:00
<link href="{{ url_for('static', filename='css/quill.snow.css') }}" rel="stylesheet" />
2023-04-20 13:10:16 +00:00
<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>
2023-04-25 08:20:50 +00:00
2023-04-20 13:10:16 +00:00
<!-- prettier-ignore -->
{% block links %}
{% endblock %}
</head>
2023-05-30 14:00:18 +00:00
<body class="bg-white dark:bg-gray-800">
2023-04-20 13:10:16 +00:00
<!-- 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 -->
2023-05-17 09:01:11 +00:00
<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">
2023-04-20 13:10:16 +00:00
<!-- 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 %}
2023-04-27 12:44:45 +00:00
<div class="ml-3 text-sm font-normal">{{message|safe}}</div>
2023-04-20 13:10:16 +00:00
<!-- prettier-ignore -->
2023-05-25 06:02:17 +00:00
<button type="button" id="closeToastBtn" 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" aria-label="Close">
2023-04-20 13:10:16 +00:00
<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 %}
2023-04-24 08:33:34 +00:00
2023-04-20 13:10:16 +00:00
{% block body %}
{% if current_user.is_authenticated %}
{% block right_sidebar %}
{% include 'right_sidebar.html' %}
{% endblock %}
2023-05-30 14:00:18 +00:00
{% include 'book/modals/add_book_modal.html' %}
2023-05-17 12:41:10 +00:00
{% endif %}
2023-04-24 13:11:16 +00:00
2023-04-26 14:48:45 +00:00
<!-- prettier-ignore -->
2023-05-09 13:59:51 +00:00
<script src="{{ url_for('static', filename='js/main.js') }}" type="text/javascript" defer></script>
2023-04-26 14:48:45 +00:00
2023-05-17 12:32:52 +00:00
<div class="p-0 mt-135 h-auto">
2023-04-20 13:10:16 +00:00
<!-- Main Content -->
{% block content %}{% endblock %}
</div>
{% endblock %}
<!-- scripts -->
2023-05-03 14:29:56 +00:00
{% block scripts %} {% endblock %}
2023-05-22 06:54:20 +00:00
<!-- 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>
2023-04-20 13:10:16 +00:00
</body>
</html>