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

Medal Solution BBCode #52

Open
wants to merge 3 commits into
base: q2-2023
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
24 changes: 23 additions & 1 deletion global/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4744,4 +4744,26 @@ input[type='range']:focus::-ms-fill-upper {

.osekai__dropdown-item i {
margin-right: 5px;
}
}

code {
background-color: rgba(var(--genericaccent),0.5);
padding: 0 5px;
text-wrap: nowrap;
}

blockquote {
display: flex;
background-color: rgba(var(--genericaccent), 0.5);
border-radius: 6px;
padding: 5px 0;
}

blockquote::before {
content: "";
border-left: 7px solid rgb(var(--accent));
margin-right: 4px;
border-radius: 6px;
margin: -5px 5px;
margin-left: 0;
}
8 changes: 8 additions & 0 deletions global/js/bbcode/bbcode-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ var parserTags = {
return '</q>';
}
},
'blockquote': {
openTag: function(params, content) {
return '<blockquote>';
},
closeTag: function(params, content) {
return '</blockquote>';
}
},
's': {
openTag: function(params,content) {
return '<s>';
Expand Down
4 changes: 2 additions & 2 deletions medals/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ async function loadMedal(strMedalName, updateAdminPanel = true) {
for (let i = 0; i < document.querySelectorAll("[selector='oMedalIcon']").length; i++) {
document.querySelectorAll("[selector='oMedalIcon']")[i].src = colMedals[strMedalName].Link;
}
document.getElementById("strMedalSolution").innerHTML = colMedals[strMedalName].Solution;
document.getElementById("strMedalSolution").innerHTML = document.getElementById("strMedalSolution").innerHTML.replace(/\n/g, "<br />")
document.getElementById("strMedalSolution").innerHTML = BBCodeParser.process(colMedals[strMedalName].Solution);
document.getElementById("strMedalSolution").innerHTML = document.getElementById("strMedalSolution").innerHTML.replace(/\n/g, "<br />");
var rarity = parseFloat(colMedals[strMedalName].Rarity);
//console.log(rarity);
document.getElementById("strMedalRarity").innerHTML = "<light>rarity</light> " + Math.round(rarity * 100) / 100 + "%";
Expand Down