[www] PersonCard update

This commit is contained in:
Roman Timashev committed 2017-10-24 17:27:04 +03:00
1 parent f723724613
commit d1897487a7
6 files changed
+121 -87

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
.PersonCard {
display: flex;
flex-direction: column;
margin: var(--single-margin) 0;
width: 30%;
min-width: 15em;
max-width: 30em;
//border: 1px solid #ccc;
//border-radius: 3px;
& > a {
display: block;
position: relative;
height: 100%;
}
}
.PersonCard-Picture {
border-radius: 3px;
width: 100%;
height: 24em;
img {
width: 100%;
height: 24em;
object-fit: cover;
}
}
.PersonCard-Title, .PersonCard-Body {
position: absolute;
width: 100%;
padding: 10px;
box-sizing: border-box;
color: white;
text-align: center;
text-shadow: 0 0 3px #000;
border-radius: 3px;
}
.PersonCard-Title {
top: 0;
}
.PersonCard-Body {
bottom: 0;
}
//Animation
.PersonCard-Picture {
overflow: hidden;
img {
transition: transform 150ms ease-out;
}
}
.PersonCard {
&:hover {
img {
transform: scale(1.05);
}
}
}
+7
View File
@@ -0,0 +1,7 @@
.PersonCardList {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
-49
View File
@@ -1,49 +0,0 @@
@import "../variables";
$picture-width: 30%;
$info-width: 100% - $picture-width;
.TeacherCard {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
&-Picture {
margin-bottom: var(--double-margin);
width: $picture-width;
max-width: 15em;
min-width: 12em;
img {
width: 100%;
}
}
&-Info {
width: $info-width;
padding-left: var(--double-margin);
margin-bottom: var(--double-margin);
box-sizing: border-box;
}
&-Position {
font-size: $bigger-font-size;
}
}
@media (max-width: $mobile-width) {
.TeacherCard {
margin: 0 auto var(--double-margin);
&-Picture {
width: 100%;
max-width: $mobile-width;
}
&-Info {
width: 100%;
padding-left: 0;
}
}
}