diff --git a/css/dashboard.css b/css/dashboard.css index 53b3670f..876b0054 100644 --- a/css/dashboard.css +++ b/css/dashboard.css @@ -74,4 +74,8 @@ body { .bg-theme-dark { background-color: var(--bs-gray-800); +} + +.card-body { + overflow-wrap: break-word !important; } \ No newline at end of file diff --git a/js/card.mjs b/js/card.mjs index 039a6727..62e97843 100644 --- a/js/card.mjs +++ b/js/card.mjs @@ -106,7 +106,7 @@ export const card = (() => { ${comment.created_at}
-

${convertMarkdownToHTML(util.escapeHtml(comment.comment))}

`; +

${convertMarkdownToHTML(util.escapeHtml(comment.comment))}

`; }; const renderContent = (comment, is_parent = true) => { diff --git a/js/user.mjs b/js/user.mjs index ac970cb3..91709586 100644 --- a/js/user.mjs +++ b/js/user.mjs @@ -28,10 +28,10 @@ export const user = (() => { const getStatUser = () => { request(HTTP_GET, '/api/stats').token(token.get('token')).then((res) => { - document.getElementById('count-comment').innerHTML = res.data.comments; - document.getElementById('count-like').innerHTML = res.data.likes; - document.getElementById('count-present').innerHTML = res.data.present; - document.getElementById('count-absent').innerHTML = res.data.absent; + document.getElementById('count-comment').innerHTML = res.data.comments.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); + document.getElementById('count-like').innerHTML = res.data.likes.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); + document.getElementById('count-present').innerHTML = res.data.present.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); + document.getElementById('count-absent').innerHTML = res.data.absent.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); }); };