Files
landing_page/qdrant-landing/themes/qdrant/static/js/script.js
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

239 lines
6.7 KiB
JavaScript

(function ($) {
"use strict";
//Hide Loading Box (Preloader)
function handlePreloader() {
if ($('.preloader').length) {
$('.preloader').delay(200).fadeOut(500);
}
}
//Submenu Dropdown Toggle
if ($('.main-header li.dropdown ul').length) {
$('.main-header li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>');
//Dropdown Button
$('.main-header li.dropdown .dropdown-btn').on('click', function () {
$(this).prev('ul').slideToggle(500);
});
//Disable dropdown parent link
$('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function (e) {
e.preventDefault();
});
}
//Update Header Style and Scroll to Top
function headerStyle() {
if ($('.main-header').length) {
var windowpos = $(window).scrollTop();
var siteHeader = $('.main-sticky-header');
var scrollLink = $('.scroll-to-top');
var sticky_header = $('.main-sticky-header .sticky-header');
if (windowpos > 100) {
siteHeader.addClass('fixed-header');
sticky_header.addClass("animated slideInDown");
scrollLink.fadeIn(300);
} else {
siteHeader.removeClass('fixed-header');
sticky_header.removeClass("animated slideInDown");
scrollLink.fadeOut(300);
}
}
}
headerStyle();
//Hidden Sidebar
if ($('.hidden-bar').length) {
var hiddenBar = $('.hidden-bar');
var hiddenBarOpener = $('.nav-toggler');
var hiddenBarCloser = $('.hidden-bar-closer');
$('.hidden-bar-wrapper').mCustomScrollbar();
//Show Sidebar
hiddenBarOpener.on('click', function () {
hiddenBar.addClass('visible-sidebar');
});
//Hide Sidebar
hiddenBarCloser.on('click', function () {
hiddenBar.removeClass('visible-sidebar');
});
}
//Hidden Bar Menu Config
function hiddenBarMenuConfig() {
var menuWrap = $('.hidden-bar .side-menu');
// appending expander button
menuWrap.find('.dropdown').children('a').append(function () {
return '<button type="button" class="btn expander"><i class="icon fa fa-angle-right"></i></button>';
});
// hidding submenu
menuWrap.find('.dropdown').children('ul').hide();
// toggling child ul
menuWrap.find('.btn.expander').each(function () {
$(this).on('click', function () {
$(this).parent() // return parent of .btn.expander (a)
.parent() // return parent of a (li)
.children('ul').slideToggle();
// adding class to expander container
$(this).parent().toggleClass('current');
// toggling arrow of expander
$(this).find('i').toggleClass('fa-angle-right fa-angle-down');
return false;
});
});
}
hiddenBarMenuConfig();
//Mobile Nav Hide Show
if ($('.mobile-menu').length) {
$('.mobile-menu .menu-box').mCustomScrollbar();
var mobileMenuContent = $('.main-header .nav-outer .main-menu').html();
mobileMenuContent = $(mobileMenuContent).find('.fa-chevron-down').remove().end();
$('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent);
$('.sticky-header .main-menu').append(mobileMenuContent);
$('.mobile-menu li.dropdown .dropdown-btn').on('click', function () {
$(this).toggleClass('open');
$(this).prev('ul').slideToggle(500);
});
//Menu Toggle Btn
$('.mobile-nav-toggler').on('click', function () {
$('body').addClass('mobile-menu-visible');
});
//Menu Toggle Btn
$('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function () {
$('body').removeClass('mobile-menu-visible');
});
}
//Header Search
if ($('.search-box-outer').length) {
$('.search-box-outer').on('click', function () {
$('body').addClass('search-active');
});
$('.close-search').on('click', function () {
$('body').removeClass('search-active');
});
}
if ($('.paroller').length) {
$('.paroller').paroller({
factor: 0.2, // multiplier for scrolling speed and offset, +- values for direction control
factorLg: 0.4, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control
type: 'foreground', // background, foreground
direction: 'horizontal' // vertical, horizontal
});
}
//Event Countdown Timer
if ($('.time-countdown').length) {
$('.time-countdown').each(function () {
var $this = $(this), finalDate = $(this).data('countdown');
$this.countdown(finalDate, function (event) {
var $this = $(this).html(event.strftime('' + '<div class="counter-column"><span class="count">%D</span>Days</div> ' + '<div class="counter-column"><span class="count">%H</span>Hours</div> ' + '<div class="counter-column"><span class="count">%M</span>Minutes</div> ' + '<div class="counter-column"><span class="count">%S</span>Seconds</div>'));
});
});
}
//Custom Seclect Box
if ($('.custom-select-box').length) {
$('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow');
}
//Jquery Spinner / Quantity Spinner
if ($('.quantity-spinner').length) {
$("input.quantity-spinner").TouchSpin({
verticalbuttons: true
});
}
//Gallery Filters
if ($('.filter-list').length) {
$('.filter-list').mixItUp({});
}
//LightBox / Fancybox
if ($('.lightbox-image').length) {
$('.lightbox-image').fancybox({
openEffect: 'fade',
closeEffect: 'fade',
helpers: {
media: {}
}
});
}
//Contact Form Validation
if ($('#contact-form').length) {
$('#contact-form').validate({
rules: {
username: {
required: true
},
email: {
required: true,
email: true
},
phone: {
required: true
},
message: {
required: true
}
}
});
}
// Scroll to a Specific Div
if ($('.scroll-to-target').length) {
$(".scroll-to-target").on('click', function () {
var target = $(this).attr('data-target');
// animate
$('html, body').animate({
scrollTop: $(target).offset().top
}, 1500);
});
}
/* ==========================================================================
When document is Scrollig, do
========================================================================== */
$(window).on('scroll', function () {
headerStyle();
});
/* ==========================================================================
When document is loading, do
========================================================================== */
$(window).on('load', function () {
handlePreloader();
});
})(window.jQuery);