Use Bootstrap media objects for posts
This commit is contained in:
parent
b40d5362cf
commit
bd73214219
12 changed files with 135 additions and 160 deletions
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
|
|
||||||
/* core */
|
/* core */
|
||||||
@import 'media-box';
|
|
||||||
@import 'entypo';
|
@import 'entypo';
|
||||||
@import 'icons';
|
@import 'icons';
|
||||||
@import 'mentions';
|
@import 'mentions';
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
.comment_stream {
|
.comment_stream {
|
||||||
.show_comments {
|
.show_comments {
|
||||||
margin-top: 5px;
|
|
||||||
border-top: 1px solid $border-grey;
|
border-top: 1px solid $border-grey;
|
||||||
|
padding: 10px;
|
||||||
a {
|
a {
|
||||||
color: $text-grey;
|
color: $text-grey;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.media { margin-top: 10px; }
|
|
||||||
}
|
}
|
||||||
.comments > .comment, .comment.new_comment_form_wrapper {
|
.comments > .comment, .comment.new_comment_form_wrapper {
|
||||||
.avatar {
|
.avatar {
|
||||||
|
|
@ -34,11 +33,9 @@
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
width: 95%;
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.comment_box {
|
.comment_box {
|
||||||
width: 95%;
|
|
||||||
height: 35px;
|
height: 35px;
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
.media { margin: 10px; }
|
|
||||||
|
|
||||||
.media,
|
|
||||||
.bd {
|
|
||||||
overflow: hidden;
|
|
||||||
_overflow: visible;
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.media .img {
|
|
||||||
float: left;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.media .img img { display: block }
|
|
||||||
.media .imgEt { float: right; margin-left: 10px; }
|
|
||||||
|
|
||||||
|
|
@ -19,9 +19,6 @@
|
||||||
line-height: $font-size-base;
|
line-height: $font-size-base;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bd {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.near-from {
|
.near-from {
|
||||||
color: $text-grey;
|
color: $text-grey;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#main_stream .stream_element,
|
#main_stream .stream_element,
|
||||||
#main_stream > div > .photo {
|
#main_stream > div > .photo {
|
||||||
& > .media {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
&.deleting {
|
&.deleting {
|
||||||
> .media { opacity: 0.3; }
|
> .media { opacity: 0.3; }
|
||||||
.control-icons { display: none !important; }
|
.control-icons { display: none !important; }
|
||||||
|
|
@ -11,49 +8,44 @@
|
||||||
|
|
||||||
#main_stream > div > .photo {
|
#main_stream > div > .photo {
|
||||||
& > .media {
|
& > .media {
|
||||||
overflow: visible;
|
background: $white;
|
||||||
> .bd {
|
box-shadow: $card-shadow;
|
||||||
position: relative;
|
margin: 0 0 15px;
|
||||||
overflow: inherit;
|
padding: 10px;
|
||||||
> .control-icons {
|
> .control-icons {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 6px;
|
right: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
}
|
}
|
||||||
}
|
&:hover > .control-icons { background: $white; }
|
||||||
&:hover > .bd > .control-icons { background: $white; }
|
|
||||||
}
|
}
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
padding: 10px;
|
border: none;
|
||||||
margin: 0 0 15px;
|
|
||||||
background: $white;
|
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: $card-shadow;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
img.big_photo { max-height: 200px; }
|
img.big_photo { max-height: 200px; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#main_stream .stream_element {
|
#main_stream .stream_element {
|
||||||
padding: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
border: 1px solid $light-grey;
|
border: 1px solid $light-grey;
|
||||||
box-shadow: $card-shadow;
|
box-shadow: $card-shadow;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
& > .media {
|
& > .media {
|
||||||
&.shield-active .nsfw-hidden { display: none; }
|
&.shield-active .nsfw-hidden { display: none; }
|
||||||
&:not(.shield-active) .nsfw-shield { display: none; }
|
&:not(.shield-active) .nsfw-shield { display: none; }
|
||||||
&:not(.shield-off) .nsfw-off { display: none; }
|
&:not(.shield-off) .nsfw-off { display: none; }
|
||||||
& > .img > .avatar {
|
> .media-object .avatar.small {
|
||||||
margin-top: 5px;
|
|
||||||
&.small {
|
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.author-name {
|
.author-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
|
@ -66,10 +58,10 @@
|
||||||
line-height: $font-size-small;
|
line-height: $font-size-small;
|
||||||
}
|
}
|
||||||
.likes {
|
.likes {
|
||||||
margin-top: 10px;
|
margin: 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
.author-name, .bd { display: inline-block; }
|
.author-name { display: inline-block; }
|
||||||
.author-name { margin-right: 3px; }
|
.author-name { margin-right: 3px; }
|
||||||
.entypo-heart {
|
.entypo-heart {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -78,6 +70,7 @@
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
.media-left { padding-right: 0; }
|
||||||
}
|
}
|
||||||
.stream_photo {
|
.stream_photo {
|
||||||
float: left;
|
float: left;
|
||||||
|
|
@ -103,10 +96,10 @@
|
||||||
|
|
||||||
div.reshare {
|
div.reshare {
|
||||||
border-left: 2px solid $border-grey;
|
border-left: 2px solid $border-grey;
|
||||||
margin-top: 3px;
|
padding-left: 10px;
|
||||||
|
|
||||||
& > .media .avatar {
|
& > .media .avatar {
|
||||||
margin-top: 5px;
|
margin-top: 3px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,15 @@
|
||||||
|
|
||||||
{{#if loggedIn}}
|
{{#if loggedIn}}
|
||||||
<div class="comment media new_comment_form_wrapper {{#unless commentsCount}} hidden {{/unless}}">
|
<div class="comment media new_comment_form_wrapper {{#unless commentsCount}} hidden {{/unless}}">
|
||||||
|
<div class="media-object media-left">
|
||||||
{{#with current_user}}
|
{{#with current_user}}
|
||||||
<a href="/people/{{guid}}" class="img">
|
<a href="/people/{{guid}}">
|
||||||
{{{personImage this}}}
|
{{{personImage this}}}
|
||||||
</a>
|
</a>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="bd">
|
<div class="media-body">
|
||||||
<form accept-charset="UTF-8" action="/posts/{{id}}/comments" class="new_comment" id="new_comment_on_{{id}}" method="post">
|
<form accept-charset="UTF-8" action="/posts/{{id}}/comments" class="new_comment" id="new_comment_on_{{id}}" method="post">
|
||||||
<textarea class="comment_box form-control" id="comment_text_on_{{id}}" name="text" rows="1" required placeholder="{{t "stream.comment"}}" />
|
<textarea class="comment_box form-control" id="comment_text_on_{{id}}" name="text" rows="1" required placeholder="{{t "stream.comment"}}" />
|
||||||
<div class="submit_button">
|
<div class="submit_button">
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<div id="{{guid}}">
|
<div id="{{guid}}" class="media">
|
||||||
<div class="img">
|
<div class="media-object media-left">
|
||||||
{{#linkToAuthor author}}
|
{{#linkToAuthor author}}
|
||||||
{{{personImage this "small" "small"}}}
|
{{{personImage this "small" "small"}}}
|
||||||
{{/linkToAuthor}}
|
{{/linkToAuthor}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bd">
|
<div class="media-body">
|
||||||
<div class="control-icons">
|
<div class="control-icons">
|
||||||
{{#if loggedIn}}
|
{{#if loggedIn}}
|
||||||
{{#if canRemove}}
|
{{#if canRemove}}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
{{#if likesCount}}
|
{{#if likesCount}}
|
||||||
<div class="comment">
|
|
||||||
<div class="media">
|
<div class="media">
|
||||||
|
<div class="media-object media-left">
|
||||||
<i class="entypo-heart"></i>
|
<i class="entypo-heart"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="bd">
|
<div class="media-body">
|
||||||
{{#unless likes_fetched}}
|
{{#unless likes_fetched}}
|
||||||
<a href="#" class="expand_likes grey">
|
<a href="#" class="expand_likes grey">
|
||||||
{{t "stream.likes" count=likesCount}}
|
{{t "stream.likes" count=likesCount}}
|
||||||
|
|
@ -19,5 +20,4 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div class="bd">
|
|
||||||
{{#if loggedIn}}
|
{{#if loggedIn}}
|
||||||
<div class="control-icons">
|
<div class="control-icons">
|
||||||
{{#if authorIsCurrentUser}}
|
{{#if authorIsCurrentUser}}
|
||||||
|
|
@ -25,5 +24,4 @@
|
||||||
<img src="{{sizes.large}}" class="photo big_photo">
|
<img src="{{sizes.large}}" class="photo big_photo">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
||||||
<div class="media">
|
<div class="media">
|
||||||
{{#if root}}
|
{{#if root}}
|
||||||
{{#with root}}
|
{{#with root}}
|
||||||
<a href="/people/{{author.guid}}" class="img {{{hovercardable this}}}">
|
<div class="media-object media-left">
|
||||||
|
<a href="/people/{{author.guid}}" class="{{{hovercardable this}}}">
|
||||||
{{{personImage author 'small'}}}
|
{{{personImage author 'small'}}}
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="bd">
|
<div class="media-body">
|
||||||
<div>
|
<div>
|
||||||
{{#linkToAuthor author}}
|
{{#linkToAuthor author}}
|
||||||
{{name}}
|
{{name}}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="post-info" class="col-md-8">
|
<div id="post-info" class="col-md-8">
|
||||||
<div class="img pull-left">
|
<div class="media">
|
||||||
|
<div class="media-object media-left">
|
||||||
{{#if root}}
|
{{#if root}}
|
||||||
{{#linkToAuthor root.author}}
|
{{#linkToAuthor root.author}}
|
||||||
{{{personImage this "medium"}}}
|
{{{personImage this "medium"}}}
|
||||||
|
|
@ -14,7 +15,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bd">
|
<div class="media-body">
|
||||||
<span class="author">
|
<span class="author">
|
||||||
{{#if root}}
|
{{#if root}}
|
||||||
{{#linkToAuthor root.author}}
|
{{#linkToAuthor root.author}}
|
||||||
|
|
@ -63,6 +64,7 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{#unless root}}
|
{{#unless root}}
|
||||||
<div id="single-post-actions" class="col-md-4" />
|
<div id="single-post-actions" class="col-md-4" />
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
<div class="media {{#if showPost}} {{#if nsfw}} shield-off {{/if}} {{else}} shield-active {{/if}}">
|
<div class="media {{#if showPost}} {{#if nsfw}} shield-off {{/if}} {{else}} shield-active {{/if}}">
|
||||||
|
<div class="media-object media-left">
|
||||||
{{#with author}}
|
{{#with author}}
|
||||||
<a href="/people/{{guid}}" class="img {{{hovercardable this}}}">
|
<a href="/people/{{guid}}" class="{{{hovercardable this}}}">
|
||||||
{{{personImage this}}}
|
{{{personImage this}}}
|
||||||
</a>
|
</a>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="bd">
|
<div class="media-body">
|
||||||
{{#if loggedIn}}
|
{{#if loggedIn}}
|
||||||
<div class="control-icons">
|
<div class="control-icons">
|
||||||
{{#if authorIsCurrentUser}}
|
{{#if authorIsCurrentUser}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue