You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

85 lines
1.9 KiB
CoffeeScript

#Controllers
#
@projectsCtrl = ($scope)->
$scope.carousels =
uman: [
'/img/uman1.png',
'/img/uman2.png'
]
$scope.selectedItem = 'simplifield'
$scope.select = (item)->
if $scope.selectedItem is item
$scope.selectedItem = undefined
else
$scope.selectedItem = item
projectsCtrl.$inject = ['$scope']
@dockCtrl = ($scope, $location, $window)->
$scope.icons = [
class: 'profil'
icon: 'fa-user'
link: '/freelance'
text: 'What I Do'
,
class: 'projects'
icon: 'fa-laptop'
link: '/projects'
text: 'My work'
,
class: 'contact'
icon: 'fa-phone'
link: '/contact'
text: 'Get in touch'
,
class: 'blog'
icon: 'fa-book'
link: '/blog'
text: 'Ideas'
,
]
# $scope.hovered = false
# $scope.hoverText = ($index)->
# $scope.hovered = true
# $scope.hoveredIndex = $index
# $scope.hoverOut = ()->
# $scope.hovered = false
# $scope.hoveredIndex = null
$scope.selected = null
defaultSelected = ()->
for icon in $scope.icons
if $location.path() is icon.link
$scope.selected = $scope.icons.indexOf icon
defaultSelected()
$scope.switch = ($index)->
if $index is 3
$window.location.hash = ''
$window.location.pathname = '/blog'
return
if $scope.selected is $index
$location.path('/')
$scope.selected = null
else
$scope.selected = $index
$location.path($scope.icons[$index].link)
dockCtrl.$inject = ['$scope', '$location', '$window']
window.MyCtrl1 = ()->
MyCtrl1.$inject = []
window.MyCtrl2 = ()->
MyCtrl2.$inject = []