From 08e03dde2446517b16a20e4bc4bd2c3bdc0f0fe5 Mon Sep 17 00:00:00 2001 From: Victor Lobe Date: Fri, 31 Jul 2020 13:11:13 -0700 Subject: [PATCH 1/2] Added Load More Builds button on MB page --- masterbuilders/assets/css/builders-dist.css | 2 +- masterbuilders/assets/js/builders.js | 11 ++++ masterbuilders/index.html | 61 +++++++++++---------- 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/masterbuilders/assets/css/builders-dist.css b/masterbuilders/assets/css/builders-dist.css index 61ae807..65e4f83 100644 --- a/masterbuilders/assets/css/builders-dist.css +++ b/masterbuilders/assets/css/builders-dist.css @@ -1 +1 @@ -.card-action,.custom-btn,.header,.page-title{text-align:center}*{margin:0;padding:0}body{background:url(../images/bg.png) center no-repeat fixed;background-size:cover;color:#fff;margin-bottom:40px}.masterbuilders-list li,button{color:#ccc;font-family:'Baloo Tamma',cursive;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out}h1,h2,h3,h4,h5,h6,p{text-align:center;font-family:'Baloo Tamma',cursive}.card-action{margin-bottom:30px}button{background:rgba(30,30,30,.5);border:none;outline:0;text-decoration:none;padding:10px;border-radius:10px;width:65%;font-size:1.3em;font-weight:900;text-transform:uppercase;transition:all .2s ease-in-out}button:focus,button:hover{background:rgba(50,50,50,.5)}.card{background:rgba(50,50,50,.3);font-family:'Baloo Tamma',cursive}#note{font-size:1.4em;font-size:900;font-family:'Baloo Tamma',cursive;margin-top:5px}.card .card-image img{height:321.89px!important}.header{padding:100px;background:rgba(200,200,200,.2);width:100%}hr{border:2px solid rgba(230,230,230,.1)}.custom-btn{background:rgba(0,0,0,.6)}.custom-btn:focus,.custom-btn:hover{background:rgba(50,50,50,.6)}.masterbuilders-list li{display:inline-block;background:rgba(100,100,100,.4);padding:8px;cursor:pointer;border-radius:10%;font-size:1.1em;margin:5px;transition:all .2s ease-in-out}.masterbuilders-list li:hover{background:rgba(120,120,120,.5);color:#fff}.masterbuilders-list li img{width:20px;height:20px;margin-right:5px;float:left}.top{position:fixed;bottom:20px;right:50px;font-size:3em;color:rgba(178,34,34,.6);padding:10px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.top:hover{color:rgba(178,34,34,1)}.brand-logo{font-size:'Raleway',sans-serif;font-size:2em;font-weight:200;margin-top:0}@media only screen and (max-width:768px){.header{padding:5px}.masterbuilders-list li{display:block;border-radius:0}button{width:95%}nav .brand-logo{margin-top:13.5px;font-size:1.8em}nav .nav-wrapper li>a{font-weight:500;font-size:1em}} +.card-action,.custom-btn,.header,.page-title{text-align:center}*{margin:0;padding:0}body{background:url(../images/bg.png) center no-repeat fixed;background-size:cover;color:#fff;margin-bottom:40px}.masterbuilders-list li,button{color:#ccc;font-family:'Baloo Tamma',cursive;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out}h1,h2,h3,h4,h5,h6,p{text-align:center;font-family:'Baloo Tamma',cursive}.card-action{margin-bottom:30px}button{background:rgba(30,30,30,.5);border:none;outline:0;text-decoration:none;padding:10px;border-radius:10px;width:65%;font-size:1.3em;font-weight:900;text-transform:uppercase;transition:all .2s ease-in-out}button:focus,button:hover{background:rgba(50,50,50,.5)}.card{background:rgba(50,50,50,.3);font-family:'Baloo Tamma',cursive}#note{font-size:1.4em;font-size:900;font-family:'Baloo Tamma',cursive;margin-top:5px}.card .card-image img{height:321.89px!important}.header{padding:100px;background:rgba(200,200,200,.2);width:100%}hr{border:2px solid rgba(230,230,230,.1)}.custom-btn{background:rgba(0,0,0,.6)}.custom-btn:focus,.custom-btn:hover{background:rgba(50,50,50,.6)}.masterbuilders-list li{display:inline-block;background:rgba(100,100,100,.4);padding:8px;cursor:pointer;border-radius:10%;font-size:1.1em;margin:5px;transition:all .2s ease-in-out}.masterbuilders-list li:hover{background:rgba(120,120,120,.5);color:#fff}.masterbuilders-list li img{width:20px;height:20px;margin-right:5px;float:left}.top{position:fixed;bottom:20px;right:50px;font-size:3em;color:rgba(178,34,34,.6);padding:10px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.top:hover{color:#b22222}.brand-logo{font-size:Raleway,sans-serif;font-size:2em;font-weight:200;margin-top:0}@media only screen and (max-width:768px){.header{padding:5px}.masterbuilders-list li{display:block;border-radius:0}button{width:95%}nav .brand-logo{margin-top:13.5px;font-size:1.8em}nav .nav-wrapper li>a{font-weight:500;font-size:1em}}.build{display:none}.morebuilds{width:auto} \ No newline at end of file diff --git a/masterbuilders/assets/js/builders.js b/masterbuilders/assets/js/builders.js index 78c2ce0..b29e531 100644 --- a/masterbuilders/assets/js/builders.js +++ b/masterbuilders/assets/js/builders.js @@ -21,3 +21,14 @@ $(document).ready(function() { }); + +$(function(){ + $(".build").slice(0, 6).show(); // select the first ten + $("#load").click(function(e){ // click event for load more + e.preventDefault(); + $("div:hidden").slice(0, 6).show(); // select next 10 hidden divs and show them + if($("div:hidden").length == 0){ // check if any hidden divs still exist + $("#load").hide(); + } + }); +}); \ No newline at end of file diff --git a/masterbuilders/index.html b/masterbuilders/index.html index a493fee..d054716 100644 --- a/masterbuilders/index.html +++ b/masterbuilders/index.html @@ -78,7 +78,7 @@

-
+
@@ -91,7 +91,7 @@
-
+
@@ -104,7 +104,7 @@
-
+
@@ -117,7 +117,7 @@
-
+
@@ -132,7 +132,7 @@
-
+
@@ -147,7 +147,7 @@
-
+
@@ -162,7 +162,7 @@
-
+
@@ -171,11 +171,11 @@

Made by Dusty01

- -
+
@@ -188,7 +188,7 @@
-
+
@@ -201,7 +201,7 @@
-
+
@@ -216,7 +216,7 @@
-
+
@@ -229,7 +229,7 @@
-
+
@@ -242,7 +242,7 @@
-
+
@@ -255,7 +255,7 @@
-
+
@@ -270,7 +270,7 @@
-
+
@@ -283,7 +283,7 @@
-
+
@@ -296,20 +296,20 @@
-
+
-

Made by gnusBlocks

+

Made by DisignusBlocks

-
+
@@ -322,7 +322,7 @@
-
+
@@ -335,7 +335,7 @@
-
+
@@ -348,7 +348,7 @@
-
+
@@ -361,7 +361,7 @@
-
+
@@ -374,7 +374,7 @@
-
+
@@ -387,7 +387,7 @@
-
+
@@ -400,7 +400,7 @@
-
+
@@ -413,7 +413,7 @@
-
+
@@ -426,6 +426,9 @@
+
+ +
@@ -437,7 +440,7 @@
From db158c958503325ec35293a06c851b7f6ac64cfa Mon Sep 17 00:00:00 2001 From: XenVoltz <55408693+XenVoltz@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:26:36 -0700 Subject: [PATCH 2/2] Update builders.js Removed some comments --- masterbuilders/assets/js/builders.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/masterbuilders/assets/js/builders.js b/masterbuilders/assets/js/builders.js index b29e531..c26e767 100644 --- a/masterbuilders/assets/js/builders.js +++ b/masterbuilders/assets/js/builders.js @@ -23,12 +23,12 @@ $(document).ready(function() { }); $(function(){ - $(".build").slice(0, 6).show(); // select the first ten - $("#load").click(function(e){ // click event for load more + $(".build").slice(0, 6).show(); + $("#load").click(function(e){ e.preventDefault(); - $("div:hidden").slice(0, 6).show(); // select next 10 hidden divs and show them - if($("div:hidden").length == 0){ // check if any hidden divs still exist + $("div:hidden").slice(0, 6).show(); + if($("div:hidden").length == 0){ $("#load").hide(); } }); -}); \ No newline at end of file +});