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.

81 lines
1.9 KiB
JavaScript

// Generated by CoffeeScript 1.4.0
(function() {
this.projectsCtrl = function($scope) {};
projectsCtrl.$inject = ['$scope'];
this.dockCtrl = function($scope, $location) {
var defaultSelected;
$scope.icons = [
{
"class": 'profil',
icon: 'icon-user',
link: '/freelance',
text: 'What I Do'
}, {
"class": 'projects',
icon: 'icon-laptop',
link: '/projects',
text: 'My work'
}, {
"class": 'blog',
icon: 'icon-book',
link: '/blog',
text: 'Ideas'
}, {
"class": 'contact',
icon: 'icon-envelope-alt',
link: '/contact',
text: 'Get in touch'
}
];
$scope.hovered = false;
$scope.hoverText = function($index) {
$scope.hovered = true;
$scope.hoveredIndex = $index;
return console.log($scope.hovered);
};
$scope.hoverOut = function() {
$scope.hovered = false;
return $scope.hoveredIndex = null;
};
$scope.selected = null;
defaultSelected = function() {
var icon, _i, _len, _ref, _results;
_ref = $scope.icons;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
icon = _ref[_i];
if ($location.path() === icon.link) {
_results.push($scope.selected = $scope.icons.indexOf(icon));
} else {
_results.push(void 0);
}
}
return _results;
};
defaultSelected();
return $scope["switch"] = function($index) {
if ($scope.selected === $index) {
$location.path('/');
return $scope.selected = null;
} else {
$scope.selected = $index;
return $location.path($scope.icons[$index].link);
}
};
};
dockCtrl.$inject = ['$scope', '$location'];
window.MyCtrl1 = function() {};
MyCtrl1.$inject = [];
window.MyCtrl2 = function() {};
MyCtrl2.$inject = [];
}).call(this);