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.

87 lines
2.1 KiB
JavaScript

// Generated by CoffeeScript 1.8.0
(function() {
this.projectsCtrl = function($scope) {
$scope.carousels = {
uman: ['/img/uman1.png', '/img/uman2.png']
};
$scope.selectedItem = 'simplifield';
return $scope.select = function(item) {
if ($scope.selectedItem === item) {
return $scope.selectedItem = void 0;
} else {
return $scope.selectedItem = item;
}
};
};
projectsCtrl.$inject = ['$scope'];
this.dockCtrl = function($scope, $location, $window) {
var defaultSelected;
$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.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 ($index === 3) {
$window.location.hash = '';
$window.location.pathname = '/blog';
return;
}
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'];
window.MyCtrl1 = function() {};
MyCtrl1.$inject = [];
window.MyCtrl2 = function() {};
MyCtrl2.$inject = [];
}).call(this);