More de-bloat
This commit is contained in:
parent
7e893ceebf
commit
cca6421492
|
@ -33,7 +33,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<p class="initial-text">Hold on. Still loading that fancy background. <br /><i class="fa fa-spinner fa-pulse init-loading" aria-hidden="true"></i></p>
|
<p class="initial-text">Click a button!</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
5
main.js
5
main.js
|
@ -14,8 +14,6 @@ var page3 = "pages/projects.html";
|
||||||
|
|
||||||
const contentArea = document.getElementById("page");
|
const contentArea = document.getElementById("page");
|
||||||
|
|
||||||
const spinner = '<div class="loading-box"><i class="fa fa-spinner fa-pulse loading" aria-hidden="true"></i></div>';
|
|
||||||
|
|
||||||
// Very bad function to get rid of the "active" class wherever it is atm
|
// Very bad function to get rid of the "active" class wherever it is atm
|
||||||
function resetButtons() {
|
function resetButtons() {
|
||||||
button1.className = "nav-button";
|
button1.className = "nav-button";
|
||||||
|
@ -34,7 +32,6 @@ function httpGet(myUrl, callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function activatePage(navbutt, source) {
|
function activatePage(navbutt, source) {
|
||||||
contentArea.innerHTML = spinner;
|
|
||||||
resetButtons();
|
resetButtons();
|
||||||
navbutt.className += " active";
|
navbutt.className += " active";
|
||||||
httpGet(source, setContent);
|
httpGet(source, setContent);
|
||||||
|
@ -60,4 +57,4 @@ function initialContent() {
|
||||||
setContent(contentArea, '<p class="initial-text">Click a button!</p>');
|
setContent(contentArea, '<p class="initial-text">Click a button!</p>');
|
||||||
}
|
}
|
||||||
|
|
||||||
initialContent();
|
initialContent();
|
||||||
|
|
20
style.css
20
style.css
|
@ -172,26 +172,6 @@ a:hover {
|
||||||
margin-bottom: 70px;
|
margin-bottom: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-box {
|
|
||||||
display: block;
|
|
||||||
overflow: hidden;
|
|
||||||
margin: 70px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading {
|
|
||||||
font-size: 26pt;
|
|
||||||
color: #FF5555;
|
|
||||||
display: block;
|
|
||||||
margin: 5px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.init-loading {
|
|
||||||
font-size: 26pt;
|
|
||||||
color: #FF5555;
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notice {
|
.notice {
|
||||||
color: #3b3b3b;
|
color: #3b3b3b;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
Loading…
Reference in New Issue