Skip to content

Instantly share code, notes, and snippets.

View htndev's full-sized avatar
💭
400 Bad repositories.

Oleksandr Vanilchuk htndev

💭
400 Bad repositories.
View GitHub Profile
@htndev
htndev / cli.js
Created October 15, 2019 15:51
Thumbnail generator
const [, , ...args] = process.argv,
fs = require('fs-extra'),
fsNative = require('fs'),
ip = require('ip').address(),
request = require('request'),
chalk = require('chalk'),
projectTitle = process.env.PWD.split('/').pop(),
puppeteer = require('puppeteer'),
http = require('http'),
jimp = require('jimp'),
mixin breadcrumbs(main, chapter, chapterLink, title, titleLink)
p.breadcrumbs
a(href="/")= main
span.separator /
a(href=chapterLink)= chapter
span.separator /
a(href=titleLink aria-current="page")= title
.breadcrumbs
.separator
margin:
left: .5em
right: .5em
a
text-decoration: none
color: $secondary-header-color
@include font(Circe, 200, 14, 20)
&:hover
mixin penSvg
svg(width='12' height='12' viewbox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg')
path(d='M11.2227 0.77673C10.1898 -0.25891 8.50992 -0.25891 7.47696 0.77673L0.609311 7.64264C0.555617 7.69634 0.522379 7.76538 0.512151 7.83954L0.00334149 11.6088C-0.0119995 11.7162 0.026353 11.8236 0.100501 11.8977C0.164422 11.9616 0.253911 12 0.3434 12C0.358741 12 0.374082 12 0.389423 11.9974L2.65989 11.6906C2.8491 11.665 2.98205 11.4911 2.95648 11.3019C2.93091 11.1127 2.75705 10.9797 2.56784 11.0053L0.74738 11.2508L1.10278 8.62202L3.86927 11.3888C3.93319 11.4528 4.02268 11.4911 4.11217 11.4911C4.20166 11.4911 4.29115 11.4553 4.35507 11.3888L11.2227 4.52293C11.7239 4.02174 12 3.35688 12 2.64855C12 1.94023 11.7239 1.27537 11.2227 0.77673ZM7.60992 1.62058L8.76305 2.77385L2.49625 9.04139L1.34312 7.88812L7.60992 1.62058ZM4.11473 10.6575L2.98716 9.52981L9.25396 3.26227L10.3815 4.38996L4.11473 10.6575ZM10.8622 3.89644L8.10339 1.13729C8.45367 0.84833 8.89089 0.689787 9.35112 0.689787C9.87527 0.689787 10
.btn-callback
display: flex
justify-content: center
width: 14em
max-width: 14em
text-decoration: none
border-radius: 100px
border: none
background: $btn-primary-bg
color: #fff
.checkbox-wrapper
input(type="checkbox" id="checkbox")/
.checkbox-wrapper
width: 76px
height: 40px
background: green
border-radius: 3em
padding: .3em
position: relative
transition: .25s linear all
transition-duration: 0.1s
mixin accordeon(header, description, items, expandedRequired, expandedIndex)
.container
h2.white-text.text-center.mb-3= header
p.h4-title.text-center.d-none.d-md-block.mb-5= description
#accordion.accordion.mt-3
if expandedRequired
each item, index in items
if index === expandedIndex
.card-header.active(data-toggle='collapse', data-target='#collapse' + index, aria-controls='collapse' + index, aria-expanded='true' id="header" + index)
p.paragraph-text.text-w-bold= item.title
section.section.faq
+accordeon('Часто задаваемые вопросы', 'Возможно, наши клиенты уже задали интересующий вас вопрос',
[
{
title: 'Это больно?',
body : 'Конечно. Вы можете воспользоваться услугой обработки диабетической стопы. Перед процедурой мы проводим 4 простых теста на чувствительность: вибрационную, температурную, болевую и тактильную. Если чувствительность нарушена, мы обращаем внимание на эти участки стопы и обрабатываем их с особой осторожностью. Также мы измеряем уровень сахара в крови с помощью аппарата глюкометр. Это не больно и полностью безопасно. Если уровень сахара выше 10, мы не имеем права прикасаться к стопе. Поэтому мы попросим вас снизить уровень глюкозы в крови и запишем на новое удобное время.'
},
{
title: 'У меня сахарный диабет. Я могу пойти к подологу?',
body : 'Конечно. Вы можете воспользоваться услугой обработки диабетической стопы. Перед процедурой мы проводим 4 простых теста на чувствительность: вибрационную, температурную,
const mockStyle = {
get transform() {
return 'translateX(0) translateY(10px)';
}
};
const buildRegex = (type: 'X' | 'Y'): RegExp =>
new RegExp(`translate${type}\(\\S*\)`);
const buildTranslate = (