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 {
|
#navbar-fine {
|
||||||
--icon-size: 1.5rem;
|
--icon-size: 1.5rem;
|
||||||
--padding: var(--space-4);
|
--padding: var(--space-4);
|
||||||
--content-inset: max(
|
--content-inset: max(var(--page-padding), (100% - var(--page-width)) / 2);
|
||||||
var(--page-padding),
|
|
||||||
(100% - var(--page-width)) / 2
|
|
||||||
);
|
|
||||||
|
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@@ -146,6 +143,15 @@ const groups = toolGroups.map((group) => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-3);
|
gap: var(--space-3);
|
||||||
|
|
||||||
|
.entry[data-disabled="true"] {
|
||||||
|
opacity: calc(1 / 4);
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
|
.tool {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tool {
|
.tool {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -340,21 +346,23 @@ const groups = toolGroups.map((group) => {
|
|||||||
|
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
{group.tools.map((tool, index) => (
|
{group.tools.map((tool, index) => (
|
||||||
<LinkI18nWrapper {locale} href={`/${tool.slug ?? tool.id}`}>
|
<div class="entry" data-disabled={String(tool.disabled ?? false)}>
|
||||||
<div class="tool" style={`--index: ${index + 1}`}>
|
<LinkI18nWrapper {locale} href={`/${tool.slug ?? tool.id}`}>
|
||||||
<div
|
<div class="tool" style={`--index: ${index + 1}`}>
|
||||||
class="thumbnail"
|
<div
|
||||||
style={`background-image: url(${alias(
|
class="thumbnail"
|
||||||
"api",
|
style={`background-image: url(${alias(
|
||||||
`/tools/${tool.id}/banners/thumbnail.webp`,
|
"api",
|
||||||
)})`}
|
`/tools/${tool.id}/banners/thumbnail.webp`,
|
||||||
/>
|
)})`}
|
||||||
|
/>
|
||||||
|
|
||||||
<Text size="major" weight="medium" className="name">
|
<Text size="major" weight="medium" className="name">
|
||||||
{strings.tools[tool.id as keyof typeof strings.tools]}
|
{strings.tools[tool.id as keyof typeof strings.tools]}
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
</LinkI18nWrapper>
|
</LinkI18nWrapper>
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,12 +2,38 @@
|
|||||||
display: none;
|
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 {
|
.target {
|
||||||
--scroller-curtains-size: min(25%, var(--space-6));
|
--scroller-curtains-size: min(25%, var(--space-6));
|
||||||
--scroller-curtains-x-start: 0;
|
|
||||||
--scroller-curtains-x-end: 0;
|
/* Registered above so the fades ease in and out instead of snapping */
|
||||||
--scroller-curtains-y-start: 0;
|
transition-property:
|
||||||
--scroller-curtains-y-end: 0;
|
--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 */
|
/* Masks the element's own box, so the fade stays put while the content scrolls under it */
|
||||||
mask-image:
|
mask-image:
|
||||||
|
|||||||
@@ -5,4 +5,9 @@
|
|||||||
&[data-overflow="true"] {
|
&[data-overflow="true"] {
|
||||||
overflow-x: auto;
|
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;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-6);
|
gap: var(--page-padding);
|
||||||
|
|
||||||
padding: 0 var(--page-padding) var(--page-padding);
|
padding: 0 var(--page-padding) var(--page-padding);
|
||||||
|
|
||||||
&[data-centered="true"] {
|
&[data-centered="true"] {
|
||||||
|
gap: var(--space-6);
|
||||||
padding-inline: max(
|
padding-inline: max(
|
||||||
var(--page-padding),
|
var(--page-padding),
|
||||||
(100% - var(--page-width)) / 2
|
(100% - var(--page-width)) / 2
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
&[data-compact="true"] {
|
&[data-compact="true"] {
|
||||||
--image-height: 4rem;
|
--image-height: 4rem;
|
||||||
|
|
||||||
|
/* Pinned so long names ellipsize instead of widening the card */
|
||||||
|
width: var(--min-tank-card-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-wrapper {
|
.image-wrapper {
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
&[data-compact="true"] {
|
&[data-compact="true"] {
|
||||||
--image-height: 4rem;
|
--image-height: 4rem;
|
||||||
|
|
||||||
|
width: var(--min-tank-card-size);
|
||||||
|
|
||||||
.image-wrapper {
|
.image-wrapper {
|
||||||
background-size: auto 75%;
|
background-size: auto 75%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
.no-results {
|
.no-results {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
@@ -12,14 +12,7 @@ export function TankSearchNoResults({ type = "filters" }: NoResultsProps) {
|
|||||||
const strings = useStrings();
|
const strings = useStrings();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className={styles["no-results"]}>
|
||||||
className={styles["no-results"]}
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text lowContrast>
|
<Text lowContrast>
|
||||||
{strings.website.common.tank_search.no_tanks_found.body}{" "}
|
{strings.website.common.tank_search.no_tanks_found.body}{" "}
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
Reference in new issue
Block a user