Skip to content

Commit

Permalink
Show a loading icon when sending a message (#96)
Browse files Browse the repository at this point in the history
* Loading icon css and html

* Update html to use loading icon

* Update dependencies
  • Loading branch information
Spencer14420 authored Dec 1, 2024
1 parent 482fafe commit d060306
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 16 deletions.
41 changes: 41 additions & 0 deletions dist/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,47 @@ h2 {
}
}

/* Loading icon */
.lds-ring,
.lds-ring div {
box-sizing: border-box;
}
.lds-ring {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-ring div {
box-sizing: border-box;
display: block;
position: absolute;
width: 64px;
height: 64px;
margin: 8px;
border: 8px solid currentColor;
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: currentColor transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
animation-delay: -0.15s;
}
@keyframes lds-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

/* #### Media Queries ##### */

/* Top panel text and image adjustments */
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ <h3 class="modal-title" id="contactModalLabel">Contact Us</h3>
<div id="message-alert" class="alert alert-danger" role="alert"></div>
</div>
<div class="modal-footer">
<div id="sendmessage-loading" style="display:none;">
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
</div>
<button type="button" class="btn-capanda btn-capanda-blue" id="sendmessage">Send Message</button>
</div>
</div>
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d060306

Please sign in to comment.