Commit Graph

450 Commits

Author SHA1 Message Date
jordi fita mas ebcc2a017f Show zones in campground map by default if requested by query parameters
This is to be able to link from the booking form, with a link under the
area preferences, and show the zones layer, that is what customers most
certainly want to see at that point.
2024-02-04 03:43:00 +01:00
jordi fita mas 2a5b6df8cf Emit the input event when changing departure date
It is necessary to detect the change using AlpineJS, for instance.
2024-02-03 03:22:25 +01:00
jordi fita mas cabab93aa9 Remove redundant overflow-x from body 2024-02-03 01:51:36 +01:00
jordi fita mas 8d08a78d4c Add titles to credit card logos in booking page
No need to translated them: they are proper names.
2024-02-03 01:41:44 +01:00
jordi fita mas 1491e975c2 Better control of scroll snap for calendar months on mobile
It is not a problem in desktop, because there is no scroll bar, but in
mobile you can scroll with touch, and i need the months to snap to the
start for the next and previous buttons to work.
2024-02-03 01:32:07 +01:00
jordi fita mas 244cbeddac Avoid horizontal scroll due to slick’s right margin
I can use overflow for that in most sizes, but on mobile the buttons
are outside the overflow and are not visible, thus have to revert it
and then remove the right margin to avoid the extra space.  Since on
mobile we only show a single slide at a time, the lack of margin is not
noticeable.
2024-02-03 01:11:21 +01:00
jordi fita mas de03443c25 Replace + with 00 to the address in the bottom, too
Customer requested it
2024-02-03 01:04:25 +01:00
jordi fita mas daf6326652 Change the footer to a single column in table, rather than on mobile
Otherwise, the four columns are very difficult to read, and cause
horizontal overflow.
2024-02-03 01:03:08 +01:00
jordi fita mas 593004d0c9 Remove redundant right margin form slick list on mobile 2024-02-03 00:33:24 +01:00
jordi fita mas 63e33fa253 Fix booking field inside campsite’s page on mobile 2024-02-03 00:29:37 +01:00
jordi fita mas 4c4b9d8d02 Make submenus collapsible on mobile too
Had to change the link to the current language version of the page by a
button, to prevent following a link when trying to expand the submenu.

At first i did this with an `onclick="return false"` bullshit, but the
link was the wrong thing to do here, and it was there only to satisfy
Google et al. They will have to with the links in head.

Also made the link and buttons larger to make it easier to hit them with
finger.
2024-02-03 00:16:29 +01:00
jordi fita mas 313e5aa6c5 Use company trade name variable in copyright statement 2024-02-02 21:58:18 +01:00
jordi fita mas 64d94b5f35 Align text in surroundings on mobile 2024-02-02 21:40:41 +01:00
jordi fita mas 43505fecbd Reduce outside activities’ h3 bottom margin on mobile 2024-02-02 21:37:56 +01:00
jordi fita mas b6044a7d4a Advance min dates of departure and arrival one day
Apparently, expecting people to book at least one day in advance is
being “too optimistic”.
2024-02-02 02:59:41 +01:00
jordi fita mas 97fb88cc02 Guard against departure date not having min and max night attributes 2024-02-02 02:55:09 +01:00
jordi fita mas 33a1f0f4e2 Use Date.getTime instead of relaying on implicit conversion
Otherwise, fucking IntelliJ does not shut up about imaginary problems.
2024-02-02 02:51:38 +01:00
jordi fita mas 28adeb38fc Half Leaflet’s zoom delta
With a map the size of ours, it always seemed like things were either
too zoomed out or too zoomed in.
2024-02-02 02:46:59 +01:00
jordi fita mas 70eb007ddd Revert Leaflet’s maxBounds and its viscosity
They were commented out by error: when changing the SVG handling code,
had to “look for” a stray polygon that was outside the image’s bounded
area.
2024-02-02 02:45:47 +01:00
oriol carbonell pujolàs fcbbc5c22a Fix sizes of the campground map and its legend 2024-02-02 02:39:55 +01:00
oriol carbonell pujolàs 5e053034a5 Move carousel arrows out of the way on mobile
Carrousels have a first slide that is mostly text without any background color,
and on mobile the arrows looked like where “erasing” the text.
2024-02-02 02:38:31 +01:00
oriol carbonell pujolàs 0b93a4c989 Remove order from slick-list
It was there from when the carousel was a flex; no longer used
2024-02-02 02:37:53 +01:00
oriol carbonell pujolàs 91339bec8b Leave direction for home slides on mobile and increase bottom padding
The change to column was from when the button and the text were both on the slide,
but now it only made the text stick to the top, which is the reverse of what we
wanted, but had to increase the space between the text and the booking button.
2024-02-02 02:30:54 +01:00
oriol carbonell pujolàs 61dbe5cf38 Set top-most address in a column with mobile screens 2024-02-02 02:28:45 +01:00
oriol carbonell pujolàs 18adbac5c3 Remove sticky position from header with mobile screens
Too much vertical space used just for that, otherwise.
2024-02-02 02:27:23 +01:00
jordi fita mas 4adad7fa7d Replace min_nights from campsite_type_costs to range in campsite_type
Customer told us that the minimum number of nights is per campsite type,
not per season.  And he wants this, along with the maximum number of
nights, in order to limit the range of departure dates that guests can
choose when booking.
2024-01-31 23:06:45 +01:00
jordi fita mas 4f04d973c2 Dynamically set min and max to arrival and departure date inputs
The departure must be at list one day after the arrival, but no longer
than seven, due to campground’s policy.
2024-01-31 20:00:38 +01:00
jordi fita mas 51540151ff Refactor ISO date, and datestamp format in constant 2024-01-31 19:58:46 +01:00
jordi fita mas a3040cb195 Use var(--accent) for zone color 2024-01-31 15:37:03 +01:00
jordi fita mas 516a9d9be8 Fix the font-size of #campground_map
Leaflet assumes that 1rem = 16px, and sets its wrapper’s font size to
.75rem to get 12px.  However, in our CSS 1rem = 10px.
2024-01-31 15:13:35 +01:00
jordi fita mas d198bad91b Add a controlled layer group for the zones on the map
It seems that we have to highlight the map zones too.  On the previous
website, they had a mouseover effect that displayed a tooltip, but here
we can not do that because we use the mouse to select accommodations.

