Skip to content

Instantly share code, notes, and snippets.

View anveno's full-sized avatar
👾

Stefan Brinkers anveno

👾
View GitHub Profile
@anveno
anveno / webp.htaccess
Created February 11, 2022 12:49
Redaxo: WebP images with htaccess
<IfModule mod_rewrite.c>
# ENABLE REWRITING
RewriteEngine On
# Workaround for RewriteBase
# Copied from https://github.com/symfony/symfony-standard/blob/master/web/.htaccess
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^sitemap\.xml$ %{ENV:BASE}/index.php?rex_yrewrite_func=sitemap [NC,L]
@anveno
anveno / product_filter_alpinejs.html
Last active December 7, 2022 18:09
alpine JS: Filter + Fetch
<div class="uk-container">
<h1>Produkte</h1>
<div x-data="productsData()">
<div>
<div class="uk-button uk-button-secondary" @click.prevent="fetchProductsData(filterparams.cat = 1)">Kategorie 1</div>
<div class="uk-button uk-button-secondary" @click.prevent="fetchProductsData(filterparams.cat = 2)">Kategorie 2</div>
<div class="uk-button uk-button-secondary" @click.prevent="fetchProductsData(filterparams.cat = 3)">Kategorie 3</div>
<div class="uk-button uk-button-secondary" @click.prevent="fetchProductsData(filterparams.cat = 4)">Kategorie 4</div>