Skip to content

Instantly share code, notes, and snippets.

View jswebschmiede's full-sized avatar
🏠
Working from home

Joerg Schoeneburg jswebschmiede

🏠
Working from home
View GitHub Profile
@lukaskleinschmidt
lukaskleinschmidt / app.scss
Last active September 11, 2023 14:50
Utility class generator like tailwindcss but in pure Sass.
@use 'sass:map';
@use 'variants' as * with (
$breakpoints: (
'small': 640px,
'medium': 768px,
'large': 1024px,
'wide': 1280px,
)
);
<?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 December 31, 2023 10:08
[Theming Snippets] Show cart contents / total Ajax
/**
* 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 February 28, 2023 07:06
WORDPRESS Ajax contact-form
<!-- 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>
@dongilbert
dongilbert / lead_controller.php
Created December 3, 2012 15:00
Joomla Export to CSV
<?php
/**
* @version 1.0.0
* @package com_stats
* @copyright Copyright (C) 2012. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
@jswebschmiede
jswebschmiede / navobject.css
Created November 12, 2012 19:41
A CSS object for many nav styles
/** 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
Created November 9, 2012 14:38 — forked from corydorning/Cross-Browser ::before and ::after pseudo-class polyfill
Cross-Browser ::before and ::after pseudo-class polyfill
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}
@corydorning
corydorning / Cross-Browser ::before and ::after pseudo-class polyfill
Last active February 18, 2022 00:24
Cross-Browser ::before and ::after pseudo-class polyfill
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}