diff --git a/global/api/comment_system.php b/global/api/comment_system.php index 393c1147..2c15fc02 100644 --- a/global/api/comment_system.php +++ b/global/api/comment_system.php @@ -111,6 +111,7 @@ public function build(): CommentQuery { Comments.PostText, Comments.UserID, Comments.PostDate, + Comments.Pinned, Comments.ParentCommenter, Coalesce(Comments.ParentComment, 0) AS Parent, Comments.Username, Comments.AvatarURL, diff --git a/global/js/colourpicker.js b/global/js/colourpicker.js index 073a9726..076ab739 100755 --- a/global/js/colourpicker.js +++ b/global/js/colourpicker.js @@ -36,18 +36,12 @@ function newColourBar(id, changeCallback, col1 = null, col2 = null) { function updateUI(changeInputs = false) { var gradient_1_col_hex = rgbToHex(gradient_1_col[0], gradient_1_col[1], gradient_1_col[2]); var gradient_2_col_hex = rgbToHex(gradient_2_col[0], gradient_2_col[1], gradient_2_col[2]); - console.log(gradient_1_col_hex); - console.log(gradient_2_col_hex); bar_left.style.background = gradient_1_col_hex; bar_right.style.background = gradient_2_col_hex; if(changeInputs) { bar_left_input.value = gradient_1_col_hex; bar_right_input.value = gradient_2_col_hex; - //picker1.enter(); - //picker1.exit(); - //picker2.enter(); - //picker2.exit(); } bar_bar.style.background = "linear-gradient(to right, " + gradient_1_col_hex + ", " + gradient_2_col_hex + ")"; } @@ -134,7 +128,6 @@ function newColourPicker(id, changeCallback, col1 = null) { function updateUI(changeInputs = false) { var col_hex = rgbToHex(col[0], col[1], col[2]); - console.log(col_hex); element.style.background = col_hex; if(changeInputs) { @@ -167,7 +160,6 @@ function newColourPicker(id, changeCallback, col1 = null) { return; } col = [r, g, b]; - console.log("CP updating with colour " + col); this.source.value = rgbToHex(r, g, b); updateUI(); dirty = true; @@ -180,7 +172,6 @@ function newColourPicker(id, changeCallback, col1 = null) { input.addEventListener("change", function () { var hex = this.value; var rgb = hexToRgb(hex); - console.log("CP input changing with colour " + rgb); if (rgb) { col = [rgb.r, rgb.g, rgb.b]; picker1.exit(); @@ -194,7 +185,6 @@ function newColourPicker(id, changeCallback, col1 = null) { if (col1 != null) { - console.log("loading CP with default of " + col1); col = col1; input.value = rgbToHex(col[0], col[1], col[2]); updateUI(); diff --git a/global/js/comment_system.js b/global/js/comment_system.js index 14439f25..de39e4c6 100644 --- a/global/js/comment_system.js +++ b/global/js/comment_system.js @@ -9,7 +9,8 @@ var COMMENTS_col_hash = []; var COMMENTS_boxes = []; var COMMENTS_mode = 1; var COMMENTS_type = 1; - +var OPARENT = null; +var MEDALID = null; window.addEventListener('click', function (e) { if (!document.getElementById('filter__button').contains(e.target)) document.getElementById("filter__list").classList.add("osekai__dropdown-hidden"); }); @@ -22,6 +23,17 @@ window.addEventListener('DOMContentLoaded', (event) => { `; } + + document.getElementById("filter__votes").addEventListener("click", function() { + COMMENTS_mode = 1; + Comments_Sort(OPARENT, MEDALID); + Comments_Out(OPARENT, MEDALID); + }) + document.getElementById("filter__date").addEventListener("click", function() { + COMMENTS_mode = 2; + Comments_Sort(OPARENT, MEDALID); + Comments_Out(OPARENT, MEDALID); + }) }); async function Comments_Require(MedalID, oParent, bReload = false, VersionId = -1, ProfileId = -1) { @@ -43,9 +55,7 @@ async function Comments_Require(MedalID, oParent, bReload = false, VersionId = - COMMENTS_boxes[MedalID] = []; oParent.innerHTML = loader; - console.log("[Locale] loading comments locale"); await loadSource("comments"); - console.log("[Locale] loaded comments locale"); var xhr = createXHR(API_URL_COMMENTS); if (VersionId !== -1) { @@ -53,7 +63,6 @@ async function Comments_Require(MedalID, oParent, bReload = false, VersionId = - } else if (ProfileId !== -1) { xhr.send(REQUIRED_KEY_COMMENTS + "&nProfileId=" + ProfileId); } else { - console.log(MedalID); xhr.send(REQUIRED_KEY_COMMENTS + "&strMedalID=" + MedalID); } xhr.onreadystatechange = function () { @@ -62,10 +71,11 @@ async function Comments_Require(MedalID, oParent, bReload = false, VersionId = - oParent.innerHTML = ""; return; } - console.log(oResponse); Object.keys(oResponse).forEach(function (obj) { if (oResponse[obj] !== null && oResponse[obj].MedalID == MedalID) COMMENTS_col_medals[MedalID].push(oResponse[obj]); }); + MEDALID = MedalID; + OPARENT = oParent; Comments_Sort(oParent, MedalID); tippy("[data-tippy-content-comment-date]", { content: function (reference) { @@ -113,7 +123,6 @@ function Comments_Sort(oParent, MedalID, VersionId = -1, ProfileID = -1) { if (ProfileID !== -1) MedalID = ProfileID; if (VersionId !== -1) MedalID = VersionId; if (COMMENTS_col_medals[MedalID] == undefined) return; - console.log(MedalID); COMMENTS_boxes[MedalID] = []; COMMENTS_col_hash = []; @@ -129,7 +138,6 @@ function Comments_Sort(oParent, MedalID, VersionId = -1, ProfileID = -1) { } function generateComment(commentdata) { - console.log(commentdata); var comment = Object.assign(document.createElement("div"), { className: "comments__comment" }); if (commentdata.Pinned) { comment.classList.add("comments__comment-pinned"); @@ -146,7 +154,6 @@ function generateComment(commentdata) { comment_left_votes.classList.add("comments__comment-votes-voted"); } comment_left_votes.addEventListener("click", function () { - console.log("clicked :D"); voteComment(commentdata.ID, comment_left_votes); }) } @@ -257,7 +264,6 @@ function generateComment(commentdata) { } } comment_right_infobar_right.appendChild(createInfobarButton("fas fa-ellipsis-h", "small", function () { - console.log("opening dropdown"); eldropdown.classList.remove("osekai__dropdown-hidden"); })); comment_right_infobar_right.appendChild(eldropdown); @@ -401,7 +407,6 @@ function openReply(strCommentId, element) { function replySend() { Comments_CloseEmojiPopup(); let oReplyBox = document.getElementById("oReplyBox"); - console.log(oReplyBox.previousSibling.outerHTML); newReply(document.getElementById("reply__input").value, oReplyBox.previousSibling.getAttribute("CommentID"), oReplyBox.previousSibling.getAttribute("CommentCreator")); document.getElementById("reply__input").value = ""; } @@ -479,6 +484,7 @@ function RequireComments() { } function Comments_Out(oParent, MedalID) { + oParent.innerHTML = ""; COMMENTS_boxes[MedalID].forEach((oBox) => { oParent.appendChild(oBox); }); diff --git a/global/js/graphics/particles.js b/global/js/graphics/particles.js index 8f652d7e..d615c192 100644 --- a/global/js/graphics/particles.js +++ b/global/js/graphics/particles.js @@ -7,15 +7,12 @@ particle= create : function(x,y,speed,angle) { - console.log(x,y,speed,angle) var obj=Object.create(this); obj.velocity=vector.create(0,0); obj.velocity.setLength(speed); obj.velocity.setAngle(angle); obj.position=vector.create(x,y); - console.log("object") - console.log(obj); return obj; }, diff --git a/global/js/main.js b/global/js/main.js index 4c3ed4d8..54ab31d8 100755 --- a/global/js/main.js +++ b/global/js/main.js @@ -160,7 +160,6 @@ theme = themes["colourful"]; loadThemes(); function setTheme(stheme) { - console.log("setting theme to " + stheme); if (typeof stheme == "string") { for (var i in themes) { if (themes[i].internal == stheme) { @@ -184,8 +183,6 @@ var customTheme = { if (window.localStorage.getItem('accent_dark') != null) { customTheme.accent_dark = window.localStorage.getItem('accent_dark').split(","); customTheme.accent = window.localStorage.getItem('accent').split(","); - console.log(window.localStorage.getItem('accent_dark')); - console.log(customTheme.accent_dark); } var accentDark_picker = document.getElementById("custom_colpicker_accent-dark"); @@ -201,7 +198,6 @@ function generateCustomThemeVars(accent, accentDark, valueOffsetOffset = 0, valu var accent_split = String(accent).split(","); var accentDark_hsl = colours.RGBToHSL(accentDark_split[0], accentDark_split[1], accentDark_split[2]); var accent_hsl = colours.RGBToHSL(accent_split[0], accent_split[1], accent_split[2]); - console.log("$(*(*" + accentDark); return `--accentdark: ${accentDark} !important; --accent: ${accent} !important; @@ -358,8 +354,6 @@ window.openDialog = function (title, header, message, buttons = [], content = nu modal_overlay.appendChild(modal_overlay_panel); - console.log("appending...?"); - document.body.appendChild(modal_overlay); setTimeout(function () { // need this so it plays the animation... UGHHHH @@ -457,7 +451,6 @@ if (christmas) { function defaultSettings() { if (window.localStorage.getItem('theme') == null) { - console.log("defaulting theme"); setTheme("colourful"); window.localStorage.setItem('theme', "colourful"); } @@ -532,7 +525,6 @@ window.addEventListener('click', function (e) { colItems.classList.add("osekai__dropdown-hidden"); }); } - console.log(e.target.classList); if (e.target.closest(".osekai__group-dropdown-arrow") == null) { document.querySelectorAll(".osekai__group-dropdown").forEach((colItems) => { colItems.classList.add("osekai__group-dropdown-hidden"); @@ -649,7 +641,6 @@ var alertTypes = { } function closeAlert(alert, el) { - console.log("deleting " + alert['Id']); el.remove(); positionNav(); @@ -677,7 +668,6 @@ function getAlerts() { let xhr = createXHR("/api/alerts.php?app=" + nAppId); xhr.send(); xhr.onload = function () { - console.log(xhr.responseText); var oResponse = JSON.parse(xhr.responseText); for (var x = 0; x < oResponse.length; x++) { let alert = oResponse[x]; @@ -758,7 +748,6 @@ document.addEventListener("DOMContentLoaded", function () { if (tab.getAttribute("otab-name") == tabName) { tab.classList.remove("osekai__otab-hidden"); if (tab.getAttribute("otab-callback")) { - console.log(tab.getAttribute("otab-callback")); window[tab.getAttribute("otab-callback")](); } } else { @@ -777,14 +766,16 @@ document.addEventListener("DOMContentLoaded", function () { last_tab = tabName; } - for (let oTab of oTabs) { - if (oTab.getAttribute("otab-default") == "") { - switchTab(oTab.getAttribute("otab-name")); + if (getParam(oTabContainer.getAttribute("otab-container")) == null) { + for (let oTab of oTabs) { + if (oTab.getAttribute("otab-default") == "") { + switchTab(oTab.getAttribute("otab-name")); + } } } for (let oTabButton of oTabButtons) { - if(oTabContainer.getAttribute("otab-no-replace") == null) { + if (oTabContainer.getAttribute("otab-no-replace") == null) { oTabButton.innerHTML = oTabButton.getAttribute("otab-button"); } oTabButton.addEventListener("click", function () { @@ -824,13 +815,11 @@ var groupUtils = { return array.sort((a, b) => a.Order - b.Order) }, badgeHtmlFromArray: function (array, size = "small", limit = "none") { - console.log(array); var orderedList = []; for (var x = 0; x < array.length; x++) { orderedList.push(this.getGroupFromId(array[x])); } orderedList = this.orderBadgeArray(orderedList); - console.log(orderedList); var finalHtml = ""; let hiddenGroups = [] let createExtraDropdown = false; @@ -938,10 +927,6 @@ if (gl) { renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); } -console.log(debugInfo); -console.log(vendor); -console.log(renderer); - // !chrome // no acccel: // vendor: Google Inc. (Google) diff --git a/global/js/navbar.js b/global/js/navbar.js index 3b6ad024..4e85b79c 100755 --- a/global/js/navbar.js +++ b/global/js/navbar.js @@ -270,7 +270,6 @@ function CreateNotifications(Notifications, UI) { } function CreateNotificationItem(List, Notification) { - console.log("Getting Notifications"); let Outer = document.createElement("div"); Outer.classList.add("osekai__nav-dropdown-v2-notification"); diff --git a/global/js/search.js b/global/js/search.js index 8b6966d5..927a6cef 100755 --- a/global/js/search.js +++ b/global/js/search.js @@ -115,6 +115,7 @@ function search_initOverlay() { _appel.classList.remove("active"); } el.classList.add("active") + search_startSearch(); }) } search_inner = Object.assign(document.createElement("div"), { "className": "osekai__navbar-search-overlay-inner" }); @@ -133,7 +134,6 @@ function search_startSearch() { // timeout here, since apparently search_input.value does not have the brain power to update fast enough for us setTimeout(function () { if (search_input.value != "") { - console.log("searching with value " + search_input.value) if (loaderopened == false) { loaderopened = true; search_inner.innerHTML = loader; @@ -151,7 +151,6 @@ function search_startSearch() { } function search_doSearch() { - console.log("attempting search!"); loaderopened = false; var search_query = search_input.value; var data = new FormData(); @@ -162,7 +161,6 @@ function search_doSearch() { xhr.open("POST", "/global/api/search.php", true); xhr.onload = function () { var response = JSON.parse(xhr.response); - console.log(response); search_inner.innerHTML = ""; search_inner.appendChild(search_searchResult(response)); } diff --git a/global/lang/en_GB/rankings.json b/global/lang/en_GB/rankings.json index ced8b6ab..98e57c60 100755 --- a/global/lang/en_GB/rankings.json +++ b/global/lang/en_GB/rankings.json @@ -57,6 +57,7 @@ "bar.mappers.loved.lovedMaps": "loved maps", "bar.mappers.subscribers.subscribers": "subscribers", "bar.badges.badges.badges": "badges", + "bar.mappers.kudosu.kudosu": "kudosu", "pagination.previous": "prev", "pagination.next": "next", "search.username": "Username", @@ -73,5 +74,6 @@ "tasks.task.updating": "Running Update", "tasks.type.default": "Default", "tasks.type.full": "Full", + "tasks.type.medals": "Medal Recheck", "tasks.task.usersProcessed": "$1 users processed" } \ No newline at end of file diff --git a/global/php/osekaiLocalization.php b/global/php/osekaiLocalization.php index 44d2ce9d..9eccae27 100755 --- a/global/php/osekaiLocalization.php +++ b/global/php/osekaiLocalization.php @@ -253,7 +253,7 @@ "name" => "čeština", "code" => "cs_CZ", "short" => "cs", - "flag" => "https://assets.ppy.sh/old-flags/CS.png" + "flag" => "https://assets.ppy.sh/old-flags/CZ.png" ] ]; diff --git a/home/css/main.css b/home/css/main.css index f2a4b0fc..ea9cc838 100755 --- a/home/css/main.css +++ b/home/css/main.css @@ -60,9 +60,8 @@ .home__loader-wait .home__cover-background { opacity: 0; } - .home__cover-background { - transition: all 1s ease; + transition: opacity 1s ease; } } @@ -123,6 +122,15 @@ flex: 1; position: relative; } +.waves { + position: absolute; + top: 10vh; + left: 0; + bottom: 5vh; + z-index: 2; + height: 80vh; + mix-blend-mode: overlay; +} .home__cover-middle { margin: auto; @@ -272,7 +280,7 @@ border: 1px solid rgb(var(--paccent-bright)); box-sizing: border-box; height: 21vw; - flex: 1; + } .home__new-badge { @@ -877,4 +885,60 @@ code { height: 100% !important; max-height: 100vh !important; } -} \ No newline at end of file +} + +@keyframes move-forever { + 0% { + transform: translate3d(-90px, 0, 0); + } + + 100% { + transform: translate3d(85px, 0, 0); + } +} +.parallax>use { + background-blend-mode: overlay; + animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite; +} + +.parallax>use:nth-child(1) { + animation-delay: -10s; + animation-duration: 29s; +} + +.parallax>use:nth-child(2) { + animation-delay: -4s; + animation-duration: 40s; +} + +.parallax>use:nth-child(3) { + animation-delay: -20s; + animation-duration: 33s; +} + +.parallax>use:nth-child(4) { + animation-delay: -5s; + animation-duration: 40s; +} + +.parallax>use:nth-child(5) { + animation-delay: -4s; + animation-duration: 29s; +} + +.parallax>use:nth-child(6) { + animation-delay: -7s; + animation-duration: 35s; +} + +.parallax>use:nth-child(7) { + animation-delay: -1s; + animation-duration: 33s; +} + +.parallax>use:nth-child(8) { + animation-delay: -9s; + animation-duration: 40s; +} + + diff --git a/home/img/new-bg.jpg b/home/img/new-bg.jpg new file mode 100644 index 00000000..8c036ceb Binary files /dev/null and b/home/img/new-bg.jpg differ diff --git a/home/index.php b/home/index.php index e70d1bef..04cb44e8 100755 --- a/home/index.php +++ b/home/index.php @@ -36,14 +36,28 @@ + +