Added loading indicator when translations are being retrieved
This commit is contained in:
17
index.html
17
index.html
@@ -66,24 +66,35 @@
|
|||||||
/* .district:hover ~ .districtText {
|
/* .district:hover ~ .districtText {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
.loading-indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.htmx-request.loading-indicator /* While request is being made */ {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<section id="textStuff">
|
<section id="textStuff">
|
||||||
<h1>Indian Translate</h1>
|
<h1>Indian Translate</h1>
|
||||||
<form hx-get="/submit" hx-on::after-request="updateTranslations(event.detail.xhr.response)" class="translateForm" method="get">
|
<form hx-get="/submit" hx-swap=none hx-indicator="#loading-screen" hx-on::after-request="updateTranslations(event.detail.xhr.response)" class="translateForm" method="get">
|
||||||
<label for="query">Enter text to translate:</label>
|
<label for="query">Enter text to translate:</label>
|
||||||
<input type="text" name="query" id="query" required/>
|
<input type="text" name="query" id="query" required/>
|
||||||
<input type="submit" value="Translate"/>
|
<input type="submit" value="Translate"/>
|
||||||
</form>
|
</form>
|
||||||
|
<progress id="loading-screen" class="loading-indicator"></progress>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<svg id = "indiaMap" width="1000" height="1000"></svg>
|
<svg id = "indiaMap" width="1000" height="1000"></svg>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script src="index.js"></script>
|
<script type="text/javascript" src="index.js"></script>
|
||||||
<script src="updateTranslations.js"></script>
|
<script type="text/javascript" src="updateTranslations.js"></script>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user