Zmiany w modalach
This commit is contained in:
@@ -133,7 +133,7 @@ function JamboxPackageCard({ pkg, onShowChannels, onConfigureAddons }) {
|
|||||||
const hasPrice = basePrice != null;
|
const hasPrice = basePrice != null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="f-card">
|
<div class="f-card" id={`pkg-${pkg.id}`} data-pkgid={pkg.id}>
|
||||||
<div class="f-card-header">
|
<div class="f-card-header">
|
||||||
<div class="f-card-name">{pkg.name}</div>
|
<div class="f-card-name">{pkg.name}</div>
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,17 @@ export default function JamboxChannelsSearch() {
|
|||||||
return `Znaleziono: ${items.length}`;
|
return `Znaleziono: ${items.length}`;
|
||||||
}, [q, loading, err, items]);
|
}, [q, loading, err, items]);
|
||||||
|
|
||||||
|
function scrollToPackage(packageId) {
|
||||||
|
const el = document.getElementById(`pkg-${packageId}`);
|
||||||
|
if (!el) return;
|
||||||
|
|
||||||
|
el.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||||
|
|
||||||
|
el.classList.add("is-target");
|
||||||
|
setTimeout(() => el.classList.remove("is-target"), 1200);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="fuz-chsearch">
|
<div class="fuz-chsearch">
|
||||||
<h1 class="f-section-title">Wyszukiwanie kanałów w pakietach telewizji</h1>
|
<h1 class="f-section-title">Wyszukiwanie kanałów w pakietach telewizji</h1>
|
||||||
@@ -114,11 +125,21 @@ export default function JamboxChannelsSearch() {
|
|||||||
<div class="fuz-chsearch__packages">
|
<div class="fuz-chsearch__packages">
|
||||||
Dostępny w:
|
Dostępny w:
|
||||||
{c.packages.map((p, i) => (
|
{c.packages.map((p, i) => (
|
||||||
<span class="fuz-chsearch__pkg" key={p.id}>
|
// <span class="fuz-chsearch__pkg" key={p.id}>
|
||||||
|
// {p.name}{" "}
|
||||||
|
// <span class="fuz-chsearch__pkgnum">(kanał {p.number})</span>
|
||||||
|
// {i < c.packages.length - 1 ? ", " : ""}
|
||||||
|
// </span>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="fuz-chsearch__pkg"
|
||||||
|
key={p.id}
|
||||||
|
onClick={() => scrollToPackage(p.id)}
|
||||||
|
>
|
||||||
{p.name}{" "}
|
{p.name}{" "}
|
||||||
<span class="fuz-chsearch__pkgnum">(kanał {p.number})</span>
|
<span class="fuz-chsearch__pkgnum">(kanał {p.number})</span>
|
||||||
{i < c.packages.length - 1 ? ", " : ""}
|
{i < c.packages.length - 1 ? ", " : ""}
|
||||||
</span>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -323,4 +323,24 @@ obszar ze scrollem wewnątrz modala
|
|||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.f-card.is-target {
|
||||||
|
outline: 2px solid rgba(59, 130, 246, 0.55);
|
||||||
|
/* var(--f-link); */
|
||||||
|
outline-offset: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fuz-chsearch__pkg {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
font: inherit;
|
||||||
|
color: var(--f-link, var(--f-link));
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fuz-chsearch__pkg:hover {
|
||||||
|
text-decoration-thickness: 2px;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user