Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: description color tag #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions helpers/preprocessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ function preProcessSessionList(json, count){
* @returns The preprocessed world information for viewing.
*/
function preProcessWorld(json) {
if (json.description) {
json.description = preProcessName(json.description);
}

if (json.thumbnailUri) {
json.thumbnailUri = json.thumbnailUri.replace("resdb:///", "https://assets.resonite.com/").replace(".webp", "");
} else {
Expand Down
2 changes: 1 addition & 1 deletion views/world.pug
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ block content
dd #{ownerName}
.row
dt Description:
dd #{description}
dd !{description}
.row
dt First published on:
dd #{firstPublishTime}
Expand Down
2 changes: 1 addition & 1 deletion views/worldList.pug
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ block content
em By #{world.ownerName}
div.thumbnail
img(src=`${world.thumbnailUri}`, alt='', width='280', height='140', loading='lazy')
p.listing-item__description #{world.description || '(No Description)'}
p.listing-item__description !{world.description || '(No Description)'}
+pagination(urlPath, apiInitBody.offset + 1, apiInitBody.offset + records.length, [query.pageIndex, parseInt(query.pageIndex) + 1])
else
p
Expand Down