This is just a test to see whether Oriol likes how it is shown, thus the
red is likely to change to something else more pleasant to look at.
2024-01-31 15:12:11 +01:00
jordi fita mas 8c9308f1d3 Do not bring layer to front when highlighting a map accommodation
This does nothing but bring useless work to the browser, that has to
move the SVG group to the top for nothing, as the accommodations do not
overlap anything else.
2024-01-31 15:02:20 +01:00
jordi fita mas 6f78ad944f Do not set campground_map’s height via JavaScript
It already has a height set via CSS; no need to overwrite it.
2024-01-31 15:01:13 +01:00
jordi fita mas ca7d343810 Do not freak out just because the is no blooding slogan 2024-01-30 12:24:49 +01:00
jordi fita mas 036c3bc9ce Do not panic is there is no home slogan yet 2024-01-29 19:58:05 +01:00
oriol carbonell pujolàs 33100a6149 Adjust accomodation on home to show seven in a grid 2024-01-29 19:43:07 +01:00
jordi fita mas 1de4042d91 Handle path and rects in map
There are many installations on the map that are drawn with rect
instead of path.  I could transform them with Inkscape, but i finally
found out about DOMMatrix, that helps me a lot to convert points, as
it can parse the values of the `transform` attribute.

I also saw that SVGGraphicElements has getCTM() and getScreenCTM(), but
neither of them worked for me: the resulting transformation was “shrunk”
on the map (i.e., like it was scaled down).
2024-01-29 17:57:14 +01:00
jordi fita mas d5b61e7283 Translate map’s legend 2024-01-29 14:37:27 +01:00
jordi fita mas e320636ce1 Replace <div>s in legend with more semantically meaningful elements 2024-01-29 14:02:31 +01:00
oriol carbonell pujolàs 72f9e25140 Add map legend 2024-01-29 13:42:24 +01:00
oriol carbonell pujolàs c7670a3e10 Add IDs to amenities in map
* cr_camp_esports
 * cr_botiga
 * cr_bar
 * cr_recepcio
 * cr_edifici_serveis
 * cr_piscina
 * cr_parc
2024-01-29 13:41:14 +01:00
jordi fita mas 69415cadd6 Add a sample reservation legal text to the demo 2024-01-29 03:50:59 +01:00
jordi fita mas 23be6ff26c Add ask_zone_preferences and overflow_allowed to campsite_type
The “overflow” is for when people want to book plots for more guests
than is permitted, which the system would need to add a new plot to the
“shopping cart”, as it were; not implemented yet.

The ask zone preferences is to whether show the corresponding input on
the booking form, that it was done implicitly when the campsite type had
options, because up until now it was only for plots, but it is no longer
the case, thus i need to know when to show it; now it is explicit.
2024-01-29 03:38:11 +01:00
jordi fita mas a31f5038db Do not include inactive campsite types in booking form 2024-01-29 03:03:20 +01:00
jordi fita mas 2ec363ca63 Tag database with v2 2024-01-29 02:52:52 +01:00
jordi fita mas f5311e8b6f Add Guix package definition 2024-01-28 18:12:38 +01:00
jordi fita mas eeaa3b415e Add amenities section and public page
This is more or less the same as the campsites, as public information
goes, but for buildings and other amenities that the camping provides
that are not campsites.
2024-01-27 22:51:41 +01:00
oriol carbonell pujolàs d738603fc5 Merge branch 'master' of ssh://dev.tandem.ws:2222/tandem/camper 2024-01-27 16:17:20 +01:00
oriol carbonell pujolàs 49b5af6323 Update campground’s map icons to use Font Awesome 2024-01-27 16:16:54 +01:00
jordi fita mas 16b7a0879a Fix demo calls to add_campsite_carousel_slide and add_campsite_feature 2024-01-26 23:55:05 +01:00