Skip to content

Instantly share code, notes, and snippets.

//Назначаем уникальный класс с помощью цикла
$(".webform-datepicker").each(function(e){
$(this).addClass("datepicker-" + e);
});
@alex-boom
alex-boom / react useContext
Created January 27, 2020 10:15
useContext
import React, {useContext} from "react";
import "./styles.css";
const MyContext = React.createContext();
export default function App() {
return (
<MyContext.Provider value="Hello">
<Child />
</MyContext.Provider>
@alex-boom
alex-boom / cloudSettings
Last active July 5, 2021 08:14
visual-studio-settings.txt
{"lastUpload":"2021-07-05T08:14:12.077Z","extensionVersion":"v3.4.3"}
@alex-boom
alex-boom / create-gutenberg-plugin.txt
Created October 21, 2019 07:15
create-gutenberg-plugin
Источник: https://code.tutsplus.com/tutorials/wordpress-gutenberg-block-api-an-introduction--cms-31039
Необходимые компоненты
Это серия учебников среднего и продвинутого уровня, поэтому предполагается, что вы не новичок в разработке WordPress. Чтобы получить максимальную отдачу от этой серии, вы должны иметь, по крайней мере, рабочие знания о следующем:
JavaScript (ES6+)
React (and ReactDom)
JSX
Command line
Node/NPM
@alex-boom
alex-boom / create-react.txt
Created October 21, 2019 07:05
create-react
Источник: https://learn-reactjs.ru
1.3 Создать новое React приложение
Используйте интегрированный набор инструментов для повышения удобства пользователя и разработчика.
В данном разделе описаны несколько популярных наборов инструментов React, которые помогают в таких задачах, как:
Масштабирование множества файлов и компонентов.
@alex-boom
alex-boom / two-line-overflow-elipsis.css
Created August 6, 2019 09:17
two-line-overflow-elipsis
> span {
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
@media screen and (min-width: $break__for_ipad) {
display: block;
-webkit-line-clamp: 1;
@alex-boom
alex-boom / input-radio-uncheck.html
Created June 12, 2019 08:59
input-radio-uncheck
<form class="form-group">
<span class="title-check">Sort Slots: </span>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" onMouseDown="this.isChecked=this.checked;"
onClick="this.checked=!this.isChecked;" id="inlineRadio1" name="filter-radio">
<label class="form-check-label" for="inlineRadio1">By date</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" onMouseDown="this.isChecked=this.checked;"
onClick="this.checked=!this.isChecked;" id="inlineRadio2" name="filter-radio">
@alex-boom
alex-boom / designMode.js
Created June 11, 2019 07:22
designMode
document.designMode = 'on'
@alex-boom
alex-boom / star-raiting-fontawesome.html
Last active June 4, 2019 07:47
star-raiting-fontawesome
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
$star: "\f005";
$star-half: "\f123";
$star-o: "\f006";
@alex-boom
alex-boom / autocompliteUi.html
Last active June 4, 2019 12:35
autocompliteUi
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>autocompliteUi</title>
<style>
.holder-ui-autocomplete {
position: absolute;
top: 100%;
left: 0;