Curseforge Indexer

This commit is contained in:
Jai A
2020-05-21 22:38:39 -07:00
parent 51cfb1903d
commit 1291f792ab
13 changed files with 472 additions and 38 deletions

View File

@@ -119,7 +119,7 @@
.mod-description div {
max-width: 1000px;
margin: 0 auto;
padding: 10px;
padding: 5px;
}
.mod-description img {

View File

@@ -179,6 +179,7 @@
}
.result-image {
object-fit: scale-down;
padding: 0 10px 0 5px;
}
@@ -196,6 +197,17 @@
display: flex;
flex-direction: row;
align-items: baseline;
text-decoration: none;
}
.result-name {
text-decoration: none;
color: #0b75d8;
}
.result-author {
text-decoration: none;
color: #2f92d8;
}
.result-badges {
@@ -278,4 +290,13 @@
.cursed-badge {
color: white;
background-color: palevioletred;
}
.cursed-badge img {
margin-left: 5px;
}
.misc-badge {
color: white;
background-color: deepskyblue;
}

View File

@@ -0,0 +1 @@
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m491 128.984v254.034c0 12.6-7.252 24.078-18.638 29.498l-202.286 96.303c-4.448 2.124-9.268 3.181-14.076 3.181s-9.617-1.057-14.065-3.181l-202.296-96.303c-11.387-5.42-18.639-16.898-18.639-29.498v-254.034c0-6.546 1.952-12.788 5.441-18.038 3.206-4.858 7.731-8.866 13.204-11.459l202.29-96.31c8.897-4.237 19.234-4.237 28.142 0l202.29 96.31c5.473 2.592 9.987 6.601 13.193 11.459 3.488 5.25 5.44 11.491 5.44 18.038z" fill="#e53935"/><path d="m485.559 110.946c-3.206-4.858-7.72-8.866-13.193-11.459l-202.29-96.31c-8.908-4.237-19.244-4.237-28.142 0l-1.39.662 200.9 95.648c5.473 2.592 9.988 6.601 13.193 11.459 3.489 5.25 5.441 11.491 5.441 18.038v254.034c0 12.6-7.252 24.078-18.638 29.498l-200.896 95.641 1.39.662c4.449 2.124 9.258 3.181 14.066 3.181s9.628-1.057 14.076-3.181l202.286-96.303c11.386-5.42 18.638-16.898 18.638-29.498v-254.034c0-6.547-1.952-12.788-5.441-18.038z" fill="#d32f2f"/><path d="m256 220.239v291.761c-4.808 0-9.617-1.057-14.065-3.181l-202.296-96.303c-11.387-5.42-18.639-16.898-18.639-29.498v-254.034c0-6.546 1.952-12.788 5.441-18.038z" fill="#f44336"/><path d="m491 128.984v254.041c0 12.461-7.109 23.843-18.296 29.333-.109.054-.229.109-.338.163l-202.29 96.299c-4.448 2.123-9.268 3.18-14.076 3.18v-291.761l229.559-109.293c3.489 5.25 5.441 11.491 5.441 18.038z" fill="#d32f2f"/><path d="m485.559 110.946-25.994 12.376c.326 1.851.513 3.741.513 5.662v254.041c0 12.461-7.109 23.843-18.296 29.333-.109.054-.229.109-.338.163l-185.444 88.28v11.199c4.808 0 9.628-1.057 14.076-3.181l202.29-96.299c.109-.054.229-.109.338-.163 11.187-5.49 18.296-16.872 18.296-29.333v-254.04c0-6.547-1.952-12.788-5.441-18.038z" fill="#c62828"/><g fill="#f1f1f1"><ellipse cx="389.64" cy="306.507" rx="26.736" ry="19.708" transform="matrix(.134 -.991 .991 .134 33.735 651.612)"/><ellipse cx="190.492" cy="263.252" rx="19.607" ry="26.736" transform="matrix(.999 -.055 .055 .999 -14.066 10.775)"/><ellipse cx="78.302" cy="360.193" rx="19.607" ry="26.736" transform="matrix(.999 -.055 .055 .999 -19.517 4.803)"/><ellipse cx="161.083" cy="104.225" rx="26.736" ry="19.607" transform="matrix(.999 -.055 .055 .999 -5.442 8.935)"/><ellipse cx="253.668" cy="58.477" rx="26.736" ry="19.607" transform="matrix(.999 -.055 .055 .999 -2.81 13.914)"/><ellipse cx="350.609" cy="107.492" rx="26.736" ry="19.607" transform="matrix(.999 -.055 .055 .999 -5.338 19.27)"/><ellipse cx="260.203" cy="149.972" rx="26.736" ry="19.607" transform="matrix(.999 -.055 .055 .999 -7.788 14.406)"/></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -9,6 +9,7 @@ let category_inputs = {
"library": false,
"worldgen": false,
"cursed": false,
"misc": false,
"forge": false,
"fabric": false,
}
@@ -141,9 +142,14 @@ function activateVersion(element) {
}
function handleSearch() {
let safeName = encodeURIComponent(input.value).replace(/%20/g,'+');
let queryString = "search";
if(input.value.length > 0) {
queryString += "?q=" + encodeURIComponent(input.value).replace(/%20/g,'+');
} else {
queryString += "?q=empty"
}
let queryString = "search?q=" + safeName;
let filterString = "";
let versionString = "";