feat(forums): fixed markdown rendered table css style

This commit is contained in:
OldHawk
2017-07-09 20:21:19 +08:00
parent 6596055ae3
commit bc13571a96
5 changed files with 39 additions and 2 deletions

View File

@@ -75,7 +75,7 @@
return '<a ng-click="vm.markLinkClick($event, item);" href="' + href + '"' + (title ? ' title="' + title + '"' : '') + ' target="_blank">' + text + '</a>';
},
table: function (header, body) {
return '<table class="table table-hover table-bordered table-condensed margin-bottom-10"><thead>' + header + '</thead><tbody>' + body + '</tbody></table>';
return '<table class="table table-hover table-bordered table-condensed md-table margin-bottom-10"><thead>' + header + '</thead><tbody>' + body + '</tbody></table>';
}
});
}

View File

@@ -0,0 +1,34 @@
@import (reference) "mt-var.less";
.md-table {
border-radius: 5px;
width: auto;
border-spacing: 0 !important;
border-collapse: collapse !important;
border: solid 1px #e5e5e5 !important;
thead {
background-color: #e5e5e5 !important;
border: solid 1px #e5e5e5 !important;
color: #333 !important;
tr {
th {
border: solid 1px #e5e5e5 !important;
padding: 5px 10px !important;
}
}
}
tbody {
tr {
td {
border-top: none !important;
white-space: normal !important;
border-bottom: solid 1px #e5e5e5 !important;
}
}
tr:last-child {
td {
border-bottom: none !important;
}
}
}
}

View File

@@ -26,6 +26,7 @@
*/
vm.init = function () {
ForumsService.query({}, function (items) {
console.log(items);
vm.forums = items;
});
};

View File

@@ -409,6 +409,6 @@ blockquote {
}
em {
color: lighten(@brand-primary, 30%);
color: lighten(@brand-primary, 10%);
font-size: 12px;
}

View File

@@ -192,6 +192,8 @@ exports.postNewReply = function (req, res) {
topic._replies.push(reply);
topic.replyCount++;
topic.lastReplyAt = Date.now();
topic.lastUser = req.user;
topic.save(function (err) {
if (err) {