diff --git a/src/routes/search.rs b/src/routes/search.rs index 1d50c06c..d477e16d 100644 --- a/src/routes/search.rs +++ b/src/routes/search.rs @@ -17,6 +17,7 @@ use std::time::Duration; #[serde(rename_all = "camelCase")] struct Attachment { url: String, + thumbnail_url: String, is_default: bool, } @@ -376,7 +377,8 @@ async fn index_curseforge(start_index: i32, end_index: i32) -> Result Result Result().parse()?, diff --git a/static/css/search.css b/static/css/search.css index 10436869..befd86f7 100644 --- a/static/css/search.css +++ b/static/css/search.css @@ -118,7 +118,8 @@ user-select: none; } -.category-badge img { +.category-badge img, .category-badge svg { + height: 23px; width: 23px; } @@ -159,8 +160,9 @@ flex-wrap: wrap; } -.mod-info img { +.mod-info img, .mod-info svg { height: 12px; + width: 12px; padding: 0; } @@ -169,7 +171,7 @@ padding-right: 15px; white-space: nowrap; } -.mod-info > span > img { +.mod-info > span > img, .mod-info > span > svg { padding-right: 5px; vertical-align: top; } @@ -178,7 +180,7 @@ white-space: nowrap; display: inline-block; } -.loader-icons img { +.loader-icons img, .loader-icons svg { padding-right: 5px; } @@ -274,8 +276,9 @@ width: 155px; } -.result-badge img { +.result-badge img, .result-badge svg { height: 23px; + width: 23px; } .result-badge p { @@ -360,8 +363,9 @@ background-color: var(--equipment-color); } -.forge { - height: 12px; +svg.forge { + height: 12px; + width: auto; fill: var(--forge-color); } diff --git a/static/images/icon/spritesheet.svg b/static/images/icon/spritesheet.svg new file mode 100644 index 00000000..bf630ee0 --- /dev/null +++ b/static/images/icon/spritesheet.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/search-results.hbs b/templates/search-results.hbs index ff321522..5ac67db1 100644 --- a/templates/search-results.hbs +++ b/templates/search-results.hbs @@ -9,22 +9,22 @@

{{this.description}}

- downloads{{format this.downloads}} - created{{this.date_created}} - updated{{this.date_modified}} - version{{this.latest_version}} @@ -45,43 +45,43 @@
{{#contains this.keywords "technology"}}
- tech +

TECH

{{/contains}} {{#contains this.keywords "adventure"}}
- adventure +

ADVENTURE

{{/contains}} {{#contains this.keywords "magic"}}
- magic +

MAGIC

{{/contains}} {{#contains this.keywords "utility"}}
- util +

UTILITY

{{/contains}} {{#contains this.keywords "decoration"}}
- decoration +

DECORATION

{{/contains}} {{#contains this.keywords "library"}}
- library +

LIBRARY

{{/contains}} {{#contains this.keywords "worldgen"}} -
- world +
+

WORLDGEN

{{/contains}} @@ -89,30 +89,29 @@
cursed

CURSED

-

CURSED

{{/contains}} {{#contains this.keywords "storage"}}
- storage +

STORAGE

{{/contains}} {{#contains this.keywords "food"}}
- food +

FOOD

{{/contains}} {{#contains this.keywords "equipment"}}
- equipment +

EQUIPMENT

{{/contains}} {{#contains this.keywords "misc"}}
- misc +

MISC

{{/contains}} diff --git a/templates/search.hbs b/templates/search.hbs index 4a7daea1..aec68ccd 100644 --- a/templates/search.hbs +++ b/templates/search.hbs @@ -10,6 +10,7 @@ + Search @@ -67,31 +68,31 @@

Categories

- tech +

TECH

- adventure +

ADVENTURE

- magic +

MAGIC

- util +

UTILITY

- decoration +

DECORATION

- library +

LIBRARY

- world +

WORLDGEN

@@ -99,19 +100,19 @@

CURSED

- storage +

STORAGE

- food +

FOOD

- equipment +

EQUIPMENT

- misc +

MISC

@@ -121,7 +122,7 @@

Loaders

- forge +

FORGE