feat: tour page photos-first layout, mobile booking bar; board 1 fixes
Tour page (boards 2 and 3):
- Replace the blurred 'Welcome to {city}' hero with a breadcrumb and a photo
gallery (1 large + 2, 'All N photos' opens the lightbox); the H1 title,
rating with review count and facts follow; booking card stays sticky
- Phones/tablets: swipeable photos, name before price, 2x2 facts, and a
fixed bottom bar with price + Check availability (vc-tour.css)
Board 1:
- Hide Viator internal tags ('Agent Low Quality Product'...) from the tour
category, listing filter and activities section (VC_Tags, tested)
- Listings: run the query filter late and set posts_per_archive_page so
pages show 12 tours as the count says
- Footer columns without a menu show default links (quick links, structure
cities, contact/about/faq) instead of empty headings
Plugin 1.9.5, theme 1.0.13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
175
viator-collector/assets/css/vc-tour.css
Normal file
175
viator-collector/assets/css/vc-tour.css
Normal file
@@ -0,0 +1,175 @@
|
||||
/* Single tour — top section (photos + booking card first) and the mobile
|
||||
booking bar. Hand-written, loaded after vc-design.css on tour pages only. */
|
||||
|
||||
/* No hero any more: the header turns solid (chrome.js) and the page starts
|
||||
with the breadcrumb. */
|
||||
.vc-app.vc-app .tour--top {
|
||||
padding-block-start: var(--sp-5);
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tour__crumbs {
|
||||
margin-block-end: var(--sp-3);
|
||||
color: var(--c-ink);
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tour__crumbs li[aria-current] {
|
||||
overflow: hidden;
|
||||
max-width: 28ch;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ---------- gallery: one large photo + two, the rest in the lightbox ---------- */
|
||||
.vc-app.vc-app .tgal {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
grid-template-rows: repeat(2, clamp(9rem, 6rem + 6vw, 12.5rem));
|
||||
gap: var(--sp-1);
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
aspect-ratio: auto;
|
||||
border-radius: var(--r-card);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal .tgal__main {
|
||||
grid-row: span 2;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal .tgal__extra {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal--few {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal--few .tgal__thumb {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal__all {
|
||||
position: absolute;
|
||||
right: var(--sp-2);
|
||||
bottom: var(--sp-2);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
padding: 0.5rem 0.875rem;
|
||||
border: 0;
|
||||
border-radius: var(--r-pill);
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
color: var(--c-ink);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ---------- title row under the photos ---------- */
|
||||
.vc-app.vc-app .tour--top .tour-head__title {
|
||||
font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tmeta__reviews {
|
||||
margin-inline-start: 0.25rem;
|
||||
font-weight: 500;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* ---------- mobile booking bar ---------- */
|
||||
.vc-app.vc-app .tbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 68.75rem) {
|
||||
/* The bar does the booking now: the full card moves below the content. */
|
||||
.vc-app.vc-app .tour--top .tour__aside {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tbar {
|
||||
position: fixed;
|
||||
inset: auto 0 0 0;
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-3);
|
||||
padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
|
||||
background: var(--c-white);
|
||||
box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tbar__price {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tbar__price span {
|
||||
font-size: 0.75rem;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tbar__price b {
|
||||
font-size: 1.375rem;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tbar__cta {
|
||||
background: var(--c-accent);
|
||||
color: var(--c-black);
|
||||
}
|
||||
|
||||
/* room for the bar so it never covers the footer */
|
||||
.vc-app.vc-single {
|
||||
padding-block-end: 5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 48rem) {
|
||||
/* Swipe through every photo; tap one (or the button) for the lightbox. */
|
||||
.vc-app.vc-app .tgal {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
scroll-snap-type: x mandatory;
|
||||
scrollbar-width: none;
|
||||
margin-inline: calc(var(--gutter) * -1);
|
||||
padding-inline: var(--gutter);
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vc-app.vc-app .tgal img,
|
||||
.vc-app.vc-app .tgal .tgal__extra,
|
||||
.vc-app.vc-app .tgal--few .tgal__thumb {
|
||||
display: block;
|
||||
flex: 0 0 88%;
|
||||
aspect-ratio: 4 / 3;
|
||||
scroll-snap-align: center;
|
||||
}
|
||||
|
||||
/* every photo is already in the swipe row */
|
||||
.vc-app.vc-app .tgal__all {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* the tour name is the page title right below — keep the trail short */
|
||||
.vc-app.vc-app .tour__crumbs li[aria-current] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Compact 2 × 2 facts instead of four stacked full-width cards. */
|
||||
.vc-app.vc-app .tour--top .facts {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@@ -138,6 +138,9 @@
|
||||
box.querySelector(".vc-lightbox__next").addEventListener("click", function () { show(idx + 1); });
|
||||
box.querySelector(".vc-lightbox__close").addEventListener("click", close);
|
||||
box.addEventListener("click", function (e) { if (e.target === box) close(); });
|
||||
/* tour page top gallery: "All N photos" opens at the first photo not on show */
|
||||
var allBtn = app.querySelector(".tgal__all");
|
||||
if (allBtn) allBtn.addEventListener("click", function () { open(Math.min(3, imgs.length - 1)); });
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (!box.classList.contains("is-open")) return;
|
||||
if (e.key === "Escape") close();
|
||||
|
||||
Reference in New Issue
Block a user