diff --git a/src/client/components/TeacherProfile.js b/src/client/components/TeacherProfile.js index 09d35eef..9d5f2bc5 100644 --- a/src/client/components/TeacherProfile.js +++ b/src/client/components/TeacherProfile.js @@ -8,12 +8,15 @@ export default function (app) { }, template: template, controller: function($sce){ - let [first, middle, last] = splitName(this.member.name); + const [_, first, middle, last] = splitName(this.member.name); this.firstName = first; this.middleName = middle; this.lastName = last; - if (this.member.picture) this.image = this.member.picture.big.url; + if(this.member.picture){ + this.image = this.member.picture.big; + } + this.biography = $sce.trustAsHtml(this.member.biography); } }); diff --git a/src/style/components/teacher-proifile.scss b/src/style/components/teacher-proifile.scss index 227a65b2..4e4a0737 100644 --- a/src/style/components/teacher-proifile.scss +++ b/src/style/components/teacher-proifile.scss @@ -1,33 +1,49 @@ @import "../variables"; +$picture-width: 30%; +$info-width: 100% - $picture-width; + .teacher-profile { margin: 0 auto $double-margin; display: flex; - justify-content: center; + justify-content: space-between; flex-wrap: wrap; -} -.teacher-profile__picture { - width: 20%; - max-width: 15em; - min-width: 12em; - margin: 0 1em; + &__picture { + width: $picture-width; + max-width: 15em; + min-width: 12em; - img { - width: 100%; - } -} - -.teacher-profile__info { - width: 60%; - margin: 0 1em; - - h3 { - font-weight: 200; - - span { - font-weight: 600; + img { + width: 100%; } } -} \ No newline at end of file + + &__info { + width: $info-width; + + padding-left: $single-margin; + box-sizing: border-box; + + h3 { + font-weight: 200; + + strong { + font-weight: 600; + } + } + + .info { + margin-bottom: $single-margin; + } + + .biography { + margin-top: $single-margin; + + p{ + margin-bottom: $single-margin; + } + } + } +} diff --git a/src/templates/components/teacher-profile.html b/src/templates/components/teacher-profile.html index 65eec310..940e244c 100644 --- a/src/templates/components/teacher-profile.html +++ b/src/templates/components/teacher-profile.html @@ -1,20 +1,18 @@
{{$ctrl.member.position}}
-{{$ctrl.member.status}}
- +{{$ctrl.member.position}}
+{{$ctrl.member.status}}
+Образование: {{$ctrl.member.edu}}
+Диплом: {{$ctrl.member.diploma}}
+{{$ctrl.member.edu}}
-Диплом {{$ctrl.member.diploma}}
- - +