public-health-ch/publichealth/static/css/modules/_news.scss

112 lines
1.9 KiB
SCSS
Raw Normal View History

2017-01-16 11:21:38 +00:00
// News overview
2017-01-12 15:08:45 +00:00
#news {
2017-01-16 14:46:05 +00:00
2017-01-12 15:08:45 +00:00
.panel-default {
font-size: 90%;
2017-02-06 13:35:58 +00:00
padding-top: 75%; /* 1:1 Aspect Ratio */
position: relative; /* If you want text inside of it */
overflow: hidden;
background: lighten($brand-primary, 10%);
2017-01-16 14:46:05 +00:00
2017-02-06 13:35:58 +00:00
img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
2017-01-16 14:46:05 +00:00
}
.panel-body {
2017-02-06 13:35:58 +00:00
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 0;
transform: translateY(60%);
background-color: rgba($brand-primary, .8);
transition: transform .65s;
h3, p {
color: white;
}
h3 {
padding: 15px;
font-size: 1.2em;
margin: 0;
height: 40%;
display: table;
span {
display: table-cell;
vertical-align: bottom;
}
}
p, a {
font-size: .8em;
}
p {
padding: 0 15px;
line-height: 1.2;
margin: 0;
}
2017-01-16 14:46:05 +00:00
a {
2017-02-06 13:35:58 +00:00
margin: 10px 0 0 15px;
text-align: center;
2017-01-16 14:46:05 +00:00
}
}
2017-02-06 13:35:58 +00:00
&:hover .panel-body {
transform: rotateY(0);
2017-01-16 14:46:05 +00:00
}
2017-02-06 13:35:58 +00:00
// expand link over the thumbnail
2017-01-16 14:46:05 +00:00
a.fill {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
2017-02-06 13:35:58 +00:00
font-size: 0;
2017-01-12 15:08:45 +00:00
}
}
}
2017-01-16 11:21:38 +00:00
// News detail article
#news-details {
2017-01-16 14:46:05 +00:00
background: white;
2017-03-07 22:37:55 +00:00
padding-top: 0;
2017-01-16 11:21:38 +00:00
.category {
margin-top: 2em;
display: inline-block;
text-transform: uppercase;
font-size: 80%;
letter-spacing: 2px;
2017-01-16 14:46:05 +00:00
span {
border-bottom: 1px solid $text-color;
}
2017-01-16 11:21:38 +00:00
}
.date {
color: lighten($text-color, 20%);
font-size: 90%;
text-transform: uppercase;
margin-bottom: .5em;
}
hr {
margin-left: 0;
width: 100px;
}
.author {
color: lighten($text-color, 20%);
font-size: 90%;
text-transform: uppercase;
font-style: italic;
}
.backlink {
2017-01-16 14:46:05 +00:00
margin-top: 3em;
2017-01-16 11:21:38 +00:00
}
}