View instagram-gradient.html
This file contains 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> |
View gtm-onscroll.js
This file contains 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); |
View exclude-password-protected-pages.php
This file contains 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 |
View breakpoint-event-handler.js
This file contains 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'); | |
}); |
View u-font-size.css
This file contains 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))); | |
} |
View u-spacer.scss
This file contains 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"] { |
View color-opacity.css
This file contains 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 | |
*/ |
View Razor-Add-Class-To-Html-BeginForm.cshtml
This file contains 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() | |
} |
View image-rendering.css
This file contains 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; } |
NewerOlder