1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

hiding comment author on mobile

This commit is contained in:
Fedor Katurov 2019-10-15 17:58:14 +07:00
parent fe90fc16ac
commit 6bb24fc869
2 changed files with 10 additions and 1 deletions

View file

@ -23,6 +23,13 @@
.text { .text {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
@include tablet {
:global(.comment-author) {
display: none !important;
color: red;
}
}
} }
.thumb { .thumb {

View file

@ -77,7 +77,9 @@ export const formatCommentText = (author, text: string) =>
.replace(/:\|--\|/gim, '://') .replace(/:\|--\|/gim, '://')
.split('\n') .split('\n')
.map((el, index) => .map((el, index) =>
index === 0 ? `${author ? `<p><b>${author}</b>: ` : ''}${el}</p>` : `<p>${el}</p>` index === 0
? `${author ? `<p><b class="comment-author">${author}: </b>` : ''}${el}</p>`
: `<p>${el}</p>`
) )
.join(''); .join('');
// .replace(/\/\*(\*(?!\/)|[^*])*\*\//igm, ''); // .replace(/\/\*(\*(?!\/)|[^*])*\*\//igm, '');