Commit 176c593d authored by Sergey's avatar Sergey

Main page and articles is done, make faq page

parent 434c52d4
This diff is collapsed.
This diff is collapsed.
<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M9.91667 1.04545L8.83333 0.0454545C8.79167 0 8.75 0 8.70833 0C8.66667 0 8.58333 0.0454545 8.58333 0.0909091L5 4.63636L1.45833 0.0909091C1.41667 0.0454545 1.375 0 1.29167 0C1.25 0 1.20833 0 1.16667 0.0454545L0.0833333 1.04545C0.0416667 1.09091 0 1.13636 0 1.22727C0 1.27273 0 1.31818 0.0416667 1.36364L4.83333 7.40909C4.875 7.45455 4.91667 7.5 5 7.5C5.04167 7.5 5.125 7.45455 5.16667 7.40909L9.95833 1.36364C10 1.31818 10 1.27273 10 1.22727C10 1.13636 9.95833 1.09091 9.91667 1.04545Z" fill="#262262"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="10" height="7.5" fill="white"/>
</clipPath>
</defs>
</svg>
This diff is collapsed.
console.log('hi');
import '../scss/style.scss';
// import { tns } from "../../node_modules/tiny-slider/src/tiny-slider";
// import tns from 'tiny-slider';
import 'owl.carousel';
// Вывод svg
var imgSvg = document.querySelectorAll('.img-svg');
for(var i = 0; i < imgSvg.length; i++)
......@@ -45,56 +45,8 @@ for(var i = 0; i < imgSvg.length; i++)
request.send();
}
// $('img.img-svg').each(function(){
// var $img = $(this);
// var imgClass = $img.attr('class');
// var imgURL = $img.attr('src');
// $.get(imgURL, function(data) {
// var $svg = $(data).find('svg');
// if(typeof imgClass !== 'undefined') {
// $svg = $svg.attr('class', imgClass+' replaced-svg');
// }
// $svg = $svg.removeAttr('xmlns:a');
// if(!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) {
// $svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width'))
// }
// $img.replaceWith($svg);
// }, 'xml');
// });
// console.log(tns);
// var topCompanies = tns({
// container: '.top-companies-slider-wrapper',
// slideBy: 1,
// items: 3,
// auto: false,
// speed: 500,
// autoplayTimeout: 500,
// nav: false,
// // controlsContainer: '.partners-slider-controls',
// mouseDrag: true,
// // responsive: {
// // 0:
// // {
// // items: 1
// // },
// // 400:
// // {
// // items: 2
// // },
// // 620:
// // {
// // items: 3
// // },
// // 1031:
// // {
// // items: 5
// // }
// // }
// });
// console.log($('.container'));
// Слайдеры на главной
$('.top-companies-slider-wrapper').owlCarousel({
loop:true, //Зацикливаем слайдер
......@@ -112,7 +64,7 @@ $('.top-companies-slider-wrapper').owlCarousel({
});
$('.usage-steps-slider-wrapper').owlCarousel({
loop:true, //Зацикливаем слайдер
loop:false, //Зацикливаем слайдер
items:1,
margin:0, //Отступ от элемента справа в 50px
nav:true, //Отключение навигации
......@@ -124,29 +76,35 @@ $('.usage-steps-slider-wrapper').owlCarousel({
touchDrag: false,
navContainer: '.navigation-steps-slider',
navText : ["<div class='arrow-steps arrow-steps__left'><img src='./img/arrow_right_step.svg' style='transform:rotateZ(180deg)'>Шаг <span></span></div>","<div class='arrow-steps arrow-steps__right'>Шаг <span></span><img src='./img/arrow_right_step.svg'></div>"],
onInitialized: function(e) {
// $('.arrow-steps__right span')..text('/ '+ this.items().length / 4);
$('.arrow-steps__right span').text('2');
let currentGroupSlider = $('.count-slider-nav span').eq(0).text();
let lengthGroupSlider = this.items().length / 4;
// console.log(lengthGroupSlider);
console.log(currentGroupSlider);
$('.dairy-complexes-slider-nav .owl-next').click(function()
onInitialized: function(e)
{
let nextSlider = 2;
let prevSlider = 0;
$('.arrow-steps__right span').text(nextSlider);
let lengthSlider = this.items().length;
console.log(nextSlider);
$('.navigation-steps-slider .owl-next').click(function()
{
if(currentGroupSlider < lengthGroupSlider)
if(nextSlider <= lengthSlider)
{
currentGroupSlider++;
$('.count-slider-nav span').eq(0).text(currentGroupSlider);
nextSlider++;
prevSlider++;
$('.arrow-steps__right span').text(nextSlider);
$('.arrow-steps__left span').text(prevSlider);
}
});
$('.dairy-complexes-slider-nav .owl-prev').click(function()
$('.navigation-steps-slider .owl-prev').click(function()
{
if(currentGroupSlider > 1)
if(nextSlider > 2)
{
currentGroupSlider--;
$('.count-slider-nav span').eq(0).text(currentGroupSlider);
nextSlider--;
prevSlider--;
$('.arrow-steps__right span').text(nextSlider);
$('.arrow-steps__left span').text(prevSlider);
}
});
......@@ -154,45 +112,37 @@ $('.usage-steps-slider-wrapper').owlCarousel({
});
// $('.dairy-complexes-slider').owlCarousel({
// loop:false, //Зацикливаем слайдер
// margin:30, //Отступ от элемента справа в 50px
// nav:true, //Отключение навигации
// smartSpeed:300, //Время движения слайда
// autoplayTimeout:300, //Время смены слайда
// dots: false,
// items: 4,
// slideBy: 4,
// navContainer: '.dairy-complexes-slider-nav',
// navText : ["<img src='img/img_arrow_left.svg'>", "<img src='img/img_arrow_right.svg'>"],
// onInitialized: function(e) {
// $('.count-slider-nav span').eq(1).text('/ '+ this.items().length / 4);
// let currentGroupSlider = $('.count-slider-nav span').eq(0).text();
// let lengthGroupSlider = this.items().length / 4;
// // console.log(lengthGroupSlider);
// console.log(currentGroupSlider);
// $('.dairy-complexes-slider-nav .owl-next').click(function()
// {
// if(currentGroupSlider < lengthGroupSlider)
// {
// currentGroupSlider++;
// $('.count-slider-nav span').eq(0).text(currentGroupSlider);
// }
// });
// $('.dairy-complexes-slider-nav .owl-prev').click(function()
// {
// if(currentGroupSlider > 1)
// {
// currentGroupSlider--;
// $('.count-slider-nav span').eq(0).text(currentGroupSlider);
// }
// });
// }
// });
// Аккордеон
try
{
let accordionContentBlock = document.querySelectorAll('.accordion-content-block');
accordionContentBlock.forEach((elem) =>
{
elem.addEventListener('click', function(e)
{
e.preventDefault();
elem.classList.toggle('accordion-content-block_hide');
})
});
}
catch (e) {
console.log(e);
}
// Проверка изображения в карточке статьи
let articleBlocks = document.querySelectorAll('.article-block');
articleBlocks.forEach(article => {
if(!article.querySelector('.article-block__image'))
{
article.querySelector('.article-block__content').style.height = '100%';
}
});
This diff is collapsed.
......@@ -5,7 +5,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const webpack = require('webpack');
const isDev = process.env.NODE_ENV = 'development';
const pages = ['index'];
const pages = ['index', 'articles', 'faq'];
const webpackConfig = {
context: path.resolve(__dirname, 'src'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment