Skip to content

Commit

Permalink
page layout updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Mar 22, 2024
1 parent 43feeea commit e34cd99
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
$('#expandForm').submit(function(event) {
event.preventDefault(); // Prevent default form submission
var userUrl = $('#urlInput').val(); // Get user input
$('#expandBtn').attr('disabled', true); // Disable button
$('#expandBtn').hide(); // Disable button
$('#spinner').show(); // Show spinner
$('#expandedUrl').empty(); // Clear previous result
$('#screenshot').empty();
$('#screenshot').hide().empty();
$.ajax({
type: 'POST',
url: '/', // Flask route for URL expansion
Expand All @@ -22,11 +22,11 @@
// Append the image to the div with id "screenshot"
$('#screenshot').append(
$('<img>').attr('src', 'screenshot.png')
);
).show();
},
complete: function() {
$('#spinner').hide(); // Hide spinner
$('#expandBtn').attr('disabled', false); // Enable button
$('#expandBtn').show(); // Enable button
}
});
});
Expand All @@ -36,6 +36,11 @@
#spinner {
display: none;
}
#screenshot
{
display: none;
border: 1px solid black;
}
</style>
</head>
<body>
Expand All @@ -48,6 +53,6 @@ <h1>OnGoing URL Expander</h1>
</span>
</form>
<p id="expandedUrl">{{url}}</p>
<div id="screenshot"></div>
<p id="screenshot"></p>
</body>
</html>

0 comments on commit e34cd99

Please sign in to comment.