Use bootstrap styles for markdown tables.

This commit is contained in:
Jan Böhmer 2019-10-12 19:03:50 +02:00
parent b478170d7f
commit c814bae3af
2 changed files with 3 additions and 26 deletions

View file

@ -766,31 +766,6 @@ table.dataTable {
border-radius: 4px; border-radius: 4px;
} }
.markdown table {
border-width: 1px 0 0 1px;
border-color: #bbb;
border-style: solid;
width: 100%;
margin-bottom: 1rem;
color: #212529;
}
.markdown table td, .markdown table th {
border-width: 0 1px 1px 0;
border-color: #bbb;
border-style: solid;
padding: 10px;
}
.markdown table tbody tr:hover {
color: #212529;
background-color: rgba(0, 0, 0, 0.075);
}
.markdown table tbody tr:nth-of-type(odd) {
background-color: rgba(0, 0, 0, 0.05);
}
.markdown img { .markdown img {
max-width: 35%; max-width: 35%;
vertical-align: middle; vertical-align: middle;

View file

@ -393,7 +393,7 @@ $(document).on("ajaxUI:start", function () {
var txt = document.createElement('textarea'); var txt = document.createElement('textarea');
txt.innerHTML = html; txt.innerHTML = html;
return txt.value; return txt.value;
}; }
function parseMarkdown() { function parseMarkdown() {
$('.markdown').each(function() { $('.markdown').each(function() {
@ -406,6 +406,8 @@ $(document).on("ajaxUI:start", function () {
//Make all links external //Make all links external
$('a', this).addClass('link-external').attr('target', '_blank'); $('a', this).addClass('link-external').attr('target', '_blank');
//Bootstrapify objects
$('table', this).addClass('table table-hover table-striped table-bordered');
}); });
} }