source files -> src/ folder

This commit is contained in:
tmshv committed 2016-01-09 17:26:44 +03:00
1 parent f006207112
commit d25f4439fa
144 files changed

No files matched your search

@@ -0,0 +1,26 @@
module.exports = function (app) {
app.directive('backgroundPicture', function () {
return {
restrict: 'E',
template: '<div class="background-picture" />',
scope: {
src: '='
},
link: function($scope, $element){
var element = $element.find('.background-picture').get(0);
element.style.backgroundImage = `url('${$scope.src}')`;
setTimeout(function () {
var w = element.offsetWidth;
var h = element.offsetHeight;
if (w > h) {
element.classList.add('horizontal');
} else {
element.classList.add('vertical');
}
}, 100);
}
}
});
};
+24
View File
@@ -0,0 +1,24 @@
module.exports = function (app) {
app.directive('mainMenu', function (menu) {
return {
restrict: 'E',
templateUrl: '/views/menu.html',
scope: {
menu: '=items'
},
link: function(scope, element){
scope.isActive = function (item) {
if (menu.current) {
return item.url == menu.current.url;
} else {
return false;
}
};
scope.isValid = function (item) {
return 'url' in item;
};
}
}
});
};
@@ -0,0 +1,13 @@
module.exports = function (app) {
app.directive('teamMemberProfile', function (menu) {
return {
restrict: 'E',
templateUrl: '/views/team/profile.html',
scope: {
person: '=profile'
},
link: function(scope, element){
}
}
});
};