Vulcan/packages/telescope-theme-hubble/lib/client/scss/modules/_posts.scss

549 lines
8.6 KiB
SCSS
Raw Normal View History

2015-01-20 10:37:24 +09:00
// ------------------------------------ posts ------------------------------------ //
.posts-wrapper{
padding: 0;
margin-bottom: 20px;
}
2015-01-20 10:37:24 +09:00
.single-post .posts{
margin-bottom: 10px;
.post{
border-radius: 3px;
@extend .has-shadow;
2014-07-07 09:36:19 +09:00
}
2014-07-05 11:24:28 +09:00
}
2015-01-20 10:37:24 +09:00
// ------------------------------------ post ------------------------------------ //
.post{
padding: 10px 0px 10px 10px;
border-radius: 0px;
margin-bottom: 0px;
border-bottom:1px solid $lightest-grey;
display: flex;
2015-01-20 10:37:24 +09:00
align-items: center;
position:relative;
width:100%;
background: white;
&:first-child{
border-radius: 3px 3px 0px 0px;
2014-12-13 17:43:52 +09:00
}
2015-01-20 10:37:24 +09:00
&:last-child{
border-radius: 0px 0px 3px 3px;
2014-12-13 17:43:52 +09:00
}
2015-01-20 10:37:24 +09:00
&.animate{
transition: ease-out, top, 400ms, 0ms;
}
2015-01-20 10:37:24 +09:00
&.inactive{
.post-content{
background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVQYV2NkIALMnDlTkpGQOpCi9PT053gVwhSBDMOpEFkRToXoirAqxKYIQyEuRSgK8SmCKySkCKyQGEUghQC5OyXvW/4BHwAAAABJRU5ErkJggg==');
2014-12-13 17:43:52 +09:00
}
}
2015-01-20 10:37:24 +09:00
.post-share{
display: none;
}
2015-01-20 10:37:24 +09:00
&.show-actions{
.post-content{
display: none;
}
.post-share, .post-discuss, .post-upvote{
display: block;
}
}
}
2015-01-20 10:37:24 +09:00
// ------------------------------ posts-list layout ------------------------------ //
.posts-list{
2014-12-13 17:43:52 +09:00
.post-module{
flex-shrink: 0;
flex-grow: 0;
margin-right: 10px;
}
.post-rank{
@include small{
display: none;
}
.post-rank-inner{
height: 25px;
position: relative;
}
span{
position:absolute;
top:0px;
left:-60px;
display:block;
height:25px;
line-height:25px;
width:30px;
text-align:right;
font-size:18px;
// font-weight:bold;
color:black(0.2);
}
2014-07-07 09:06:32 +09:00
}
2014-12-13 17:43:52 +09:00
.post-upvote{
order: 1;
2014-12-16 13:34:01 +09:00
@include small{
display: none;
}
2014-07-07 09:06:32 +09:00
}
2014-12-13 17:43:52 +09:00
.post-content{
order: 2;
2014-07-07 09:36:19 +09:00
width: 100%;
// can shrink on mobile or desktop
flex-shrink: 1;
@include medium-large{
2014-12-14 12:43:52 +09:00
// but can only grow on desktop
flex-grow: 1;
2014-12-14 12:43:52 +09:00
// only be a flex container on desktop
display: flex;
}
2014-12-13 17:43:52 +09:00
align-items: center;
2014-07-04 14:07:50 +09:00
}
2014-12-13 17:43:52 +09:00
.post-info{
flex-grow: 1;
}
.post-share{
order: 3;
}
.post-discuss{
2014-12-16 14:18:32 +09:00
order: 7;
2015-01-20 10:37:24 +09:00
padding-top: 6px;
}
.post-share, .post-discuss{
2014-12-16 14:18:32 +09:00
// width: 60px;
2014-12-13 17:43:52 +09:00
text-align: center;
2014-12-16 14:18:32 +09:00
// height: 60px;
// position: relative;
// top: -5px;
}
.post-actions{
2014-12-16 14:18:32 +09:00
order: 8;
}
2014-12-16 13:34:01 +09:00
.post-avatars{
order: 6
}
&.show-actions{
.post-share, .post-discuss, .post-upvote{
flex-grow: 1;
}
}
}
2015-01-20 10:37:24 +09:00
// ------------------------------ posts-grid layout ------------------------------ //
2015-01-20 10:37:24 +09:00
.posts-grid{
display: flex;
flex-wrap: wrap;
2015-01-20 10:37:24 +09:00
.post{
width: calc((100% - 20px)/3);
margin-right: 10px;
margin-bottom: 10px;
display: block;
padding: 0;
position: relative;
padding-bottom: 40px;
&:nth-of-type(3n){
margin-right: 0;
}
&:after{
content: " ";
display: block;
position: absolute;
bottom: 40px;
left: 0px;
width: 100%;
border-bottom: 1px solid $lightest-grey;
}
}
2015-01-20 10:37:24 +09:00
.post-rank{
span{
position: absolute;
top: 0px;
right: 0px;
z-index: 1;
background: black(0.4);
color: white;
height: 24px;
width: 24px;
line-height: 24px;
vertical-align: middle;
text-align: center;
font-size: 14px;
// border-radius: 100%;
// box-shadow: 0px 0px 2px white(0.5);
}
}
2015-01-20 10:37:24 +09:00
.post-upvote{
position: absolute;
left: 3px;
bottom: 3px;
}
2015-01-20 10:37:24 +09:00
.post-content{
display: block;
}
2015-01-20 10:37:24 +09:00
.post-thumbnail{
margin-right: 0px;
a{
width: 100%;
}
}
2015-01-20 10:37:24 +09:00
.post-info{
padding: 10px;
}
.no-thumbnail .post-info{
padding-right: 35px;
}
.post-avatars{
position: absolute;
right: 48px;
bottom: 0px;
padding: 8px 0px;
}
.post-discuss{
position: absolute;
right: 8px;
bottom: 0px;
padding: 8px 0px 2px 0px;
}
}
2015-01-20 10:37:24 +09:00
// -------------------------------- post modules --------------------------------- //
.post-module.post-rank{
margin: 0;
}
.post-upvote{
.upvote-link{
position: relative;
// top: 17px;
// transform: translateY(-50%);
display: block;
text-align: center;
i{
2015-01-04 12:51:18 +09:00
opacity: 0.4;
display: inline-block;
border-radius: 50%;
2014-12-16 13:34:01 +09:00
border: 1px solid rgba($red, 0.3);
font-size:10px;
width: 24px;
height: 24px;
text-align:center;
// line-height:$grid-unit;
color:rgba($red, 0.8);
text-shadow:0px 1px 0px white;
2014-12-16 13:52:23 +09:00
line-height: 2.3;
2014-12-16 14:18:32 +09:00
margin: 5px;
&:before{
top: 0px;
}
&.icon-check{
display:none;
}
}
.action-label{
display:none;
@include small{
display: block;
}
}
&.not-voted:hover{
i{
2015-01-04 12:51:18 +09:00
opacity: 1;
text-shadow:none;
}
}
&.voted{
cursor:default;
i.icon-up{
display:none;
}
i.icon-check{
2014-12-16 13:34:01 +09:00
border: 1px solid rgba($blue, 0.6);
2014-12-14 13:23:07 +09:00
display: inline-block;
color:rgba($blue, 0.8);
opacity: 0.5;
}
}
}
}
2012-08-25 11:20:17 +09:00
.post-content{
min-height: $grid-unit - 30px;
2012-10-02 10:54:04 +09:00
.post-sticky{
display: block;
position: absolute;
right: -40px;
top: 16px;
font-size: 24px;
2012-10-02 10:54:04 +09:00
i{
color: $light-text;
2012-10-02 10:54:04 +09:00
}
span{
display: none;
2012-10-02 10:54:04 +09:00
}
}
2014-07-04 11:32:04 +09:00
}
2015-01-20 10:37:24 +09:00
.post-avatars{
display: inline-block;
display: flex;
@include small{
display: none;
}
.author-avatar{
display: block;
}
.post-commenters{
display: block;
border-left: 1px solid black(0.2);
padding-left: 5px;
}
.avatar-link{
display: inline-block;
margin-right: 5px;
&:last-child{
margin-right: 0px;
}
}
.avatar{
display: inline-block;
height: 24px;
width: 24px;
vertical-align: middle;
}
}
.post-author{
.avatar{
display: inline-block;
width: 20px;
height: 20px;
vertical-align: middle;
margin-right: 5px;
}
}
.post-discuss{
.action-label{
@include medium-large{
display: none;
}
}
}
.post-actions{
display: none;
text-align: right;
@include small{
display: block;
}
a{
display: block;
width: 36px;
height: 36px;
padding: 6px;
span{
display: block;
height: 100%;
width: 100%;
border-radius: 3px;
border: 1px solid rgba($red, 0.3);
color: rgba($red, 0.8);
text-align: center;
line-height: 14px;
font-weight: bold;
font-size: 20px;
}
}
}
// -------------------------------- post content --------------------------------- //
2014-07-04 11:32:04 +09:00
.post-heading{
margin-bottom: 3px;
2014-08-27 16:43:41 +09:00
line-height: 1.2;
2014-07-04 11:32:04 +09:00
.post-title{
@include small{
font-size: 15px;
}
@include medium-large{
font-size:18px;
}
2014-07-04 11:32:04 +09:00
font-weight:normal;
&:visited{
color:$grey;
2013-02-18 12:13:27 +09:00
}
2012-08-25 11:20:17 +09:00
}
2014-07-04 11:32:04 +09:00
.post-domain{
2012-08-25 11:20:17 +09:00
color:$light-text;
@include small{
font-size: 13px;
}
@include medium-large{
font-size:14px;
}
2014-07-04 11:32:04 +09:00
font-weight:normal;
}
2014-07-05 13:32:01 +09:00
}
2014-07-04 11:32:04 +09:00
.post-meta{
2014-12-16 13:52:23 +09:00
font-size:13px;
2014-07-04 11:32:04 +09:00
color:$light-text;
line-height:1.5;
@include small{
font-size: 11px;
line-height: 1.7;
}
2014-08-28 11:09:46 +09:00
a{
2014-12-16 13:52:23 +09:00
&:link, &:visited, &:active{
2014-08-28 11:09:46 +09:00
color:$medium-text;
}
2014-12-16 13:52:23 +09:00
&:hover{
color: $red;
}
2014-08-28 11:09:46 +09:00
}
2014-07-04 11:32:04 +09:00
}
2015-01-20 10:37:24 +09:00
.post-meta-item{
display: inline-block;
2014-12-14 15:15:34 +09:00
}
2014-07-05 16:29:10 +09:00
.post-body{
2014-07-07 09:36:19 +09:00
@extend .has-shadow;
2014-07-05 16:29:10 +09:00
border-radius: 3px;
margin-bottom: 10px;
background: white;
padding:20px;
2014-07-04 14:07:50 +09:00
font-size:16px;
2012-09-08 11:54:08 +09:00
.list &{
display:none;
}
2012-08-25 11:20:17 +09:00
}
2014-07-03 10:09:22 +09:00
2012-10-09 15:34:00 +09:00
.post.sticky{
2014-07-04 11:32:04 +09:00
background:$light-yellow;
2012-10-09 16:11:30 +09:00
}
2014-07-05 16:40:00 +09:00
2015-01-20 10:37:24 +09:00
// -------------------------------- mobile view --------------------------------- //
2014-08-27 09:25:05 +09:00
@include small {
.posts{
padding:0;
.post-rank{
display:none;
}
}
.post{
.post-content{
margin-right:50px;
margin-right:0px;
// min-height:90px;
.upvote-link{
width:30px;
}
.post-info{
2014-08-12 17:11:36 +09:00
// margin-left:30px;
padding:13px 0;
}
.post-heading{
.post-title{
display:block;
margin-bottom:4px;
}
.post-domain{
display:block;
margin-bottom:4px;
font-size:13px;
}
}
.post-meta{
font-size:11px;
.unit{
font-size:0;
&:after{
font-size:12px;
content:"pts ";
}
}
}
}
}
2014-12-14 15:15:34 +09:00
}
2015-01-20 10:37:24 +09:00
// -------------------------------- other --------------------------------- //
2015-01-09 16:05:00 +09:00
.no-posts{
padding: 20px;
border: 1px solid black(0.1);
2015-01-10 11:11:55 +09:00
font-size: 14px;
2015-01-09 16:05:00 +09:00
border-radius: 3px;
// @extend .has-shadow;
margin-bottom: 10px;
2015-01-10 11:11:55 +09:00
color: black(0.5);
2015-01-20 10:37:24 +09:00
}
.empty-notice{
text-align:center;
padding:10px 0;
}
.action{
position:relative;
display:block;
padding:0;
text-align:center;
color:$light-text;
&.edit-link{
color:$red;
}
&.share-link{
color:$light-text;
}
&.discuss-link{
color:$light-text;
}
&.more-link{
color:$blue;
}
&:hover{
&, .action{
color:$red;
}
}
&.voted{
color:white;
cursor: default;
}
.points{
display:block;
font-size:30px;
line-height:50px;
}
}
.more-button{
display: block;
width:100%;
height:$grid-unit;
background:black(0.05);
text-align:center;
color:white;
line-height:$grid-unit;
font-size:18px;
border-radius: 0px 0px 3px 3px;
text-shadow: 0px 1px 1px 0px black(0.25);
padding: 0px;
&:hover{
background: black(0.15);
}
}
.module{
border-radius: 3px;
}