mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
optimize html, css, svg's, and webp delivery
This commit is contained in:
75 files changed
+452
-331
No files matched your search
+2
-1
@@ -3,6 +3,7 @@ import { IconButton } from "@radix-ui/themes";
|
||||
import { Duel } from "../../../../../../stores/duel";
|
||||
import { useArmor } from "../../../hooks/useArmor";
|
||||
import { Tankopedia } from "../../../stores/tankopedia";
|
||||
import { LazyImage } from "../../LazyImage";
|
||||
|
||||
export function DynamicArmorSwitcher() {
|
||||
const tank = Duel.use((state) => state.protagonist.tank);
|
||||
@@ -36,7 +37,7 @@ export function DynamicArmorSwitcher() {
|
||||
});
|
||||
}}
|
||||
>
|
||||
<img
|
||||
<LazyImage
|
||||
alt="Dynamic Armor"
|
||||
src={alias("api", "/icons/consumables/73.webp")}
|
||||
style={{
|
||||
|
||||
@@ -6,6 +6,7 @@ import { Duel } from "../../../../../../stores/duel";
|
||||
import { SPALL_LINER_PROVISION_ID } from "../../../core/blitzkit/spallLiner";
|
||||
import { useLocale } from "../../../hooks/useLocale";
|
||||
import { Tankopedia } from "../../../stores/tankopedia";
|
||||
import { LazyImage } from "../../LazyImage";
|
||||
|
||||
const provisionDefinitions = await api.provisionDefinitions();
|
||||
|
||||
@@ -62,7 +63,7 @@ export function SpallLinerSwitcher() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
<img
|
||||
<LazyImage
|
||||
alt={unwrap(
|
||||
provisionDefinitions.provisions[SPALL_LINER_PROVISION_ID].name!,
|
||||
)}
|
||||
@@ -83,7 +84,7 @@ export function SpallLinerSwitcher() {
|
||||
|
||||
<Popover.Content>
|
||||
<Flex gap="2" align="center">
|
||||
<img
|
||||
<LazyImage
|
||||
alt={unwrap(
|
||||
provisionDefinitions.provisions[SPALL_LINER_PROVISION_ID].name!,
|
||||
)}
|
||||
@@ -109,7 +110,7 @@ export function SpallLinerSwitcher() {
|
||||
radius="medium"
|
||||
onClick={() => equip(id)}
|
||||
>
|
||||
<img
|
||||
<LazyImage
|
||||
alt={unwrap(provisionDefinitions.provisions[id].name!)}
|
||||
src={alias("api", `/icons/provisions/${id}.webp`)}
|
||||
style={{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Tankopedia } from "../../stores/tankopedia";
|
||||
import { TankopediaDisplay } from "../../stores/tankopediaPersistent/constants";
|
||||
import { LazyImage } from "../LazyImage";
|
||||
import { SegmentedControl } from "../SegmentedControl";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
@@ -119,18 +120,18 @@ export function TankopediaOptions() {
|
||||
value={`${requestedDisplay}`}
|
||||
options={[
|
||||
{
|
||||
label: <img src="/assets/images/icons/tankopedia-model.png" />,
|
||||
label: <LazyImage src="/assets/images/icons/tankopedia-model.png" />,
|
||||
value: `${TankopediaDisplay.Model}`,
|
||||
},
|
||||
{
|
||||
label: (
|
||||
<img src="/assets/images/icons/tankopedia-dynamic-armor.png" />
|
||||
<LazyImage src="/assets/images/icons/tankopedia-dynamic-armor.png" />
|
||||
),
|
||||
value: `${TankopediaDisplay.DynamicArmor}`,
|
||||
},
|
||||
{
|
||||
label: (
|
||||
<img src="/assets/images/icons/tankopedia-static-armor.png" />
|
||||
<LazyImage src="/assets/images/icons/tankopedia-static-armor.png" />
|
||||
),
|
||||
value: `${TankopediaDisplay.StaticArmor}`,
|
||||
},
|
||||
@@ -155,7 +156,7 @@ export function TankopediaOptions() {
|
||||
<SegmentedControl.Item value={`${TankopediaDisplay.DynamicArmor}`}>
|
||||
<Tooltip tooltip={strings.tanks.tabs.dynamic_armor}>
|
||||
<div height="100%" align="center">
|
||||
<img
|
||||
<LazyImage
|
||||
src="/assets/images/icons/tankopedia-dynamic-armor.png"
|
||||
style={{ height: "1.25em" }}
|
||||
/>
|
||||
@@ -165,7 +166,7 @@ export function TankopediaOptions() {
|
||||
<SegmentedControl.Item value={`${TankopediaDisplay.StaticArmor}`}>
|
||||
<Tooltip tooltip={strings.tanks.tabs.model}>
|
||||
<div height="100%" align="center">
|
||||
<img
|
||||
<LazyImage
|
||||
src="/assets/images/icons/tankopedia-static-armor.png"
|
||||
style={{ height: "1.25em" }}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user