Minor view improvements and removing extra dom closing tags from views

This commit is contained in:
Nathan Leniz
2015-03-07 21:33:04 +09:00
parent 485bbcc3a9
commit 585544e1fd
4 changed files with 49 additions and 51 deletions

View File

@ -171,6 +171,10 @@ ul {
.responsive-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; }
.responsive-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.positive-5 {
margin-top: 5px;
}
.negative-45 {
margin-top: -45px;
margin-bottom: -45px;

View File

@ -26,15 +26,6 @@
$(div)
.html(
"<div class='comment row col-xs-12'>" +
"<div class='col-xs-1 text-center'>" +
"<div class='row'>" +
"<div class='col-xs-12'>" +
"<h3 class='negative-5'>" +
commentDetails.rank +
"</h3>" +
"</div>" +
"</div>" +
"</div>" +
"<div class='col-xs-1'>" +
"<img class='img-responsive' src=" + commentDetails.author.picture + "></img>" +
"</div>" +
@ -59,6 +50,7 @@
"</h6>" +
"</div>" +
"</div>" +
"</div>" +
"</div>"
)
.addClass(offSetClass + ' row ' + rowClass + ' comment_' + commentDetails._id)

View File

@ -19,7 +19,7 @@ h3
$(li).html("<div class='row text-left'>" +
"<div class='col-xs-3 col-sm-1'>" +
"<div class='story-up-votes'>" +
"<div class='positive-5'>" +
"<span>" + rank + "</span>" +
"</div>" +
"</div>" +

View File

@ -17,9 +17,11 @@ h3
var linkedName = getLinkedName(data[i].storyLink);
var rank = data[i].rank;
$(li).html("<div class='row text-left'>" +
$(li)
.html(
"<div class='row text-left'>" +
"<div class='col-xs-3 col-sm-1'>" +
"<div class='story-up-votes'>" +
"<div class='positive-5'>" +
"<span>" + rank + "</span>" +
"</div>" +
"</div>" +
@ -37,11 +39,11 @@ h3
"<span>Posted " +
moment(data[i].timePosted).fromNow() +
" by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " +
"</span" +
"</div>" +
"</div>" +
"</div>" +
"</div>" +
"</li>");
"</div>"
)
$(li).appendTo($('#story-list'));
}
});