Fixes markdown formatting issues

Closes #266
This commit is contained in:
Jake Potrebic 2020-12-18 19:20:54 -08:00
parent 6c1061c836
commit 88b960be9f
No known key found for this signature in database
GPG Key ID: 7C58557EC9C421F8
9 changed files with 100 additions and 96 deletions

View File

@ -226,13 +226,6 @@ export default {
}
}
.page-rendered,
.page-edit textarea {
min-height: 350px;
margin-bottom: 20px;
width: 100%;
}
.page-edit textarea {
resize: vertical;
}
@ -296,84 +289,4 @@ button.open:hover {
.button-hide-leave-to {
transform: translateX(34px);
}
.page-rendered {
@include basic-border();
@include box-shadow4(0, 1px, 1px, rgba(0, 0, 0, 0.05));
padding: 10px 20px 20px 20px;
overflow: hidden;
background-color: white;
max-width: 100%;
table tr > th {
padding: 5px;
}
table tr:nth-child(2n) {
background-color: #f5f5f5;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
}
img {
max-width: 100%;
}
table tr > td,
.page-rendered table tr > th {
padding: 10px;
@include basic-border();
}
code {
background-color: #f5f5f5;
color: black;
}
a code {
color: #337ab7;
&:hover {
text-decoration: underline;
}
}
h1,
h2 {
border-bottom: 1px solid $lighter;
padding-bottom: 5px;
}
.headeranchor {
display: none;
text-decoration: none;
}
h1:hover,
h2:hover,
h3:hover {
.headeranchor {
display: inline-block;
font-size: 16px;
margin-left: -18px;
width: 18px;
}
}
h4:hover,
h5:hover,
h6:hover {
.headeranchor {
display: inline-block;
font-size: 12px;
margin-left: -12px;
width: 12px;
}
}
}
</style>

View File

@ -0,0 +1,88 @@
@import '../scss/utils';
.page-rendered {
@include basic-border();
@include box-shadow4(0, 1px, 1px, rgba(0, 0, 0, 0.05));
padding: 10px 20px 20px 20px;
overflow: hidden;
background-color: white;
max-width: 100%;
table tr > th {
padding: 5px;
}
table tr:nth-child(2n) {
background-color: #f5f5f5;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
}
img {
max-width: 100%;
}
table tr > td,
.page-rendered table tr > th {
padding: 10px;
@include basic-border();
}
code {
background-color: #f5f5f5;
color: black;
}
a code {
color: #337ab7;
&:hover {
text-decoration: underline;
}
}
h1,
h2 {
border-bottom: 1px solid $lighter;
padding-bottom: 5px;
}
.headeranchor {
display: none;
text-decoration: none;
}
h1:hover,
h2:hover,
h3:hover {
.headeranchor {
display: inline-block;
font-size: 16px;
margin-left: -18px;
width: 18px;
}
}
h4:hover,
h5:hover,
h6:hover {
.headeranchor {
display: inline-block;
font-size: 12px;
margin-left: -12px;
width: 12px;
}
}
}
.page-rendered,
.page-edit textarea {
min-height: 350px;
margin-bottom: 20px;
width: 100%;
}

View File

@ -11,6 +11,7 @@
@import 'project';
@import 'user';
@import "card";
@import "markdown";
@import 'utils';
@import "list";
@import "dropdowns";

View File

@ -49,7 +49,7 @@
<tr>
<td class="note-fixed-with">${utils.prettifyDateTime(note.toDateTime())}</td>
<td class="note-fixed-with"><strong>${note.getUser()!"Unknown"}</strong></td>
<td>${markdownService.render(note.getMessage())}</td>
<td><#outputformat "plainText">${markdownService.render(note.getMessage())}</#outputformat></td>
</tr>
</#list>
</tbody>

View File

@ -39,7 +39,7 @@
<tr>
<td>${entry.visibility}</td>
<td>${utils.prettifyDateTime(entry.createdAt)}</td>
<td>${markdownService.render(entry.comment)}</td>
<td><#outputformat "plainText">${markdownService.render(entry.comment)}</#outputformat></td>
<#if createdBy??>
<td>${createdBy}</td>
<#else>

View File

@ -171,7 +171,9 @@
</#if>
<div class="col-md-12" style="z-index: 5">
<div id="version-view">
<div class="page-preview page-rendered">${markdownService.render(v.v.getDescription())}</div>
<div class="page-preview page-rendered">
<#outputformat "plainText">${markdownService.render(v.v.getDescription())}</#outputformat>
</div>
</div>
</div>
</div>

View File

@ -115,8 +115,8 @@
<textarea style="display: none" data-newstate="${offset + action?index}">${action.newState}</textarea>
</td>
<#else>
<td>${action.oldState?has_content?string(action.oldState, "<i>none</i>")}</td>
<td>${action.newState?has_content?string(action.newState, "<i>none</i>")}</td>
<td><#outputformat "plainText">${action.oldState?has_content?string(action.oldState, "<i>none</i>")}</#outputformat></td>
<td><#outputformat "plainText">${action.newState?has_content?string(action.newState, "<i>none</i>")}</#outputformat></td>
</#if>
</tr>
</#list>

View File

@ -117,7 +117,7 @@
<#if !review.messages?filter(m -> m.takeover)?has_content>
<i>- no message provided -</i>
<#else>
<i>${markdownService.render(review.messages?filter(m -> m.takeover)?first.message)}</i>
<i><#outputformat "plainText">${markdownService.render(review.messages?filter(m -> m.takeover)?first.message)}</#outputformat></i>
</#if>
</td>
</tr>
@ -143,7 +143,7 @@
<#if !review.messages?filter(m -> m.stop)?has_content>
<i>- no message provided -</i>
<#else>
<i>${markdownService.render(review.messages?filter(m -> m.stop)?first.message)}</i>
<i><#outputformat "plainText">${markdownService.render(review.messages?filter(m -> m.stop)?first.message)}</#outputformat></i>
</#if>
</td>
</tr>
@ -158,7 +158,7 @@
<strong>${review.userName!"Unknown"}</strong>
added message
<br>
<i>${markdownService.render(message.message)}</i>
<i><#outputformat "plainText">${markdownService.render(message.message)}</#outputformat></i>
</td>
</tr>
</#list>

View File

@ -24,7 +24,7 @@
</span>
<p>
<strong>Request:</strong>
${markdownService.render(project.comment)}
<#outputformat "plainText">${markdownService.render(project.comment)}</#outputformat>
</p>
</div>
<div class="col-12 col-md-4">