mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-28 12:23:24 +01:00
add title and path
This commit is contained in:
2 files changed
+42
-15
No files matched your search
@@ -193,7 +193,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"tanks": {
|
"tanks": {
|
||||||
"all_tanks": "All tanks",
|
"title": {
|
||||||
|
"all_tanks": "All tanks",
|
||||||
|
"compare": "Compare"
|
||||||
|
},
|
||||||
|
|
||||||
"antagonist_control": {
|
"antagonist_control": {
|
||||||
"calibrated_shells": "Calibrated shells",
|
"calibrated_shells": "Calibrated shells",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { alias, romanize } from "@blitzkit/core";
|
import { alias, romanize } from "@blitzkit/core";
|
||||||
import { unwrapper } from "@blitzkit/i18n";
|
import { unwrapper } from "@blitzkit/i18n";
|
||||||
import { ArrowLeftIcon, CaretRightIcon } from "@radix-ui/react-icons";
|
import { ArrowLeftIcon, CaretRightIcon } from "@radix-ui/react-icons";
|
||||||
|
import { stringify } from "urlon";
|
||||||
import { api } from "../api/dynamic";
|
import { api } from "../api/dynamic";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
import { LinkI18n } from "./LinkI18n";
|
import { LinkI18n } from "./LinkI18n";
|
||||||
@@ -22,6 +23,7 @@ const tier = romanize(tank.tier);
|
|||||||
const type = strings.common.tank_class_medium[tank.class];
|
const type = strings.common.tank_class_medium[tank.class];
|
||||||
|
|
||||||
const unwrap = unwrapper(locale);
|
const unwrap = unwrapper(locale);
|
||||||
|
const compareState = stringify([id]);
|
||||||
---
|
---
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -31,6 +33,7 @@ const unwrap = unwrapper(locale);
|
|||||||
background-position: right;
|
background-position: right;
|
||||||
|
|
||||||
border-radius: var(--space-3);
|
border-radius: var(--space-3);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.gradient {
|
.gradient {
|
||||||
padding: var(--space-4);
|
padding: var(--space-4);
|
||||||
@@ -38,18 +41,30 @@ const unwrap = unwrapper(locale);
|
|||||||
|
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
270deg,
|
270deg,
|
||||||
transparent,
|
var(--black-a5),
|
||||||
var(--gray-1) var(--space-6)
|
var(--gray-1) var(--space-7)
|
||||||
);
|
);
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.path {
|
.identity {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
gap: var(--space-1);
|
align-items: flex-end;
|
||||||
|
gap: var(--space-2);
|
||||||
|
|
||||||
|
.path {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--space-1);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -64,17 +79,26 @@ const unwrap = unwrapper(locale);
|
|||||||
<div class="gradient">
|
<div class="gradient">
|
||||||
<LinkI18n underline="hover" {locale} href="/tanks">
|
<LinkI18n underline="hover" {locale} href="/tanks">
|
||||||
<ArrowLeftIcon />
|
<ArrowLeftIcon />
|
||||||
{strings.tanks.all_tanks}
|
{strings.tanks.title.all_tanks}
|
||||||
</LinkI18n>
|
</LinkI18n>
|
||||||
|
|
||||||
<Text className="path" lowContrast>
|
<!-- <LinkI18nWrapper {locale} href={`/compare?state=${compareState}`}>
|
||||||
{nation}
|
<Button variant="outline">
|
||||||
<CaretRightIcon />
|
<PlusIcon />
|
||||||
{tier}
|
{strings.tanks.title.compare}
|
||||||
<CaretRightIcon />
|
</Button>
|
||||||
{type}
|
</LinkI18nWrapper> -->
|
||||||
</Text>
|
|
||||||
|
|
||||||
<Heading size="2">{unwrap(tank.name)}</Heading>
|
<div class="identity">
|
||||||
|
<Heading size="2">{unwrap(tank.name)}</Heading>
|
||||||
|
|
||||||
|
<Text className="path" lowContrast>
|
||||||
|
{nation}
|
||||||
|
<CaretRightIcon />
|
||||||
|
{tier}
|
||||||
|
<CaretRightIcon />
|
||||||
|
{type}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user