This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createDateAsUTC(date) { | |
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds())); | |
} | |
function convertDateToUTC(date) { | |
return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from 'react'; | |
import { Provider } from 'react-redux'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import { ThemeProvider } from '@material-ui/core/styles'; | |
import CssBaseline from '@material-ui/core/CssBaseline'; | |
import { Routes } from '@/components/Routes'; | |
import { theme } from '@/styles/theme'; | |
import { store } from '@/store/store'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRef, useEffect, useState, useCallback } from 'react'; | |
interface ReturnDataI { | |
ref: React.MutableRefObject<Element | null>; | |
isBottom: boolean; | |
} | |
export function useScrollBottom(offset = 0): ReturnDataI { | |
const ref = useRef<Element>(null); | |
const [isBottom, setIsBottom] = useState<boolean>(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function getImageUrl(file: File): Promise<string | ArrayBuffer> { | |
return new Promise((resolve) => { | |
import('exif-js') | |
.then((EXIF) => { | |
EXIF.getData(file, function onGetData() { | |
const reader = new FileReader(); | |
reader.onload = ({ target }) => { | |
resolve(target.result); | |
}; | |
reader.readAsDataURL(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import IMask from 'imask'; | |
export default class Input { | |
constructor(el) { | |
this.el = el; | |
this.input = $.qs('.input__field', this.el); | |
this.isDate = this.input.type === 'date'; | |
this.isPhone = this.input.type === 'tel'; | |
this.isMaskDate = this.input.classList.contains('js-mask-date'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$username=$_POST['form_name']; | |
$phone=$_POST['form_phone']; | |
$message = " | |
Имя: ".htmlspecialchars($username)."<br /> | |
Телефон: ".htmlspecialchars($phone); | |
require_once('phpmailer/PHPMailerAutoload.php'); | |
$mail = new PHPMailer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="offers__wrap"> | |
<ul class="offers__list"> | |
<li> | |
<a href="#" class="offer"> | |
<div class="offer__inner"> | |
<div class="offer__img-wrap"> | |
<div class="offer__img" style="background-image: url(/upload/resize_cache/iblock/916/120_120_0619711fa078991f0a23d032687646b21/916c9aeb22e11effe192b158774ca4d3.png)" ></div> | |
</div> | |
<div class="offer__body"> | |
<h3 class="offer__title">Увеличение груди</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ease: "cubic-bezier(1, 0, 0.3, 1)" | |
easeOut: "cubic-bezier(0.165, 0.84, 0.44, 1)" | |
easeIn: "cubic-bezier(0.755, 0.05, 0.855, 0.06)" | |
default: "cubic-bezier(0.25, 0.1, 0.25, 1)" | |
easeInOut2: "cubic-bezier(0.455, 0.030, 0.515, 0.955)" | |
easePower2: "cubic-bezier(0.77, 0, 0.175, 1)" | |
easePower3: "cubic-bezier(0.645, 0.045, 0.355, 1)" | |
easePower4: "cubic-bezier(0.770, 0.000, 0.175, 1)" | |
easeSine: "cubic-bezier(0.445, 0.05, 0.55, 0.95)" | |
easeInPower2: "cubic-bezier(0.550, 0.085, 0.680, 0.530)" |
NewerOlder