diff --git a/src/client/app.js b/src/client/app.js index 804be8ab..fb3e7656 100644 --- a/src/client/app.js +++ b/src/client/app.js @@ -5,6 +5,7 @@ import Document from './components/Document'; import Award from './components/Award'; import GalleryItem from './components/GalleryItem'; +import TeamMemberProfile from './components/TeamMemberProfile'; import api from './api/api'; var deps = [ @@ -84,7 +85,6 @@ app.run(function ($location, $rootScope, $http) { api, require("./services/io"), require("./directives/mainMenu"), - require("./directives/teamMemberProfile"), require("./directives/backgroundPicture"), require("./ui/menu"), require("./ui/breadcrumbs"), @@ -103,6 +103,7 @@ app.run(function ($location, $rootScope, $http) { Document, Award, GalleryItem, + TeamMemberProfile, function (app) { app.controller("SchedulePageController", function ($scope) { $scope.pageClass = "page-schedule"; diff --git a/src/client/components/TeamMemberProfile.js b/src/client/components/TeamMemberProfile.js new file mode 100644 index 00000000..829c6242 --- /dev/null +++ b/src/client/components/TeamMemberProfile.js @@ -0,0 +1,10 @@ +import template from '../../templates/components/team-member-profile.html'; + +export default function (app) { + app.component('teamMemberProfile', { + bindings: { + member: '=' + }, + template: template + }); +}; diff --git a/src/client/directives/teamMemberProfile.js b/src/client/directives/teamMemberProfile.js deleted file mode 100644 index 13e36fda..00000000 --- a/src/client/directives/teamMemberProfile.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (app) { - app.directive('teamMemberProfile', function (menu) { - return { - restrict: 'E', - templateUrl: '/views/team/profile.html', - scope: { - person: '=profile' - }, - link: function(scope, element){ - } - } - }); -}; \ No newline at end of file diff --git a/src/style/components/team-member-proifile.scss b/src/style/components/team-member-proifile.scss new file mode 100644 index 00000000..045828d9 --- /dev/null +++ b/src/style/components/team-member-proifile.scss @@ -0,0 +1,31 @@ +.team-member-profile { + width: 80%; + margin: 0 auto 3em; + display: flex; + justify-content: center; + flex-wrap: wrap; +} + +.team-member-profile__picture { + width: 20%; + max-width: 15em; + min-width: 12em; + margin: 0 1em; + + img { + width: 100%; + } +} + +.team-member-profile__info { + width: 60%; + margin: 0 1em; + + h3 { + font-weight: 200; + + span { + font-weight: 600; + } + } +} \ No newline at end of file diff --git a/src/style/style.scss b/src/style/style.scss index 9ebafb1b..81d38d89 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -1,2 +1,3 @@ @import "./components/gallery-item"; -@import "./components/document"; \ No newline at end of file +@import "./components/document"; +@import "./components/team-member-proifile"; \ No newline at end of file diff --git a/src/style/team.scss b/src/style/team.scss index 1347f999..523b277f 100644 --- a/src/style/team.scss +++ b/src/style/team.scss @@ -6,43 +6,4 @@ &.ng-enter { animation: slideInRight 0.3s both ease-in; } -} - -.team-block { - background-color: white; - width: 100%; - padding-top: 3em; - - .team-member { - width: 80%; - margin: 0 auto 3em; - display: flex; - justify-content: center; - flex-wrap: wrap; - } - - - .team-member__picture { - width: 20%; - max-width: 15em; - min-width: 12em; - margin: 0 1em; - } - - .team-member__picture img { - width: 100%; - } - - .team-member__info { - width: 60%; - margin: 0 1em; - - h3 { - font-weight: 200; - - span { - font-weight: 600; - } - } - } } \ No newline at end of file diff --git a/src/templates/components/team-member-profile.html b/src/templates/components/team-member-profile.html new file mode 100644 index 00000000..90343638 --- /dev/null +++ b/src/templates/components/team-member-profile.html @@ -0,0 +1,18 @@ +
+ + +
+ +
+ +
+

{{$ctrl.member.names[1]}} {{$ctrl.member.names[2]}} {{$ctrl.member.names[3]}}

+ +

{{$ctrl.member.position}}

+

{{$ctrl.member.status}}

+

+ +

{{$ctrl.member.edu}}

+

Диплом {{$ctrl.member.diploma}}

+
+
\ No newline at end of file diff --git a/src/templates/views/team.html b/src/templates/views/team.html index 66d92737..fddbf464 100644 --- a/src/templates/views/team.html +++ b/src/templates/views/team.html @@ -1,5 +1,5 @@ -
- +
+
\ No newline at end of file diff --git a/src/templates/views/team/profile.html b/src/templates/views/team/profile.html deleted file mode 100644 index bdb9f382..00000000 --- a/src/templates/views/team/profile.html +++ /dev/null @@ -1,18 +0,0 @@ -
- - -
- -
- -
-

{{person.names[1]}} {{person.names[2]}} {{person.names[3]}}

- -

{{person.position}}

-

{{person.status}}

-

- -

{{person.edu}}

-

Диплом {{person.diploma}}

-
-
\ No newline at end of file