Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy load #21

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</a>
<ul class="right hide-on-med-and-down">
<li>
<a href="https://web.facebook.com/groups/free.code.camp.karachi" rel="noopener"target="_blank" />
<a href="https://web.facebook.com/groups/free.code.camp.karachi" rel="noopener" target="_blank" />
<i class="fa fa-facebook fa-2x" aria-hidden="true"></i>
</a>
</li>
Expand Down Expand Up @@ -135,9 +135,9 @@ <h4>Events</h4>
</div>
</section>

<div class="parallax-container ">
<div class="parallax-container">
<div class="parallax">
<img src="./source/images/session.jpg">
<img class="lazy" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" data-src="./source/images/session.jpg">
</div>
</div>

Expand Down Expand Up @@ -241,18 +241,18 @@ <h1>Our Sponsors & Partners</h1>
</p>
<div class="carousel">
<a class="carousel-item" href="https://www.appbakerz.com/" rel="noopener" target="_blank">
<img src="./source/images/sponsors/appbakerz.png">
<img class="lazy" data-src="./source/images/sponsors/appbakerz.png" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=">
</a>
<a class="carousel-item" href="http://recurship.com/" rel="noopener" target="_blank">
<img src="./source/images/sponsors/recurship.png">
<img class="lazy" data-src="./source/images/sponsors/recurship.png" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=">
</a>
<a class="carousel-item" href="http://devncode.tech/" rel="noopener" target="_blank">
<img src="./source/images/sponsors/devncode.png">
<img class="lazy" data-src="./source/images/sponsors/devncode.png" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=">
</a>
<a class="carousel-item" href="https://blackfirehost.com/index.php" rel="noopener" target="_blank">
<img src="./source/images/sponsors/blackfirehost.png">
<img class="lazy" data-src="./source/images/sponsors/blackfirehost.png" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=">
</a>

</div>
<div class="seperator-bottom">
<svg id="curveDownColor" xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100" viewBox="0 0 100 100"
Expand All @@ -264,7 +264,7 @@ <h1>Our Sponsors & Partners</h1>

<div class="parallax-container ">
<div class="parallax">
<img src="./source/images/Nagan_Ch_Karachi-1024x675.jpg">
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" data-src="./source/images/Nagan_Ch_Karachi-1024x675.jpg">
</div>
</div>

Expand All @@ -281,7 +281,7 @@ <h1>Contributors</h1>
<div class="row">
<div class="col s12 m4">
<div class="card-panel">
<img class="circle-img" src="./source/images/contributors/Ali.jpeg" alt="Ali's Picture">
<img class="lazy circle-img" data-src="./source/images/contributors/Ali.jpeg" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" alt="Ali's Picture">
<span class="green-text">
<h4>Muhammad Ali</h4>
<hr class="hr-white">
Expand All @@ -297,7 +297,7 @@ <h4>Muhammad Ali</h4>
</div>
<div class="col s12 m4">
<div class="card-panel">
<img class="circle-img" src="./source/images/contributors/raza.jpeg" alt="Raza's Picture">
<img class="lazy circle-img" data-src="./source/images/contributors/raza.jpeg" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" alt="Raza's Picture">
<span class="green-text">
<h4>Ahmed Raza</h4>
<hr class="hr-white">
Expand All @@ -314,7 +314,7 @@ <h4>Ahmed Raza</h4>
</div>
<div class="col s12 m4">
<div class="card-panel">
<img class="circle-img" src="./source/images/contributors/shumail.jpeg" alt="Shumail's Picture">
<img class="lazy circle-img" data-src="./source/images/contributors/shumail.jpeg" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" alt="Shumail's Picture">
<span class="green-text">
<h4>Shumail Mehdi</h4>
<hr class="hr-white">
Expand Down Expand Up @@ -354,7 +354,7 @@ <h1>Core Members</h1>
<div class="row">
<div class="col s12 m4">
<div class="card-panel">
<img class="circle-img" src="./source/images/contributors/moiz.jpeg" alt="Moiz's Picture">
<img class="lazy circle-img" data-src="./source/images/contributors/moiz.jpeg" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" alt="Moiz's Picture">
<span class="green-text">
<h4>Abdul Moiz</h4>
<hr class="hr-white">
Expand All @@ -370,7 +370,7 @@ <h4>Abdul Moiz</h4>
</div>
<div class="col s12 m4">
<div class="card-panel">
<img class="circle-img" src="./source/images/contributors/nawazish.jpeg" alt="Nawazish's Picture">
<img class="lazy circle-img" data-src="./source/images/contributors/nawazish.jpeg" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" alt="Nawazish's Picture">
<span class="green-text">
<h4>Nawazish Ali</h4>
<hr class="hr-white">
Expand All @@ -386,7 +386,7 @@ <h4>Nawazish Ali</h4>
</div>
<div class="col s12 m4">
<div class="card-panel">
<img class="circle-img" src="./source/images/contributors/hassan.jpeg" alt="Hassan's Picture">
<img class="lazy circle-img" data-src="./source/images/contributors/hassan.jpeg" src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mM88R8AApUByU2MEcEAAAAASUVORK5CYII=" alt="Hassan's Picture">
<span class="green-text">
<h4>Mohammad Hasan</h4>
<hr class="hr-white">
Expand Down Expand Up @@ -465,6 +465,7 @@ <h3>Contact Us</h3>
</p>
</footer>
</section>

<script async defer src="./source/js/index.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102929420-2"></script>
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"postcss-modules": "^1.1.0"
},
"devDependencies": {
"node-sass": "^4.7.2"
"lazyload": "^2.0.0-beta.2",
"node-sass": "^4.7.2",
"parcel-plugin-lazy": "0.0.2"
}
}
Binary file added source/images/naik.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion source/js/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
let $ = require('../../node_modules/jquery/dist/jquery');
let hammer = require('../../node_modules/hammerjs');
let materialize = require('../../node_modules/materialize-css/dist/js/materialize');

let lazyload = require('../../node_modules/lazyload/lazyload')

$(document).ready(function () {
$('img.lazy').show().lazyload()
$(".button-collapse").sideNav();
$('.parallax').parallax();
$('.carousel').carousel({ indicators: true, padding: 50, shift: 80 });
Expand Down