Compare commits
5 Commits
19092a6325
...
dcb2eadbbf
Author | SHA1 | Date |
---|---|---|
rayelliott | dcb2eadbbf | |
rayelliott | 929a1dd43c | |
rayelliott | a95d4edeb5 | |
rayelliott | 90cffde075 | |
rayelliott | d560b567a8 |
|
@ -3,3 +3,4 @@ assets
|
||||||
wp-includes/
|
wp-includes/
|
||||||
wp-includes
|
wp-includes
|
||||||
Session.vim
|
Session.vim
|
||||||
|
.tags*
|
||||||
|
|
|
@ -12,9 +12,55 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function roomwithavw_custom_add_scripts() {
|
function roomwithavw_custom_add_scripts() {
|
||||||
wp_register_script( 'roomwithavw-custom-script', plugins_url( 'assets/js/index.js', __FILE__ ), array(), '1.0', true );
|
wp_register_script( 'roomwithavw-custom-script', plugins_url( 'assets/js/index.js', __FILE__ ), ['jquery-ui-datepicker'], '1.0', true );
|
||||||
wp_enqueue_script( 'roomwithavw-custom-script' );
|
wp_enqueue_script( 'roomwithavw-custom-script' );
|
||||||
|
|
||||||
wp_enqueue_style( 'roomwithavw-custom-styles', plugins_url( 'assets/css/style.css', __FILE__ ), '', '1.0' );
|
wp_enqueue_style( 'roomwithavw-custom-styles', plugins_url( 'assets/css/style.css', __FILE__ ), '', '1.0' );
|
||||||
}
|
}
|
||||||
add_action( 'wp_enqueue_scripts', 'roomwithavw_custom_add_scripts' );
|
add_action( 'wp_enqueue_scripts', 'roomwithavw_custom_add_scripts' );
|
||||||
|
|
||||||
|
function roomwithavw_custom_enquiry_form() {
|
||||||
|
?>
|
||||||
|
<p class="lead">
|
||||||
|
We are family run business that enjoys liaising with our clients to ensure we provide the best experience. For this reason, unlike regular camper van hire companies, we are not using an online calendar booking system as we believe it takes away from the personal touch we strive to maintain.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="lead">
|
||||||
|
Fill in the form below and one of our team will be in touch with you shortly.
|
||||||
|
</p>
|
||||||
|
<div class="enquiry-form wpcf7" role="form" dir="ltr">
|
||||||
|
<div class="screen-reader-response" aria-live="polite"></div>
|
||||||
|
|
||||||
|
<!-- <form action="https://mailthis.to/mailthis@gabbaell.co.uk" method="post" class="wpcf7-form" novalidate="novalidate"> -->
|
||||||
|
<form action="" method="post" id="rwavw-enquiry-form" class="wpcf7-form" novalidate="novalidate">
|
||||||
|
<p><label> Forename (required)<br />
|
||||||
|
<span class="wpcf7-form-control-wrap forename"><input type="text" name="forename" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span> </label></p>
|
||||||
|
<p><label> Surname (required)<br />
|
||||||
|
<span class="wpcf7-form-control-wrap surname"><input type="text" name="surname" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span> </label></p>
|
||||||
|
|
||||||
|
<p class="dates">
|
||||||
|
<label> Booking Date<br />
|
||||||
|
<span class="wpcf7-form-control-wrap booking-date">
|
||||||
|
<input type="date" name="booking-date" value="" class="rwavw-datepicker booking-date wpcf7-form-control wpcf7-date wpcf7-validates-as-date" aria-invalid="false" />
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<label> Number of Days<br />
|
||||||
|
<span class="wpcf7-form-control-wrap day-count">
|
||||||
|
<input type="number" name="day-count" value="3" class="days wpcf7-form-control wpcf7-number wpcf7-validates-as-number" aria-invalid="false" />
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><label> Your Email (required)<br />
|
||||||
|
<span class="wpcf7-form-control-wrap replyto"><input type="email" name="_replyto" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false" /></span> </label></p>
|
||||||
|
<p><input type="submit" value="Send" class="wpcf7-form-control wpcf7-submit" /></p>
|
||||||
|
<div class="wpcf7-response-output wpcf7-display-none" aria-hidden="true"></div>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
add_shortcode('rwavw-capsule-enquiry', 'roomwithavw_custom_enquiry_form');
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
(function() {
|
(function() {
|
||||||
const observeSelector = '.js-onscreen';
|
const observeSelector = '.js-onscreen';
|
||||||
|
// TODO - will the form ID ever change?
|
||||||
const observedNodes = document.querySelectorAll(observeSelector);
|
const observedNodes = document.querySelectorAll(observeSelector);
|
||||||
let observedCount = 0;
|
let observedCount = 0;
|
||||||
let observedTotal = !!observeSelector ? observedNodes.length : 0;
|
let observedTotal = !!observeSelector ? observedNodes.length : 0;
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', event => {
|
window.addEventListener('DOMContentLoaded', event => {
|
||||||
|
// TODO this selector needs to be robuts
|
||||||
|
const enquiryForm = document.querySelector('#wpcf7-f1041-o1 > form');
|
||||||
const intersectionSupport = !!window.IntersectionObserver;
|
const intersectionSupport = !!window.IntersectionObserver;
|
||||||
|
|
||||||
function updateObservedCount() {
|
function updateObservedCount() {
|
||||||
|
@ -24,6 +27,10 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enquiryForm) {
|
||||||
|
enquiryForm.action = '__URL__';
|
||||||
|
}
|
||||||
|
|
||||||
document.body.classList.add('rwavw-custom');
|
document.body.classList.add('rwavw-custom');
|
||||||
|
|
||||||
observedNodes.forEach(el => {
|
observedNodes.forEach(el => {
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
body.rwavw-custom {
|
||||||
|
.contact-us-body {
|
||||||
|
|
||||||
|
p.lead {
|
||||||
|
margin: 48px 0;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.5;
|
||||||
|
letter-spacing: initial;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.wpcf7 {
|
||||||
|
max-width: 90ch;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wpcf7 {
|
||||||
|
padding: 64px 48px 92px;
|
||||||
|
color: #4a5568;
|
||||||
|
background-color: rgba(#fff, 1);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 64px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: initial;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
textarea {
|
||||||
|
border-radius: 3px;
|
||||||
|
border-color: #cbd5e0;
|
||||||
|
background-color: #f7fafc;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: rgba(#000, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input.booking-date {
|
||||||
|
width: 21ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.days {
|
||||||
|
width: 21ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wpcf7-form-control-wrap {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wpcf7-submit {
|
||||||
|
height: auto;
|
||||||
|
border: 3px solid currentColor;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: inherit;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 10px 24px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
body.rwavw-custom {
|
||||||
|
@media (min-width: 766.98px) {
|
||||||
|
#faq > .layout-boxed {
|
||||||
|
position: relative;
|
||||||
|
bottom: 18rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper-content > .layers-pro-accordion {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
|
.accordion-row {
|
||||||
|
position: relative;
|
||||||
|
z-index: 150;
|
||||||
|
max-width: 90ch;
|
||||||
|
|
||||||
|
padding: 32px 8px;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 2px 3px 4px 0 rgba(#000, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-button {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #4a5568;
|
||||||
|
opacity: 0.8;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content p {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #4a5568;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 766.98px) {
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
|
||||||
|
.accordion-row {
|
||||||
|
padding: 64px 48px;
|
||||||
|
margin-top: -46rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,3 +1,6 @@
|
||||||
|
@import "contact";
|
||||||
|
@import "faq";
|
||||||
|
|
||||||
body.rwavw-custom {
|
body.rwavw-custom {
|
||||||
#top-nav .logo {
|
#top-nav .logo {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
@ -38,59 +41,4 @@ body.rwavw-custom {
|
||||||
|
|
||||||
background-color: rgba(#000, 0.9);
|
background-color: rgba(#000, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact-us-body {
|
|
||||||
|
|
||||||
p.lead {
|
|
||||||
margin: 48px 0;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 1.5;
|
|
||||||
letter-spacing: initial;
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpcf7 {
|
|
||||||
padding: 64px 48px 92px;
|
|
||||||
color: #4a5568;
|
|
||||||
background-color: rgba(#fff, 1);
|
|
||||||
border-radius: 3px;
|
|
||||||
margin-top: 64px;
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
input,
|
|
||||||
textarea {
|
|
||||||
border-radius: 3px;
|
|
||||||
border-color: #cbd5e0;
|
|
||||||
background-color: #f7fafc;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: rgba(#000, 0.8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpcf7-form-control-wrap {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpcf7-submit {
|
|
||||||
height: auto;
|
|
||||||
border: 3px solid currentColor;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: inherit;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
padding: 10px 24px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -f '.tags-external' ] ; then rm .tags-external; fi
|
||||||
|
ctags -R -o .tags-external -a ./wp-includes
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ctags -R -o .tags --exclude='node_modules/*' --exclude='wp-includes' *
|
Loading…
Reference in New Issue