From 6e301601f9c126d6b9a27e449f2d8e5d94d838be Mon Sep 17 00:00:00 2001 From: Jai A Date: Thu, 25 Jun 2020 22:40:29 -0700 Subject: [PATCH] Fix minor styling issues --- Cargo.toml | 2 +- src/routes/search.rs | 1 - static/css/main.css | 26 ++++++++++++------------- static/css/search.css | 8 ++++++-- static/images/icon/forge-alt.svg | 33 +++++++++++++++++++------------- static/images/icon/forge.svg | 33 +++++++++++++++++++------------- static/js/main.js | 4 ++-- templates/search.hbs | 3 ++- 8 files changed, 64 insertions(+), 46 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 96948e276..72d3098a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ actix-files = "0.2.1" handlebars = { version = "3.0.0", features = ["dir_source"] } serde_json = "1.0" serde = {version="1.0", features=["derive"]} -meilisearch-sdk = "0.1.3" +meilisearch-sdk = "0.1.4" human_format = "1.0.3" reqwest = "0.10.4" log = "0.4.8" diff --git a/src/routes/search.rs b/src/routes/search.rs index aae92286b..691963e67 100644 --- a/src/routes/search.rs +++ b/src/routes/search.rs @@ -172,7 +172,6 @@ fn search(info: &SearchRequest) -> Vec { TODO This method needs a lot of refactoring. Here's a list of changes that need to be made: - Move Curseforge Indexing to another method/module - Get rid of the 4 indexes (when MeiliSearch updates) and replace it with different rules - - Cleanup this code (it's very messy) - Remove code fragment duplicates */ diff --git a/static/css/main.css b/static/css/main.css index 019d82952..eaeaeb6eb 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -13,18 +13,18 @@ --muted: gray; --forge-color: #1e2d44; - --tech-color: red; - --adventure-color: saddlebrown; - --magic-color: rebeccapurple; - --utility-color: orangered; - --decoration-color: #2f92d8; - --world-color: yellow; - --library-color: orange; - --cursed-color: palevioletred; - --misc-color: deepskyblue; - --storage-color: #e1a15a; - --food-color: royalblue; - --equipment-color: black; + --tech-color: #d01111; + --adventure-color: #c8a800; + --magic-color: #7532b8; + --utility-color: #e3690f; + --decoration-color: #14a593; + --world-color: #32a31f; + --library-color: #1363b8; + --cursed-color: #933151; + --misc-color: #323232; + --storage-color: #a77741; + --food-color: #9f1823; + --equipment-color: #654700; } [data-theme="dark"] { @@ -130,7 +130,7 @@ h1, h2, h3, h4, h5, h6 { } .site-header h2 { - color: --var(white-text); + color: var(--white-text); font-weight: bolder; padding: 0 20px 0 10px; } diff --git a/static/css/search.css b/static/css/search.css index 8cc3822a4..283577c99 100644 --- a/static/css/search.css +++ b/static/css/search.css @@ -294,6 +294,10 @@ background-color: #1e2d44; } +.forge-badge img { + width: 23px; +} + .fabric-badge { color: #585849; background-color: #fffdd0; @@ -325,7 +329,7 @@ } .world-badge { - color: black; + color: white; background-color: var(--world-color); } @@ -349,7 +353,7 @@ } .storage-badge { - color: wheat; + color: white; background-color: var(--storage-color); } diff --git a/static/images/icon/forge-alt.svg b/static/images/icon/forge-alt.svg index 6a15d2104..c79cd6d36 100644 --- a/static/images/icon/forge-alt.svg +++ b/static/images/icon/forge-alt.svg @@ -1,14 +1,21 @@ - - - - - + + + + + + + + + - + \ No newline at end of file diff --git a/static/images/icon/forge.svg b/static/images/icon/forge.svg index 4f7f0495a..147dad49e 100644 --- a/static/images/icon/forge.svg +++ b/static/images/icon/forge.svg @@ -1,14 +1,21 @@ - - - - - + + + + + + + + + - + \ No newline at end of file diff --git a/static/js/main.js b/static/js/main.js index 4fcb33f89..452810ae2 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,5 +1,5 @@ window.onload = function () { - if (localStorage.getItem("theme")) { - document.documentElement.setAttribute("theme", localStorage.getItem("theme")); + if (localStorage.getItem("data-theme")) { + document.documentElement.setAttribute("data-theme", localStorage.getItem("data-theme")); } } \ No newline at end of file diff --git a/templates/search.hbs b/templates/search.hbs index b7bec52f9..c32278581 100644 --- a/templates/search.hbs +++ b/templates/search.hbs @@ -5,6 +5,8 @@ + + @@ -156,7 +158,6 @@ -