Make log hugoBasicExample error free

This commit is contained in:
hossainemruz 2020-06-14 14:39:39 +06:00
parent cdb2267f2d
commit f85b8a2e8e
2 changed files with 17 additions and 12 deletions

View file

@ -10,8 +10,9 @@
</div> </div>
</div> </div>
<div class="container filtr-projects"> <div class="container filtr-projects">
<div class="row"> <div class="row" id="project-card-holder">
{{ range .Site.Data.projects.projects }} {{ partial "cards/project" . }} {{ range .Site.Data.projects.projects }}
{{ partial "cards/project" . }}
{{ end }} {{ end }}
</div> </div>
</div> </div>

View file

@ -29,16 +29,18 @@ var projectCards;
if (document.getElementById('typing-carousel-data') != undefined) { if (document.getElementById('typing-carousel-data') != undefined) {
var ul = document.getElementById('typing-carousel-data').children; var ul = document.getElementById('typing-carousel-data').children;
var data = []; if (ul.length != 0) {
Array.from(ul).forEach(el => { var data = [];
data.push(el.textContent); Array.from(ul).forEach(el => {
}) data.push(el.textContent);
})
ityped.init('#ityped', { ityped.init('#ityped', {
strings: data, strings: data,
startDelay: 200, startDelay: 200,
loop: true loop: true
}); });
}
} }
// ================= Smooth Scroll =================== // ================= Smooth Scroll ===================
@ -113,7 +115,9 @@ var projectCards;
} }
} }
projectCards = $(".filtr-projects").filterizr({ layout: 'sameWidth' }); if (document.getElementById("project-card-holder").children.length != 0) {
projectCards = $(".filtr-projects").filterizr({ layout: 'sameWidth' });
}
function showGithubStars() { function showGithubStars() {
// fix the github button class // fix the github button class