Bruce responsive enhancement

This commit is contained in:
Liang Ding 2015-02-25 10:45:04 +08:00
parent 4f9c481851
commit 02ea3734ce
2 changed files with 30 additions and 27 deletions

View File

@ -1,5 +1,6 @@
<#macro comments commentList article>
<div class="row" id="comments">
<div class="col-sm-12">
<#list commentList as comment>
<div class="row comment" id="${comment.oId}">
<img class="col-sm-1" title="${comment.commentName}"
@ -26,11 +27,12 @@
</div>
</div>
</#list>
</div>
</div>
<#if article.commentable>
<div class="row cmtForm">
<table id="commentForm">
<table id="commentForm" class="col-sm-12">
<tbody>
<#if !isLoggedIn>
<tr>
@ -70,7 +72,7 @@
</tr>
<tr>
<td colspan="2">
<textarea rows="10" cols="72" id="comment"></textarea>
<textarea rows="10" style="width: 100%;" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
@ -117,7 +119,7 @@
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
});
var addComment = function(result, state) {
var addComment = function (result, state) {
var commentHTML = '<div class="row comment" id="' + result.oId + '"><img class="col-sm-1" \
title="' + result.userName + '" alt="' + result.userName +
'" src="' + result.commentThumbnailURL
@ -144,16 +146,16 @@
return commentHTML;
};
var replyTo = function(id) {
var replyTo = function (id) {
var commentFormHTML = "<table class='cmtReplyForm' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
$("#replyForm label").each(function() {
$("#replyForm label").each(function () {
$this = $(this);
$this.attr("for", $this.attr("for") + "Reply");
});
};
$(document).ready(function() {
$(document).ready(function () {
page.load();
// emotions
page.replaceCommentsEm("#comments");

View File

@ -7,6 +7,7 @@
<meta name="copyright" content="B3log" />
<meta name="owner" content="B3log Team" />
<meta name="revised" content="${blogTitle?html}, ${year}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/bootstrap${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/${skinDirName}${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />