This file contains hidden or 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 | |
| ob_start(); | |
| include('./template/index.php'); | |
| echo ob_get_clean(); |
This file contains hidden or 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
| @media all and (max-width: 767px) { | |
| .xs-padding-0 { | |
| padding: 0; | |
| } | |
| .xs-padding-left-0 { | |
| padding-left: 0; | |
| } | |
| .xs-padding-right-0 { |
This file contains hidden or 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
| window.scrollToSelector = function scrollToSelector(selector) { | |
| $('html, body').animate({ | |
| scrollTop: $(selector).offset().top | |
| }, 1000); | |
| }; |
This file contains hidden or 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
| 'use strict'; | |
| const state = { | |
| a: { | |
| aa: { | |
| aaa: 'AAA' | |
| }, | |
| ab: { | |
| aab: 'AAB' | |
| } |
This file contains hidden or 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 | |
| class Request | |
| { | |
| public static function get($input, $cleaning = true) | |
| { | |
| // global $db; | |
| $input = isset($_GET[$input]) ? $_GET[$input] : null; | |
| // if ($input && gettype($input) !== 'array') { | |
| // $input = $cleaning ? @$db->clean($input) : $input; |
This file contains hidden or 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
| Helper.php | |
| === | |
| <?php | |
| class Helper | |
| { | |
| private static $instance; | |
| public static $alert; | |
| public function __construct() |
This file contains hidden or 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 () { | |
| if (window.jQuery) { | |
| console.log('jQuery already loaded'); | |
| } else { | |
| var s = document.createElement('script'); | |
| s.setAttribute('type', 'text/javascript'); | |
| s.setAttribute('src', 'https://code.jquery.com/jquery.min.js'); | |
| document.body.appendChild(s); | |
| console.log('jQuery has been attached'); | |
| } |
This file contains hidden or 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
| let lastScrollTop = 0 | |
| $(window).scroll(function(event) { | |
| const st = $(this).scrollTop() | |
| if (st > lastScrollTop) { | |
| // downscroll code | |
| } | |
| else { | |
| // upscroll code |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <style> | |
| .lightbox { | |
| position: fixed; | |
| /* Remove default browser outline */ | |
| outline: none; |
This file contains hidden or 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 | |
| function flattenArray($source, $key = null) | |
| { | |
| $result = array(); | |
| if ($key) { | |
| array_walk_recursive($source, function ($v, $k) use ($key, &$result) { | |
| if ($k === $key) { | |
| $result[] = $v; |