Add loading bar

This commit is contained in:
cuom1999 2023-09-01 18:09:30 -05:00
parent 9a89c5a15a
commit 41ba0894ac
4 changed files with 22 additions and 2 deletions

View file

@ -233,7 +233,7 @@ header {
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 48px; height: $navbar_height;
} }
nav { nav {
@ -377,7 +377,7 @@ hr {
} }
#content { #content {
margin: 48px auto 1em auto; margin: $navbar_height auto 1em auto;
padding-top: 1em; padding-top: 1em;
// Header // Header
@ -860,6 +860,16 @@ select {
margin-bottom: 1em; margin-bottom: 1em;
} }
#loading-bar {
position: fixed;
top: 0;
left: 0;
height: 2px;
background-color: #993932;
width: 0;
z-index: 9999;
}
@media (max-width: 799px) { @media (max-width: 799px) {
#user-links, .anon { #user-links, .anon {
padding-right: 0.5em; padding-right: 0.5em;

View file

@ -385,6 +385,12 @@ function onWindowReady() {
showTooltip(e.trigger, fallbackMessage(e.action)); showTooltip(e.trigger, fallbackMessage(e.action));
}); });
}); });
$('a').click(function() {
$("#loading-bar").show();
$("#loading-bar").animate({ width: "100%" }, 1500, function() {
$(this).hide();
});
});
} }
$(function() { $(function() {
@ -429,4 +435,5 @@ $(function() {
$('html').click(function () { $('html').click(function () {
$nav_list.hide(); $nav_list.hide();
}); });
}); });

View file

@ -10,3 +10,5 @@ $widget_border_radius: 4px;
$table_header_rounding: 6px; $table_header_rounding: 6px;
$monospace-fonts: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; $monospace-fonts: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
$navbar_height: 48px;

View file

@ -316,6 +316,7 @@
</div> </div>
<div id="nav-shadow"></div> <div id="nav-shadow"></div>
</nav> </nav>
<div id="loading-bar"></div>
{% if request.in_contest %} {% if request.in_contest %}
<div id="contest-info"> <div id="contest-info">
<div id="contest-info-main"> <div id="contest-info-main">