37 lines
1.6 KiB
HTML
37 lines
1.6 KiB
HTML
{% load static %}
|
|
{% load render_bundle from webpack_loader %}
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
|
|
<title>{% block title %}{{ page.title }}{% endblock %}</title>
|
|
<link href="{% static 'index.css' %}" rel="stylesheet">
|
|
{% block head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<template id="django_content">{% block content %}{% endblock %}</template>
|
|
{% if MODE == "internal" %}
|
|
{% render_bundle 'tablet' %}
|
|
{%else %}
|
|
{% render_bundle 'main' %}
|
|
{% endif %}
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
<script>
|
|
$(function() {
|
|
$(document).on('click','input[type="submit"]',function() {
|
|
setTimeout(function() {
|
|
var invalidE = document.forms[0].querySelector(':invalid');
|
|
console.log($(invalidE).offset().top);
|
|
$('html, body').animate({scrollTop: $(invalidE).offset().top - 30}, 0);
|
|
invalidE.reportValidity();
|
|
},0300);
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|