mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
center fallbacks
This commit is contained in:
8 files changed
+73
-31
No files matched your search
@@ -37,10 +37,7 @@ const groups = toolGroups.map((group) => {
|
||||
#navbar-fine {
|
||||
--icon-size: 1.5rem;
|
||||
--padding: var(--space-4);
|
||||
--content-inset: max(
|
||||
var(--page-padding),
|
||||
(100% - var(--page-width)) / 2
|
||||
);
|
||||
--content-inset: max(var(--page-padding), (100% - var(--page-width)) / 2);
|
||||
|
||||
display: none;
|
||||
|
||||
@@ -146,6 +143,15 @@ const groups = toolGroups.map((group) => {
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
|
||||
.entry[data-disabled="true"] {
|
||||
opacity: calc(1 / 4);
|
||||
cursor: not-allowed;
|
||||
|
||||
.tool {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tool {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -340,21 +346,23 @@ const groups = toolGroups.map((group) => {
|
||||
|
||||
<div class="tools">
|
||||
{group.tools.map((tool, index) => (
|
||||
<LinkI18nWrapper {locale} href={`/${tool.slug ?? tool.id}`}>
|
||||
<div class="tool" style={`--index: ${index + 1}`}>
|
||||
<div
|
||||
class="thumbnail"
|
||||
style={`background-image: url(${alias(
|
||||
"api",
|
||||
`/tools/${tool.id}/banners/thumbnail.webp`,
|
||||
)})`}
|
||||
/>
|
||||
<div class="entry" data-disabled={String(tool.disabled ?? false)}>
|
||||
<LinkI18nWrapper {locale} href={`/${tool.slug ?? tool.id}`}>
|
||||
<div class="tool" style={`--index: ${index + 1}`}>
|
||||
<div
|
||||
class="thumbnail"
|
||||
style={`background-image: url(${alias(
|
||||
"api",
|
||||
`/tools/${tool.id}/banners/thumbnail.webp`,
|
||||
)})`}
|
||||
/>
|
||||
|
||||
<Text size="major" weight="medium" className="name">
|
||||
{strings.tools[tool.id as keyof typeof strings.tools]}
|
||||
</Text>
|
||||
</div>
|
||||
</LinkI18nWrapper>
|
||||
<Text size="major" weight="medium" className="name">
|
||||
{strings.tools[tool.id as keyof typeof strings.tools]}
|
||||
</Text>
|
||||
</div>
|
||||
</LinkI18nWrapper>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,12 +2,38 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
@property --scroller-curtains-x-start {
|
||||
syntax: "<number>";
|
||||
inherits: false;
|
||||
initial-value: 0;
|
||||
}
|
||||
|
||||
@property --scroller-curtains-x-end {
|
||||
syntax: "<number>";
|
||||
inherits: false;
|
||||
initial-value: 0;
|
||||
}
|
||||
|
||||
@property --scroller-curtains-y-start {
|
||||
syntax: "<number>";
|
||||
inherits: false;
|
||||
initial-value: 0;
|
||||
}
|
||||
|
||||
@property --scroller-curtains-y-end {
|
||||
syntax: "<number>";
|
||||
inherits: false;
|
||||
initial-value: 0;
|
||||
}
|
||||
|
||||
.target {
|
||||
--scroller-curtains-size: min(25%, var(--space-6));
|
||||
--scroller-curtains-x-start: 0;
|
||||
--scroller-curtains-x-end: 0;
|
||||
--scroller-curtains-y-start: 0;
|
||||
--scroller-curtains-y-end: 0;
|
||||
|
||||
/* Registered above so the fades ease in and out instead of snapping */
|
||||
transition-property:
|
||||
--scroller-curtains-x-start, --scroller-curtains-x-end,
|
||||
--scroller-curtains-y-start, --scroller-curtains-y-end;
|
||||
transition-duration: var(--duration-brief);
|
||||
|
||||
/* Masks the element's own box, so the fade stays put while the content scrolls under it */
|
||||
mask-image:
|
||||
|
||||
@@ -5,4 +5,9 @@
|
||||
&[data-overflow="true"] {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* The last section fills the leftover page height, so empty states can center in it */
|
||||
&:last-child {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
@@ -13,11 +13,12 @@ const { centered } = Astro.props;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-6);
|
||||
gap: var(--page-padding);
|
||||
|
||||
padding: 0 var(--page-padding) var(--page-padding);
|
||||
|
||||
&[data-centered="true"] {
|
||||
gap: var(--space-6);
|
||||
padding-inline: max(
|
||||
var(--page-padding),
|
||||
(100% - var(--page-width)) / 2
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
&[data-compact="true"] {
|
||||
--image-height: 4rem;
|
||||
|
||||
/* Pinned so long names ellipsize instead of widening the card */
|
||||
width: var(--min-tank-card-size);
|
||||
}
|
||||
|
||||
.image-wrapper {
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
&[data-compact="true"] {
|
||||
--image-height: 4rem;
|
||||
|
||||
width: var(--min-tank-card-size);
|
||||
|
||||
.image-wrapper {
|
||||
background-size: auto 75%;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
.no-results {
|
||||
flex: 1;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
@@ -12,14 +12,7 @@ export function TankSearchNoResults({ type = "filters" }: NoResultsProps) {
|
||||
const strings = useStrings();
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles["no-results"]}
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<div className={styles["no-results"]}>
|
||||
<Text lowContrast>
|
||||
{strings.website.common.tank_search.no_tanks_found.body}{" "}
|
||||
<Link
|
||||
|
||||
Reference in new issue
Block a user