@@ -131,34 +131,6 @@ $(document).ready(function(){
131
131
$ ( ".heroText .starCount" ) . text ( totalStars ) ;
132
132
$ ( ".heroText .forkCount" ) . text ( totalForks ) ;
133
133
134
- //====================================//
135
- // Get community projects from a parse class
136
- //====================================//
137
- //add new repo to the HTML
138
- function addCommunityRepoToHTML ( title , description , url ) {
139
- $ ( "section.community" ) . append ( "<div class='repo'><div class='repoTitle'><h4>" + title + "</h4></div><div class='repoDescription'><p>" + description + "</p></div><div class='repoButton'><a href=" + url + " target='_blank'><button class='outline'>View on GitHub</button></a></div></div>" ) ;
140
- }
141
-
142
- //write this into the page
143
- var communityRepos = Parse . Object . extend ( "CommunityRepos" ) ;
144
- var query = new Parse . Query ( communityRepos ) ;
145
- query . ascending ( "repoName" ) ;
146
- query . find ( {
147
- success : function ( results ) {
148
- // Do something with the returned Parse.Object values
149
- for ( var i = 0 ; i < results . length ; i ++ ) {
150
- var object = results [ i ] ;
151
- var title = object . get ( 'repoName' ) ;
152
- var description = object . get ( 'repoDescription' ) ;
153
- var url = object . get ( 'repoURL' ) ;
154
- addCommunityRepoToHTML ( title , description , url ) ;
155
- }
156
- } ,
157
- error : function ( error ) {
158
- console . log ( "Error: " + error . code + " " + error . message ) ;
159
- }
160
- } ) ;
161
-
162
134
//====================================//
163
135
// expand/contract
164
136
//====================================//
@@ -442,4 +414,32 @@ $(document).ready(function(){
442
414
} } ) ;
443
415
}
444
416
} ) ;
417
+
418
+ //====================================//
419
+ // Get community projects from a parse class
420
+ //====================================//
421
+ //add new repo to the HTML
422
+ function addCommunityRepoToHTML ( title , description , url ) {
423
+ $ ( "section.community" ) . append ( "<div class='repo'><div class='repoTitle'><h4>" + title + "</h4></div><div class='repoDescription'><p>" + description + "</p></div><div class='repoButton'><a href=" + url + " target='_blank'><button class='outline'>View on GitHub</button></a></div></div>" ) ;
424
+ }
425
+
426
+ //write this into the page
427
+ var communityRepos = Parse . Object . extend ( "CommunityRepos" ) ;
428
+ var query = new Parse . Query ( communityRepos ) ;
429
+ query . ascending ( "repoName" ) ;
430
+ query . find ( {
431
+ success : function ( results ) {
432
+ // Do something with the returned Parse.Object values
433
+ for ( var i = 0 ; i < results . length ; i ++ ) {
434
+ var object = results [ i ] ;
435
+ var title = object . get ( 'repoName' ) ;
436
+ var description = object . get ( 'repoDescription' ) ;
437
+ var url = object . get ( 'repoURL' ) ;
438
+ addCommunityRepoToHTML ( title , description , url ) ;
439
+ }
440
+ } ,
441
+ error : function ( error ) {
442
+ console . log ( "Error: " + error . code + " " + error . message ) ;
443
+ }
444
+ } ) ;
445
445
} ) ;
0 commit comments