Skip to content

Commit

Permalink
feat: improve ui ux
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Apr 9, 2024
1 parent c332254 commit 5071be7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ body {

.bg-theme-dark {
background-color: var(--bs-gray-800);
}

.card-body {
overflow-wrap: break-word !important;
}
2 changes: 1 addition & 1 deletion js/card.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const card = (() => {
<small class="text-${theme.isDarkMode('light', 'dark')} m-0 p-0" style="font-size: 0.75rem;">${comment.created_at}</small>
</div>
<hr class="text-${theme.isDarkMode('light', 'dark')} my-1">
<p class="text-${theme.isDarkMode('light', 'dark')} mt-0 mb-1 mx-0 p-0" style="white-space: pre-wrap" id="content-${comment.uuid}">${convertMarkdownToHTML(util.escapeHtml(comment.comment))}</p>`;
<p class="text-${theme.isDarkMode('light', 'dark')} mt-0 mb-1 mx-0 p-0" style="white-space: pre-wrap !important" id="content-${comment.uuid}">${convertMarkdownToHTML(util.escapeHtml(comment.comment))}</p>`;
};

const renderContent = (comment, is_parent = true) => {
Expand Down
8 changes: 4 additions & 4 deletions js/user.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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, ".");
});
};

Expand Down

0 comments on commit 5071be7

Please sign in to comment.