Skip to content

Commit f6d03f4

Browse files
committed
Slider header: done (dots, arrow, parrallax...)
1 parent 709d459 commit f6d03f4

6 files changed

Lines changed: 231 additions & 108 deletions

File tree

‎img/snapsvg.svg‎

Lines changed: 37 additions & 0 deletions
Loading

‎index.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@
4343
<div class="large-4 columns text-header" ng-bind-html-unsafe="featured.textHeader"></div>
4444

4545
<div class="large-5 large-offset-1 columns">
46-
<img class="logo original" id="logo1" src="{{featured.logo}}" title="{{featured.title}}" />
46+
<img class="logo logoFeatured original" src="{{featured.logo}}" title="{{featured.title}}" />
4747
</div>
4848
</div>
4949
</div>
5050

51+
<div class="dots">
52+
<div class="dot" ng-repeat="featured in featureds" ng-class="{actual: $index == indexFeatured}" ng-click="setIndexFeatured($index)"></div>
53+
</div>
54+
5155
<div class="prev" ng-click="changeIndexFeatured(-1)"></div>
5256
<div class="next" ng-click="changeIndexFeatured(+1)"></div>
5357
</div>

‎js/script.js‎

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ this.GitHubCtrl = function($scope, $filter, ReposAdobe, OrgsAdobe, FeaturedHeade
205205
$scope.indexFeatured += delta;
206206
}
207207
}
208+
209+
$scope.setIndexFeatured = function(index) {
210+
$scope.indexFeatured = index;
211+
}
208212

209213
//Init display range
210214
$scope.projFirst = 0;
@@ -345,62 +349,17 @@ this.OfflineCtrl = function($scope, $filter, GitAdobe, OrgsAdobe) {
345349
var scrollTop, topLogo_footer, topLogo_org, topLogo_header;
346350
$(function(){
347351
$(document).foundation();
348-
$(document).foundation('orbit', {
349-
animation: 'fade',
350-
timer_speed: 10000,
351-
pause_on_hover: true,
352-
resume_on_mouseout: false,
353-
animation_speed: 500,
354-
stack_on_small: true,
355-
navigation_arrows: false,
356-
slide_number: false,
357-
container_class: 'orbit-container',
358-
stack_on_small_class: 'orbit-stack-on-small',
359-
next_class: 'orbit-next',
360-
prev_class: 'orbit-prev',
361-
timer_container_class: 'orbit-timer',
362-
timer_paused_class: 'paused',
363-
timer_progress_class: 'orbit-progress',
364-
slides_container_class: 'orbit-slides-container',
365-
bullets_container_class: 'orbit-bullets',
366-
bullets_active_class: 'active',
367-
slide_number_class: 'orbit-slide-number',
368-
caption_class: 'orbit-caption',
369-
active_slide_class: 'active',
370-
orbit_transition_class: 'orbit-transitioning',
371-
bullets: true,
372-
timer: false,
373-
variable_height: false,
374-
before_slide_change: function(){},
375-
after_slide_change: function(){}
376-
});
377352

378353

379354
$(window).scroll(function () {
380355
scrollTop = $(window).scrollTop();
381356

382-
/* / ----------------------------------------------------------------------------
383-
// Logo animation
384-
var baseH = 100;
385-
var adobeLogoLimit = $(".header").height() - 150;
386-
if ( scrollTop > adobeLogoLimit ) {
387-
if ( (scrollTop - adobeLogoLimit) <= 50 ) {
388-
newHeight = baseH - (scrollTop - adobeLogoLimit)
389-
$(".wrapLogoTop").css({height: newHeight });
390-
} else {
391-
$(".wrapLogoTop").css({height: baseH-50 });
392-
};
393-
}
394-
else if (scrollTop < adobeLogoLimit) {
395-
$(".wrapLogoTop").css({height: baseH });
396-
}*/
397-
398357
// ----------------------------------------------------------------------------
399358
// First parallax: header
400359
if (scrollTop < ($(".header").height() + 20) ) {
401360
topLogo_header = ( $(window).scrollTop()/3 ) - 70;
402-
$("#logo1").css({ top: topLogo_header });
403-
$("#text-header").css({ top: - scrollTop });
361+
$(".logoFeatured").css({ top: topLogo_header });
362+
$(".text-header").css({ bottom: 45 + scrollTop });
404363
}
405364

406365
// ----------------------------------------------------------------------------

‎offline/featured.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,14 @@
1717
"PhoneGap is a distribution of <a href='http://cordova.apache.org/'>Apache Cordova</a><br/>",
1818
"<a href='https://github.com/phonegap/'>View on GitHub ></a></p>"
1919
]
20+
},
21+
{
22+
"title": "Snap.svg",
23+
"logo": "img/snapsvg.svg",
24+
"textHeader": [
25+
"<h3>Snap.svg</h3>",
26+
"<p class='details'>The JavaScript SVG library for the modern web.<br/>",
27+
"<a href='http://snapsvg.io/'>Learn more...</a></p>"
28+
]
2029
}
2130
]

0 commit comments

Comments
 (0)