update projects
parent
a236d3135c
commit
ae402878d1
@ -1,6 +1,11 @@
|
||||
#Controllers
|
||||
#
|
||||
@projectsCtrl = ($scope)->
|
||||
$scope.carousels =
|
||||
uman: [
|
||||
'/img/uman1.png',
|
||||
'/img/uman2.png'
|
||||
]
|
||||
|
||||
|
||||
projectsCtrl.$inject = ['$scope']
|
@ -0,0 +1,59 @@
|
||||
# Directives
|
||||
|
||||
|
||||
angular
|
||||
.module('myApp.directives', [])
|
||||
.directive('appVersion', ['version', (version)->
|
||||
(scope, elm, attrs)->
|
||||
elm.text(version)
|
||||
])
|
||||
.directive('hoverShow', ()->
|
||||
link: (scope, elm, attrs)->
|
||||
elm.bind('mouseover', {attrs: attrs}, (ev)->
|
||||
elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).show()
|
||||
)
|
||||
elm.bind('mouseout', {attrs: attrs}, (ev)->
|
||||
elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).hide()
|
||||
)
|
||||
)
|
||||
|
||||
.directive('customScroll', ()->
|
||||
link: (scope, elm, attrs)->
|
||||
$(elm).mCustomScrollbar
|
||||
theme: 'dark-2'
|
||||
)
|
||||
|
||||
.directive('carousel', ()->
|
||||
scope:
|
||||
carousel: '='
|
||||
link: (scope, elm, attrs)->
|
||||
carousel = scope.carousel
|
||||
img = elm.find('img')[0]
|
||||
cIndex = 0
|
||||
img.src = carousel[cIndex]
|
||||
|
||||
setInterval(->
|
||||
$(img).toggleClass('fadeIn fadeOut')
|
||||
|
||||
setTimeout(->
|
||||
$(img).hide()
|
||||
,
|
||||
100
|
||||
)
|
||||
|
||||
if cIndex < carousel.length - 1
|
||||
cIndex += 1
|
||||
else
|
||||
cIndex = 0
|
||||
|
||||
img.src = carousel[cIndex]
|
||||
setTimeout(->
|
||||
$(img).toggleClass('fadeOut fadeIn')
|
||||
$(img).show()
|
||||
,
|
||||
200
|
||||
)
|
||||
,
|
||||
4500
|
||||
)
|
||||
)
|
@ -1,18 +0,0 @@
|
||||
# Directives
|
||||
|
||||
|
||||
angular
|
||||
.module('myApp.directives', [])
|
||||
.directive('appVersion', ['version', (version)->
|
||||
(scope, elm, attrs)->
|
||||
elm.text(version)
|
||||
])
|
||||
.directive('hoverShow', ()->
|
||||
link: (scope, elm, attrs)->
|
||||
elm.bind('mouseover', {attrs: attrs}, (ev)->
|
||||
elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).show()
|
||||
)
|
||||
elm.bind('mouseout', {attrs: attrs}, (ev)->
|
||||
elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).hide()
|
||||
)
|
||||
)
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 810 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
After Width: | Height: | Size: 712 KiB |
@ -1,6 +1,5 @@
|
||||
// Generated by CoffeeScript 1.4.0
|
||||
// Generated by CoffeeScript 1.7.1
|
||||
(function() {
|
||||
|
||||
angular.module('myApp.services', []).value('version', '0.1');
|
||||
|
||||
}).call(this);
|
||||
|
Reference in New Issue