Revert "Use Bootstrap media objects for posts"

This reverts commit bd73214219.
This commit is contained in:
Steffen van Bergerem 2015-09-24 19:36:38 +02:00
parent be67415269
commit 18c3f298c6
12 changed files with 160 additions and 135 deletions

View file

@ -6,6 +6,7 @@
/* core */
@import 'media-box';
@import 'entypo';
@import 'icons';
@import 'mentions';

View file

@ -1,11 +1,12 @@
.comment_stream {
.show_comments {
margin-top: 5px;
border-top: 1px solid $border-grey;
padding: 10px;
a {
color: $text-grey;
font-size: 13px;
}
.media { margin-top: 10px; }
}
.comments > .comment, .comment.new_comment_form_wrapper {
.avatar {
@ -33,9 +34,11 @@
float: right;
}
padding-left: 12px;
width: 95%;
display: none;
}
.comment_box {
width: 95%;
height: 35px;
resize: none;
}

View file

@ -0,0 +1,17 @@
.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; }

View file

@ -19,6 +19,9 @@
line-height: $font-size-base;
}
}
.bd {
padding-left: 10px;
}
}
.near-from {
color: $text-grey;

View file

@ -1,5 +1,8 @@
#main_stream .stream_element,
#main_stream > div > .photo {
& > .media {
margin: 0px;
}
&.deleting {
> .media { opacity: 0.3; }
.control-icons { display: none !important; }
@ -8,44 +11,49 @@
#main_stream > div > .photo {
& > .media {
background: $white;
box-shadow: $card-shadow;
margin: 0 0 15px;
padding: 10px;
overflow: visible;
> .bd {
position: relative;
overflow: inherit;
> .control-icons {
border-radius: 4px;
padding-left: 5px;
position: absolute;
right: 20px;
right: 6px;
text-align: center;
top: 1px;
}
&:hover > .control-icons { background: $white; }
}
&:hover > .bd > .control-icons { background: $white; }
}
.thumbnail {
border: none;
padding: 10px;
margin: 0 0 15px;
background: $white;
border-radius: 0;
margin: 0;
padding: 0;
box-shadow: $card-shadow;
img.big_photo { max-height: 200px; }
}
}
#main_stream .stream_element {
padding: 10px;
margin-bottom: 20px;
background-color: $white;
border: 1px solid $light-grey;
box-shadow: $card-shadow;
margin-bottom: 20px;
padding: 10px;
& > .media {
&.shield-active .nsfw-hidden { display: none; }
&:not(.shield-active) .nsfw-shield { display: none; }
&:not(.shield-off) .nsfw-off { display: none; }
> .media-object .avatar.small {
& > .img > .avatar {
margin-top: 5px;
&.small {
height: 50px;
width: 50px;
}
}
.author-name {
font-weight: bold;
margin-bottom: 4px;
@ -58,10 +66,10 @@
line-height: $font-size-small;
}
.likes {
margin: 10px;
margin-top: 10px;
font-size: 12px;
line-height: 16px;
.author-name { display: inline-block; }
.author-name, .bd { display: inline-block; }
.author-name { margin-right: 3px; }
.entypo-heart {
display: inline-block;
@ -70,7 +78,6 @@
margin-top: -2px;
margin-right: 5px;
}
.media-left { padding-right: 0; }
}
.stream_photo {
float: left;
@ -96,10 +103,10 @@
div.reshare {
border-left: 2px solid $border-grey;
padding-left: 10px;
margin-top: 3px;
& > .media .avatar {
margin-top: 3px;
margin-top: 5px;
height: 30px;
width: 30px;
}

View file

@ -12,15 +12,13 @@
{{#if loggedIn}}
<div class="comment media new_comment_form_wrapper {{#unless commentsCount}} hidden {{/unless}}">
<div class="media-object media-left">
{{#with current_user}}
<a href="/people/{{guid}}">
<a href="/people/{{guid}}" class="img">
{{{personImage this}}}
</a>
{{/with}}
</div>
<div class="media-body">
<div class="bd">
<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"}}" />
<div class="submit_button">

View file

@ -1,11 +1,11 @@
<div id="{{guid}}" class="media">
<div class="media-object media-left">
<div id="{{guid}}">
<div class="img">
{{#linkToAuthor author}}
{{{personImage this "small" "small"}}}
{{/linkToAuthor}}
</div>
<div class="media-body">
<div class="bd">
<div class="control-icons">
{{#if loggedIn}}
{{#if canRemove}}

View file

@ -1,10 +1,9 @@
{{#if likesCount}}
<div class="comment">
<div class="media">
<div class="media-object media-left">
<i class="entypo-heart"></i>
</div>
<div class="media-body">
<div class="bd">
{{#unless likes_fetched}}
<a href="#" class="expand_likes grey">
{{t "stream.likes" count=likesCount}}
@ -20,4 +19,5 @@
{{/unless}}
</div>
</div>
</div>
{{/if}}

View file

@ -1,4 +1,5 @@
<div class="media">
<div class="bd">
{{#if loggedIn}}
<div class="control-icons">
{{#if authorIsCurrentUser}}
@ -24,4 +25,5 @@
<img src="{{sizes.large}}" class="photo big_photo">
</a>
</div>
</div>
</div>

View file

@ -2,13 +2,11 @@
<div class="media">
{{#if root}}
{{#with root}}
<div class="media-object media-left">
<a href="/people/{{author.guid}}" class="{{{hovercardable this}}}">
<a href="/people/{{author.guid}}" class="img {{{hovercardable this}}}">
{{{personImage author 'small'}}}
</a>
</div>
<div class="media-body">
<div class="bd">
<div>
{{#linkToAuthor author}}
{{name}}

View file

@ -2,8 +2,7 @@
<div class="col-md-12">
<div class="row">
<div id="post-info" class="col-md-8">
<div class="media">
<div class="media-object media-left">
<div class="img pull-left">
{{#if root}}
{{#linkToAuthor root.author}}
{{{personImage this "medium"}}}
@ -15,7 +14,7 @@
{{/if}}
</div>
<div class="media-body">
<div class="bd">
<span class="author">
{{#if root}}
{{#linkToAuthor root.author}}
@ -64,7 +63,6 @@
{{/unless}}
</div>
</div>
</div>
{{#unless root}}
<div id="single-post-actions" class="col-md-4" />
{{/unless}}

View file

@ -1,13 +1,11 @@
<div class="media {{#if showPost}} {{#if nsfw}} shield-off {{/if}} {{else}} shield-active {{/if}}">
<div class="media-object media-left">
{{#with author}}
<a href="/people/{{guid}}" class="{{{hovercardable this}}}">
<a href="/people/{{guid}}" class="img {{{hovercardable this}}}">
{{{personImage this}}}
</a>
{{/with}}
</div>
<div class="media-body">
<div class="bd">
{{#if loggedIn}}
<div class="control-icons">
{{#if authorIsCurrentUser}}