diff options
author | Andinus <andinus@nand.sh> | 2022-06-11 11:58:29 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2022-06-11 11:58:29 +0530 |
commit | 89c60aee5a602ed5bfd73a9d5bcbbf9945aac44f (patch) | |
tree | c734a88fc77c56faa6b68edfde3484f8859e9b73 /templates | |
parent | bef200b4669f058ce43ec9c0a3583de7fac558e3 (diff) | |
download | crater-89c60aee5a602ed5bfd73a9d5bcbbf9945aac44f.tar.gz |
Scope css, improve image error handling, show progress bar
- Errors are shown if some images fail to load. - Progress bar is shown while images are loading. - .pack is called after all images have been loaded.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/gallery.crotmp | 8 | ||||
-rw-r--r-- | templates/login.crotmp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/templates/gallery.crotmp b/templates/gallery.crotmp index 6afef0a..6aead73 100644 --- a/templates/gallery.crotmp +++ b/templates/gallery.crotmp @@ -1,5 +1,13 @@ <:use 'templates/base.crotmp'> <|page(.title)> + <div id="loading"> + <label for="loading-progress">Loading Images:</label> + <progress id="loading-progress" max="100" value="0"></progress> + </div> + <div id="loading-error" class="alert" role="alert"> + <span id="loading-error-text"></span> + <button id="loading-error-dismiss">Dismiss</button> + </div> <div id="gallery"> <@gallery : $i> <?{ $i.<type> eq 'img' }> diff --git a/templates/login.crotmp b/templates/login.crotmp index 343f768..9a7acd4 100644 --- a/templates/login.crotmp +++ b/templates/login.crotmp @@ -1,6 +1,6 @@ <:use 'templates/base.crotmp'> <|page('Log In')> - <form method="post" action="/login"> + <form id="login-form" method="post" action="/login"> <?.error> <div class="alert" role="alert"> <.error> |