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

538 lines
8.5 KiB
SCSS
Raw Normal View History

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