Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Joerg Schoeneburg jswebschmiede

🏠
Working from home
View GitHub Profile
@lukaskleinschmidt
lukaskleinschmidt / app.scss
Last active Jul 29, 2022
Utility class generator like tailwindcss but in pure Sass.
View app.scss
@use 'sass:map';
@use 'variants' as * with (
$breakpoints: (
'small': 640px,
'medium': 768px,
'large': 1024px,
'wide': 1280px,
)
);
View woocommerce_loop-custom.php
<?php
if(!function_exists('wc_get_products')) {
return;
}
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
$ordering = WC()->query->get_catalog_ordering_args();
$ordering['orderby'] = array_shift(explode(' ', $ordering['orderby']));
$ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby'];
@woogists
woogists / wc-show-cart-contents-total-ajax.php
Last active May 6, 2022
[Theming Snippets] Show cart contents / total Ajax
View wc-show-cart-contents-total-ajax.php
/**
* Show cart contents / total Ajax
*/
add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' );
function woocommerce_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
@Neolot
Neolot / gist:7189739
Last active Aug 3, 2022
WORDPRESS Ajax contact-form
View gist:7189739
<!-- contactform.php -->
<div class="cf" id="cf">
<form action="javascript:void(0);">
<div><input type="text" name="name" placeholder="Name"/><span class="error"></span></div>
<div><input type="text" name="email" placeholder="Email"/><span class="error"></span></div>
<div><textarea name="message" placeholder="Message"></textarea><span class="error"></span></div>
<div><button type="submit">Submit</button> <span class="loader"></span></div>
</form>
</div>
@jswebschmiede
jswebschmiede / navobject.css
Created Nov 12, 2012
A CSS object for many nav styles
View navobject.css
/** the nav object **/
.nav {}
.nav ul { margin-bottom: 0; }
.nav li {
list-style: none;
list-style-image: none;
margin-left:0;
}
/** nav object for horizontal navigations **/
.nav.horizontal ul,
@jswebschmiede
jswebschmiede / gist:4046054 Cross-Browser ::before and ::after pseudo-class polyfill
View gist:4046054
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}
@corydorning
corydorning / Cross-Browser ::before and ::after pseudo-class polyfill
Last active Feb 18, 2022
Cross-Browser ::before and ::after pseudo-class polyfill
View Cross-Browser ::before and ::after pseudo-class polyfill
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}