File tree Expand file tree Collapse file tree 3 files changed +30
-18
lines changed Expand file tree Collapse file tree 3 files changed +30
-18
lines changed Original file line number Diff line number Diff line change @@ -540,28 +540,36 @@ div#displayEditor {
540
540
541
541
/* Gallery */
542
542
543
+ #galleryContainer {
544
+ min-height : 100% ;
545
+ position : relative ;
546
+ }
547
+
543
548
#galleryView {
544
549
margin : 12px auto 0 auto ;
545
550
}
546
551
547
552
.galleryImage {
548
553
float : left ;
549
- width : 240 px ;
550
- height : 192 px ;
554
+ width : 250 px ;
555
+ height : 200 px ;
551
556
margin-bottom : 12px ;
552
557
}
553
558
554
559
#galleryControls {
555
560
width : 100% ;
556
561
text-align : center ;
557
- margin -bottom : 12 px ;
562
+ padding -bottom : 28 px ;
558
563
}
559
564
560
565
#galleryFooter {
561
- clear : both ;
562
- text-align : center ;
563
566
width : 100% ;
567
+ height : 20px ;
564
568
color : #fff ;
569
+ position : absolute ;
570
+ bottom : 0 ;
571
+ left : 0 ;
572
+ text-align : center ;
565
573
}
566
574
567
575
/* Hints Preview */
Original file line number Diff line number Diff line change 4
4
class: gallery
5
5
---
6
6
7
- {% include header.html %}
8
-
9
7
< script id ="template " type ="text/html ">
10
8
{ % raw % }
11
9
< div class = "galleryImage" >
12
- < a href = "{{link}}" > < img src = "{{image}}" width = "240 " height = "192 " /> </ a >
10
+ < a href = "{{link}}" > < img src = "{{image}}" width = "250 " height = "200 " /> </ a >
13
11
</ div >
14
12
{ % endraw % }
15
13
</ script >
16
14
17
- < div id ="galleryView ">
15
+ < div id ="galleryContainer ">
18
16
17
+ {% include header.html %}
19
18
20
- </ div >
19
+ < div id =" galleryView " > </ div >
21
20
22
- < div id ="galleryControls ">
23
- < button id ="loadMore " class ="btn btn-default "> Load More</ button >
24
- </ div >
21
+ < div id ="galleryControls ">
22
+ < button id ="loadMore " class ="btn btn-default " data-loading-text ="Loading... ">
23
+ < span class ="glyphicon glyphicon-plus "> </ span > Load More
24
+ </ button >
25
+ </ div >
25
26
26
- < footer id ="galleryFooter ">
27
- Processing Hour of Code // Computer Science Education Week // Code.org
28
- </ footer >
27
+ < footer id ="galleryFooter ">
28
+ Processing Hour of Code // Computer Science Education Week // Code.org
29
+ </ footer >
30
+
31
+ </ div >
29
32
30
33
< script src ="//www.parsecdn.com/js/parse-1.3.1.min.js "> </ script >
31
34
< script src ="/js/vendor/mustache.min.js " type ="text/javascript "> </ script >
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ var helloGallery = {
36
36
query . count ( {
37
37
success : function ( number ) {
38
38
helloGallery . totalItems = number ;
39
- console . log ( helloGallery . totalItems ) ;
40
39
} ,
41
40
error : function ( error ) {
42
41
// error is an instance of Parse.Error.
@@ -63,6 +62,8 @@ var helloGallery = {
63
62
64
63
loadElements : function ( callback ) {
65
64
65
+ $ ( "#loadMore" ) . button ( 'loading' ) ;
66
+
66
67
var GalleryObject = Parse . Object . extend ( "Gallery" ) ;
67
68
var query = new Parse . Query ( GalleryObject ) ;
68
69
query . limit ( helloGallery . itemsPerPage ) ;
@@ -94,7 +95,7 @@ var helloGallery = {
94
95
95
96
helloGallery . pageNumber ++ ;
96
97
97
- console . log ( helloGallery . pageNumber * helloGallery . itemsPerPage ) ;
98
+ $ ( "#loadMore" ) . button ( 'reset' ) ;
98
99
99
100
if ( helloGallery . totalItems != null && helloGallery . pageNumber * helloGallery . itemsPerPage >= helloGallery . totalItems ) {
100
101
$ ( "#loadMore" ) . hide ( ) ;
You can’t perform that action at this time.
0 commit comments