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
| ::-webkit-scrollbar { | |
| width: 5px; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background-color: black; | |
| } | |
| ::-webkit-scrollbar-track { | |
| box-shadow: inset 0 0 2px gray; |
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
| # https://stackoverflow.com/a/36986520 | |
| RewriteEngine On | |
| RewriteCond %{HTTP_HOST} example\.com$ | |
| RewriteCond %{HTTPS} off [OR] | |
| RewriteCond %{HTTP_HOST} !^www\. [NC] | |
| RewriteRule (.*) https://www.example.com%{REQUEST_URI} [L,R=301] |
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
| // cjs variable name: cjs - search_term (q) | |
| function() { | |
| var params = new URLSearchParams(window.location.search); | |
| return params.get('q'); | |
| } |
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
| /** @return IntersectionObserver */ | |
| function createObserver(p_threshold) { | |
| return new IntersectionObserver( | |
| (entries) => { | |
| entries.forEach((/** @type IntersectionObserverEntry */ entry) => { | |
| if (entry.isIntersecting) { | |
| const eventIntersecting = new CustomEvent("intersecting"); | |
| entry.target.dispatchEvent(eventIntersecting); | |
| return; | |
| } |
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
| // define the observer | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach((/** @type IntersectionObserverEntry */ entry) => { | |
| if (entry.isIntersecting) { | |
| const eventIntersecting = new CustomEvent("intersecting"); | |
| entry.target.dispatchEvent(eventIntersecting); | |
| return; | |
| } | |
| const eventNotIntersecting = new CustomEvent("not-intersecting"); | |
| entry.target.dispatchEvent(eventNotIntersecting); |
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
| const the_form = document.getElementById('the_form'); | |
| const formData = new FormData(the_form); | |
| fetch('the-handler.php',{ | |
| method: 'POST', | |
| body: formData | |
| }) | |
| .then(response => response.json()) | |
| .then(data => { | |
| console.log('data is:', data); | |
| }); |
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
| <style> | |
| .instagram-link { | |
| display: block; | |
| background-image: linear-gradient(49.12deg, #fd5 6.61%, #FF543E 50.05%, #C837AB 93.49%); | |
| border-radius: 50%; | |
| width: 45px; | |
| height: 45px; | |
| } | |
| </style> |
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 documentScrolled() { | |
| console.log('document is scrolled'); | |
| document.removeEventListener('scroll', documentScrolled); | |
| } | |
| document.addEventListener('scroll', documentScrolled); |
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 | |
| // get_pages | |
| $pages = get_pages( [ | |
| 'child_of' => $id, | |
| //'sort_column' => 'rand', | |
| 'sort_column' => 'menu_order', | |
| 'post_status' => 'publish,draft', | |
| ] ); | |
| // WP_Query |
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
| const breakpoint_lg = window.matchMedia('(min-width: 992px)'); | |
| breakpoint_lg.addEventListener('change', () => { | |
| if(breakpoint_lg.matches) { | |
| console.log('lg'); | |
| return; | |
| } | |
| console.log('not lg'); | |
| }); |