teacher profile component update
This commit is contained in:
1 parent
35d6278aa4
commit
27f09669fe
3 files changed
+46
-29
No files matched your search
@@ -8,12 +8,15 @@ export default function (app) {
|
|||||||
},
|
},
|
||||||
template: template,
|
template: template,
|
||||||
controller: function($sce){
|
controller: function($sce){
|
||||||
let [first, middle, last] = splitName(this.member.name);
|
const [_, first, middle, last] = splitName(this.member.name);
|
||||||
this.firstName = first;
|
this.firstName = first;
|
||||||
this.middleName = middle;
|
this.middleName = middle;
|
||||||
this.lastName = last;
|
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);
|
this.biography = $sce.trustAsHtml(this.member.biography);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,33 +1,49 @@
|
|||||||
@import "../variables";
|
@import "../variables";
|
||||||
|
|
||||||
|
$picture-width: 30%;
|
||||||
|
$info-width: 100% - $picture-width;
|
||||||
|
|
||||||
.teacher-profile {
|
.teacher-profile {
|
||||||
margin: 0 auto $double-margin;
|
margin: 0 auto $double-margin;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
|
||||||
|
|
||||||
.teacher-profile__picture {
|
&__picture {
|
||||||
width: 20%;
|
width: $picture-width;
|
||||||
max-width: 15em;
|
max-width: 15em;
|
||||||
min-width: 12em;
|
min-width: 12em;
|
||||||
margin: 0 1em;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.teacher-profile__info {
|
&__info {
|
||||||
width: 60%;
|
width: $info-width;
|
||||||
margin: 0 1em;
|
|
||||||
|
|
||||||
h3 {
|
padding-left: $single-margin;
|
||||||
font-weight: 200;
|
box-sizing: border-box;
|
||||||
|
|
||||||
span {
|
h3 {
|
||||||
font-weight: 600;
|
font-weight: 200;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-bottom: $single-margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.biography {
|
||||||
|
margin-top: $single-margin;
|
||||||
|
|
||||||
|
p{
|
||||||
|
margin-bottom: $single-margin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,18 @@
|
|||||||
<div class="teacher-profile">
|
<div class="teacher-profile">
|
||||||
<a name="{{$ctrl.member.anchor}}"></a>
|
|
||||||
|
|
||||||
<div class="teacher-profile__picture">
|
<div class="teacher-profile__picture">
|
||||||
<img ng-src="{{$ctrl.image }}">
|
<img ng-src="{{$ctrl.image.url}}" >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="teacher-profile__info">
|
<div class="teacher-profile__info">
|
||||||
<h3>{{$ctrl.firstName}} {{$ctrl.middleName}} <strong>{{$ctrl.lastName}}</strong></h3>
|
<h3>{{$ctrl.firstName}} {{$ctrl.middleName}} <strong>{{$ctrl.lastName}}</strong></h3>
|
||||||
|
|
||||||
<p>{{$ctrl.member.position}}</p>
|
<div class="info">
|
||||||
<p>{{$ctrl.member.status}}</p>
|
<p><strong>{{$ctrl.member.position}}</strong></p>
|
||||||
<p></p>
|
<p>{{$ctrl.member.status}}</p>
|
||||||
|
<p>Образование: {{$ctrl.member.edu}}</p>
|
||||||
|
<p>Диплом: {{$ctrl.member.diploma}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="edu">{{$ctrl.member.edu}} </p>
|
<div class="biography" ng-bind-html="$ctrl.biography"></div>
|
||||||
<p class="diploma">Диплом {{$ctrl.member.diploma}}</p>
|
|
||||||
|
|
||||||
<div ng-bind-html="$ctrl.biography"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user