Skip to content

Instantly share code, notes, and snippets.

View cvaize's full-sized avatar

Орлов Дмитрий cvaize

  • Batyukov Studio
View GitHub Profile
@cvaize
cvaize / index.js
Last active November 20, 2024 05:37
Скрипт получения не стилизованных классов из html, для последующего копирования и стилизации
fetch('/shop-front-template-1/public/css/app.css').then(t => t.text()).then(css => {
let classes = {};
let elements = Array.from(document.querySelectorAll('*'));
for (let i = 0; i < elements.length; i++) {
let element = elements[i]
let classes_ = Array.from(element.classList);
for (let j = 0; j < classes_.length; j++) {
classes[classes_[j]] = true;
}
}
@cvaize
cvaize / bootstrap-4.blade.php
Last active October 13, 2022 19:06
Laravel pagination on lg( @media( >= 480px) ) screens onEachSide(5) and on xs( @media( < 480px) ) screens onEachSide(1)
@if ($paginator->hasPages())
<?php
if (sizeof($elements[0]) === 2) {
unset($elements[0][array_key_last($elements[0])]);
}
if (sizeof($elements[4]) === 2) {
unset($elements[4][array_key_first($elements[4])]);
}
?>