Files
landing_page/qdrant-landing/themes/qdrant/layouts/partials/steps-form.html
T
6935178dc4 New design (#79)
* remover open source title, added docker icon on hero banner

* buttons, fixes for mobile view

* code widget fix

* removed copying of text

* changed size and positioning of the docker icon, added a link to dockerhub, some styles for mobiles

* hid an installation section and an imapge on hero-banner for small mobile devices

* exchanged images

* fixed svg images

* tutorial button => demos button, svg optimisation

* removed background

* new colors, separated file for the header

* cleaned some redunant styles for the header

* more changes according to the new design

* fixed buttons animation, fixed the header on all pages for desktop

* mobile view for the header and the top banner

* changed the features section according to new design

* moved styles for the features section to the separated file, some fixes for mobile view

* reorganised lines in features-section.scss

* changes slides on the main page - desctop view

* added a file

* autoscroll, some fixes

* added an autoplay and a pause on mouseenter to the carousel on the home page

* more styles

* styles for articles section and subscribtion section

* styles for footer

* styles

* footer background

* fixes

* more fixes

* fixes for mobile devices - small sizes

* fixes for mobile devices - medium sizes

* update images

* some fixes for mobiles, changed stack section

* changed the second header (aka section title) according to new design

* WIP: added some webpack configuration for updating a way of vendors scripts usage, added new carousel

* replaced old slider to splidejs

* fix for the slider

* articles list page

* article - single page

* refactored main.scss, removed unused code from it and moved sections styles to separated files

* renamed and added some files, added fixes to breadcrumbs

* small changes in styles and layouts

* vertical sizes

* changes of styles and structure in articles and blog related files

* added mobile styles for articles and related pages, added sass function for converting px to rem

* temp picture

* changes in page title

* changed colors on old pages to the new design schema

* fixes

* deleted a file qdrant.css, moved styles to main.scss

* installed qdrant-page-search, for now without an actual api url

* added an actual api url

* WIP replacing owl carousel with splide on the surveys page

* updated page search, changed a way it's used

* fixes for footer

* changed common auto-container width, article font-size, made some fixes

* docs auto-sync

* narrow articles

* re-imported blog styles, because they are used in other places

* updated page-search

* optimized css loading

* replaced some images with webp format

* undo main img, changes in image usage

* fixes

* fixed slider cursor, logos in the stack section, cards on solutions page, prices page

* changed font-size of a form title on the subscription page

* optimization

* wip: added bash script for article preview images processing

* bash script for article preview images processing

* updated images for articles

* two article card in the row, without buttons (#85)

* fixes for old pages

* fixes for benchmarks pages

* added some info to the readme

* upd case studies

* changed form placeholder color and margin between buttons in the header

* short solution texts + link to benchmarks on main

* pricing page fixes

* short text in slider

* article cards borders, slider height, contact us

* blockquote

* move external articles to the landing

* more narrow buttons in the header, no buttons on the solutions page

* demo page fixes, removed target blank from the benchmarks link on the main page

* slower speed of the carousel on the main page

* content changes + seach upd

* changed title, readme

* added translate3d(0, 0, 0) to buttons for safari animations

* fixing buttons in safari (maybe)

* fixing buttons in safari (maybe)

* fixing buttons in safari

* fixes for mobiles

* fixes

* docs auto-sync

* neural -> vector

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
Co-authored-by: qdrant <qdrant@users.noreply.github.com>
2022-10-31 14:21:21 +01:00

158 lines
6.9 KiB
HTML

{{ $seed := "foo" }}
{{ $random := delimit (shuffle (split (md5 $seed) "" )) "" }}
<!--suppress XmlDuplicatedId -->
<div class="steps-form row">
<form class="steps-form__form col-12 col-md-10 col-lg-6 splide" name="cloud-request"
method="POST" id="{{ $random }}" novalidate data-netlify="true"
data-splide='{
"direction": "ttb",
"height": "70vh",
"autoplay": false,
"rewind": false,
"perPage": 1
}'>
<div class="spinner-border steps-form__spinner" role="status" style="width: 5rem; height: 5rem;">
<span class="sr-only">Loading...</span>
</div>
<section class="splide__track">
<ul class="splide__list">
{{ range .Params.Form }}
<li class="steps-form__group form-group splide__slide" data-step="{{ .id }}">
<label class="steps-form__label steps-form__label_big" for="{{ .id }}{{ .name }}">
{{ if .header }} <h2>{{ .header | safeHTML }}</h2> {{ end }}
{{ .label | safeHTML }}
{{ if eq .type "radio"}}(Choose one){{ end }}
{{ if eq .type "checkbox"}}(Choose as many as you want){{ end }}
</label>
{{ if eq .type "select" }}
<select class="steps-form__input custom-select" id="{{ .id }}{{ .name }}" name="{{ .name }}">
<option selected>Open this select menu</option>
{{ range .options }}
<option value="{{ . }}">{{ . }}</option>
{{ end }}
</select>
{{ else if or (eq .type "radio") (eq .type "checkbox")}}
{{ $input := . }}
<div class="checkbox mb-5">
{{ range .options }}
<input class="checkbox__input" type="{{ $input.type }}" name="{{ $input.name }}"
id="{{ $input.id }}{{ $input.name }}{{ . }}"
value="{{ . }}">
<label class="steps-form__label checkbox__label" for="{{ $input.id }}{{ $input.name }}{{ . }}">
{{ . }}</label>
{{ end }}
</div>
{{ else if eq .type "text"}}
<textarea class="form-control steps-form__input" id="{{ .id }}{{ .name }}" name="{{ .name }}"
rows="{{ .rows }}" {{ if .required }}required{{ end }} placeholder="{{ .placeholder }}"></textarea>
{{ else }}
<input type="{{ .type }}" name="{{ .name }}"
class="steps-form__input form-control" id="{{ .id }}{{ .name }}"
{{ if .required }}required{{ end }} placeholder="{{ .placeholder }}">
<div class="invalid-feedback">
Please provide a valid {{ .type }}.
</div>
{{ end }}
</li>
{{ end }}
<li class="steps-form__group form-group splide__slide" data-step="{{ len .Params.Form }}">
<p class="steps-form__label steps-form__label_big">Ta-da! We'll happily be in touch with you very soon! 🥳</p>
<div class="checkbox">
<input class="checkbox__input" type="checkbox" name="termsConsent"
id="termsConsent" required>
<label class="steps-form__label checkbox__label d-flex align-items-center mb-2" for="termsConsent">
<span>I am consent to all of
<a href="/legal/terms_and_conditions/" target="_blank">terms and conditions</a>
and you agree to be contacted again for your onboarding.*</span>
</label>
<div class="invalid-feedback">
You must accept the terms and conditions
</div>
</div>
<button type="submit" class="align-self-start btn btn-style-four btn-style-four_reversed
btn-style-four_big btn-style-four_border mt-4">
<span class="text">Submit</span>
</button>
</li>
</ul>
</section>
<div class="splide__arrows steps-form__arrows">
<div>
<button class="splide__arrow splide__arrow--prev btn btn-style-four btn-style-four_small btn-style-four_border" type="button">
<span class="text">Prev</span>
</button>
</div>
<div>
<button class="splide__arrow splide__arrow--next btn btn-style-four btn-style-four_small btn-style-four_border" type="button">
<span class="text">Next</span>
</button>
</div>
</div>
</form>
</div>
<script>
// disabling form submissions if there are invalid fields
(function() {
'use strict';
let splide;
function checkForm(form)
{
if(!form.termsConsent.checked) {
alert("Please indicate that you accept the Terms and Conditions");
form.termsConsent.focus();
return false;
}
return true;
}
document.addEventListener('splideIsReady', e => {
console.log('i got event', e)
splide = e.detail;
console.log(splide)
document.getElementsByClassName('spinner-border')[0].remove();
});
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
const form = document.getElementById({{ $random }});
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
const invalidFieldNames = Array.from(form.querySelectorAll(':invalid')).map(field => field)
const nextInvalid = $(invalidFieldNames[0]).closest('[data-step]').data('step');
if (splide) {
console.log('splide goes to', nextInvalid)
splide.go(nextInvalid);
}
}
form.classList.add('was-validated');
/**
* form.querySelectorAll('.form-group').forEach(input => {
console.log(input)
input.addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
event.preventDefault();
stepsFormCarousel.trigger('next.owl.carousel');
}
});
}); */
});
}, false);
})();
</script>