Skip to content

Commit

Permalink
Small HTML fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
liffiton committed Jul 19, 2024
1 parent 7f8a8db commit beb6dbd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
2 changes: 0 additions & 2 deletions src/codehelp/templates/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ <h2>References</h2>
</p>
</div>

</div>
</div>
</div>
</section>
{% endblock %}
40 changes: 20 additions & 20 deletions src/gened/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
.content ul ol, .content ol ul, .content ul ul, .content ol ol { margin-top: 0.25em; }
</style>
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js" defer type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@8" type="text/javascript"></script>
<link href="{{ url_for('static', filename='datatables.css') }}" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@8" type="text/javascript"></script>
<script type="text/javascript">
function initTable(tblname, rows, link_col, link_func, csv_link=null) {
const table = new simpleDatatables.DataTable(`table#${tblname}`, {
Expand Down Expand Up @@ -104,13 +104,6 @@
}
}
</script>
{% if 'timezone' not in session %}
<script type="text/javascript">
// Send browser's timezone to server for displaying dates/times in local timezone.
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
fetch("/set_timezone", {method: 'POST', body: timezone});
</script>
{% endif %}
<title>{{ config['APPLICATION_TITLE'] }}</title>
</head>
<body>
Expand Down Expand Up @@ -265,18 +258,25 @@
{% endif %}
</div>
</footer>
<script type="text/JavaScript">
// close dialogs on click outside
const dialogs = document.querySelectorAll("dialog");
dialogs.forEach(dialog => dialog.addEventListener('click', function (e) {
const rect = dialog.getBoundingClientRect();
const isInDialog=(rect.top <= e.clientY && e.clientY <= rect.top + rect.height
&& rect.left <= e.clientX && e.clientX <= rect.left + rect.width);
if (!isInDialog) {
dialog.close();
}
}));
</script>
{% if 'timezone' not in session %}
<script type="text/javascript">
// Send browser's timezone to server for displaying dates/times in local timezone.
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
fetch("/set_timezone", {method: 'POST', body: timezone});
</script>
{% endif %}
</body>
<script type="text/JavaScript">
// close dialogs on click outside
const dialogs = document.querySelectorAll("dialog");
dialogs.forEach(dialog => dialog.addEventListener('click', function (e) {
const rect = dialog.getBoundingClientRect();
const isInDialog=(rect.top <= e.clientY && e.clientY <= rect.top + rect.height
&& rect.left <= e.clientX && e.clientX <= rect.left + rect.width);
if (!isInDialog) {
dialog.close();
}
}));
</script>
</html>

0 comments on commit beb6dbd

Please sign in to comment.