loading icon on page loading
This commit is contained in:
+42
-1
@@ -65,6 +65,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loader" class="center"></div>
|
||||
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
|
||||
<script>
|
||||
AOS.init();
|
||||
@@ -72,19 +73,59 @@
|
||||
<div>
|
||||
{{- partial "sections/v3/navbar.html" . -}}
|
||||
|
||||
{{ if .Site.Params.disablehome }}
|
||||
{{ if .Site.Params.disable_home }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/home.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.disable_about }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/about.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.disable_experience }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/experience.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.disable_education }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/education.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.disable_projects }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/projects.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.disable_achievements }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/achievements.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.disable_contact }}
|
||||
{{ else }}
|
||||
{{- partial "sections/v3/contact.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{- partial "sections/v3/footer.html" . -}}
|
||||
{{- partial "sections/v3/scripts.html" . -}}
|
||||
</div>
|
||||
<script>
|
||||
document.onreadystatechange = function () {
|
||||
if (document.readyState !== "complete") {
|
||||
document.querySelector(
|
||||
"body").style.visibility = "hidden";
|
||||
document.querySelector(
|
||||
"#loader").style.visibility = "visible";
|
||||
} else {
|
||||
document.querySelector(
|
||||
"#loader").style.display = "none";
|
||||
document.querySelector(
|
||||
"body").style.visibility = "visible";
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
{{ else }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user