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 { | |
CardGroup, | |
OddsCalculator, | |
type Card as PokerToolsCard, | |
} from "poker-tools"; | |
import crypto from 'crypto'; | |
// Готовая функция для перемешивания колоды | |
export function shuffle<T>(array: Array<T>) { | |
let currentIndex = array.length, |
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
Історія трохи з розряду пост-фактум, але не зовсім. | |
Сталось це ще в далекому 2018, на той момент я працював на фірмі яка спеціалізувалась в своїй більшості на Wordpress, і ще на PHP (Laravel, Yii). | |
В мене на той момент було більше досвіду саме з Wordpress. | |
До нас через Upwork прийшов проект (аналог Prom.ua), | |
потрібно було написати плагін який дав би змогу скачувати продукти з афіліейт системи і відповідно генерувати шорткоди | |
(такі штуки для вставлення в контент які дають змогу виконати певний код який привязаний до цього коду). | |
Попередньо для проекту було зроблено оцінку на 1,5 - 2 місяці. Спочатку замовник хотів витягувати тільки продукти певного типу (всяку електротехніку), |
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
Фронтенд: | |
7 з 10 | |
З самого початку трохи здивуванням було що це не Vue або React. Але чесно кажучи тут воно 100% не потрібно враховуючи ціль проекту. | |
Поставив оцінку 7 через декілька причин: | |
- Забагато плагінів підключено які не використовуються (Magnific Popup, parallax, jQuery UI, Litty) можливо ще якість з якими поки не стикався | |
- Не зовсім розумію доцільність підключення декількох слайдерів, (Owl-carousel, slick) | |
- Щодо СЕО здається тут забагато h тегів і взагалі нема h1 | |
- Ну і троши не вистачає фавікон | |
Бекенд |
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
// https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots | |
/* | |
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer) | |
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), | |
Exposed=Window] | |
interface IntersectionObserver { | |
readonly attribute Element? root; | |
readonly attribute DOMString rootMargin; |
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
new Swipe(document.getElementById("gallery"), function(event, direction) { | |
event.preventDefault(); | |
switch (direction) { | |
case "up": | |
// Handle Swipe Up | |
break; | |
case "down": | |
// Handle Swipe Down | |
break; |
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
var MGUtil={ | |
data:[], | |
ini:0, | |
total:0, | |
addItem:function(qty,id,properties,callback) { | |
var params = {quantity:qty,id:id}; | |
if(properties != false){ | |
params.properties = properties; | |
} | |
$.ajax({ |