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'); | |
| }); |
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
| /* | |
| Usage: | |
| <span class="u-font-size" style="--min: 15px; --max: 50px;">Example font size</span> | |
| */ | |
| .u-font-size[style*="--min"][style*="--max"]{ | |
| font-size: calc(calc(var(--min) * 1px) + (var(--max) - var(--min)) * ((100vw - 300px) / (1600 - 300))); | |
| } |
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
| /* | |
| Usage: | |
| <div class="u-spacer" style="--xs: 10px; --sm: 15px; --md: 20px; --lg: 25px; --xl: 40px; --xxl: 50px;"></div> | |
| Note: | |
| xs, sm, md, lg, xl, xxl breakpoints taken from bootstrap | |
| https://getbootstrap.com/docs/5.1/layout/breakpoints/#available-breakpoints | |
| */ | |
| .u-spacer { | |
| &[style*="--xs"] { |
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
| :root { | |
| --color-cultured-white: 242, 244, 247; | |
| } | |
| .element { | |
| /* | |
| How do I apply opacity to a CSS color variable? | |
| https://stackoverflow.com/questions/40010597/how-do-i-apply-opacity-to-a-css-color-variable | |
| https://stackoverflow.com/a/41265350 - BoltClock's answer | |
| */ |
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
| @* http://www.programmerguide.net/2013/04/adding-class-attribute-via.html *@ | |
| @using (Html.BeginForm("Register", "Customer", FormMethod.Post, new { @class = "customer-register-form" })) | |
| { | |
| @Html.AntiForgeryToken() | |
| } |
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
| img { image-rendering: -webkit-optimize-contrast; } |
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://www.c2software.com/c2-blog/fonts-appearing-bold-on-mac.aspx */ | |
| .selector { | |
| -webkit-font-smoothing: antialiased; | |
| } |
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
| import { MediaUpload } from '@wordpress/block-editor'; | |
| import { Button } from '@wordpress/components'; | |
| function CustomMediaUpload(props){ | |
| return <MediaUpload | |
| onSelect={ media => { props.onMediaSelected(media.url) } } | |
| type="image" | |
| value={ props.mediaUrl } | |
| render={ | |
| ({open}) => { |