Bintang Fajar Julio
add pwa
a309d98
raw
history blame
No virus
3.58 kB
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}{% endblock title %}</title>
<link
rel="shortcut icon"
href="{{ url_for('static', filename='images/favicon.png') }}"
/>
<script
defer
src="{{ url_for('static', filename='plugins/fontawesome/js/all.min.js') }}"
></script>
<link
id="theme-style"
rel="stylesheet"
href="{{ url_for('static', filename='css/portal.css') }}"
/>
<link
rel="manifest"
href="{{ url_for('static', filename='manifest.json') }}"
/>
{% block style %} {% endblock style %}
</head>
<body>
<div class="overlay d-none"></div>
<div class="spinner d-none"></div>
<div class="row g-0 app-auth-wrapper">
<div class="col-12 auth-main-col text-center p-5">
<div class="d-flex flex-column align-content-end">
<div class="app-auth-body mx-auto mt-2">
<div class="app-auth-branding mb-4">
<a class="app-logo" href=""
><img
class="logo-icon"
src="{{ url_for('static', filename='images/logotik.png') }}"
alt="logo"
/></a>
</div>
<div class="auth-form-container text-start">
{% block content %} {% endblock content %}
</div>
</div>
<footer class="app-auth-footer">
<div class="container text-center py-3">
<small class="copyright"
>Copyright <span style="color: #128c9b">JTIK PNJ</span>. Created
by Bintang Fajar Julio</small
>
</div>
</footer>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$('form').submit(function(event) {
$('.overlay').removeClass('d-none');
$('.spinner').removeClass('d-none');
});
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, (title, message) in messages %}
Swal.fire({
title: '{{ title }}',
text: '{{ message }}',
icon: '{{ category }}',
confirmButtonText: 'Baik, saya mengerti',
customClass: {
confirmButton: 'swt-alert-btn'
}
}).then((result) => {
$('.overlay').addClass('d-none');
$('.spinner').addClass('d-none');
if (result.isConfirmed && '{{ category }}' === 'success') {
window.location.href = "{{ url_for('auth.sign_in') }}";
}
});
{% endfor %}
{% endif %}
{% endwith %}
</script>
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("{{ url_for('static', filename='service-worker.js') }}")
.then((registration) => {
console.log(
"Service Worker registered with scope:",
registration.scope
);
})
.catch((error) => {
console.error("Service Worker registration failed:", error);
});
}
</script>
{% block script %}{% endblock script %}
</body>
</html>