Skip to content

Instantly share code, notes, and snippets.

View davidhellmann's full-sized avatar
🤔
Focusing

David Hellmann davidhellmann

🤔
Focusing
View GitHub Profile
<?php
/**
* Yii Application Config
*
* Edit this file at your own risk!
*
* The array returned by this file will get merged with
* vendor/craftcms/cms/src/config/app.php and app.[web|console].php, when
* Craft's bootstrap script is defining the configuration for the entire
* application.
[
{
countryAbbreviation: 'AF',
region: 'EMEA',
region2: 'EUROPE-MIDDLE-EAST-AFRICA'
},
{
countryAbbreviation: 'AX',
region: 'EMEA',
region2: 'EUROPE-MIDDLE-EAST-AFRICA'
[
{
countryAbbreviation: 'AF',
region: 'EMEA',
region2: 'EUROPE-MIDDLE-EAST-AFRICA'
},
{
countryAbbreviation: 'AX',
region: 'EMEA',
region2: 'EUROPE-MIDDLE-EAST-AFRICA'
/* Matrix CSS */
#fields-dtmContentBuilderMatrix-field .matrixblock {
margin-bottom: 30px;
}
#fields-dtmContentBuilderMatrix-field .matrixblock[data-type^="blockSection"] {
margin-top: 50px;
@davidhellmann
davidhellmann / zones.coffee
Created November 30, 2022 16:18 — forked from MatthewCallis/zones.coffee
ISO Language Codes, ISO Country Codes, Time Zones
values =
locale_country_code: [
{ title: "Andorra", value: "AD" },
{ title: "United Arab Emirates", value: "AE" },
{ title: "Afghanistan", value: "AF" },
{ title: "Antigua and Barbuda", value: "AG" },
{ title: "Anguilla", value: "AI" },
{ title: "Albania", value: "AL" },
{ title: "Armenia", value: "AM" },
{ title: "Angola", value: "AO" },
[
{
"country": "Afghanistan",
"countryAbbreviation": "AF",
"continent": "Asia",
"continentAbbreviation": "AS",
"region": "EMEA"
},
{
"country": "Åland Islands",
@davidhellmann
davidhellmann / input.scss
Created March 18, 2022 12:25
Generated by SassMeister.com.
@use 'sass:map';
$themes: ['default', 'yellow', 'purple-yellow', 'gold', 'midnight-blue', 'purple-blue'];
@mixin themesIcon($icon) {
@each $theme in $themes {
.t-color--#{$theme} & {
background-image: url('~ASSETS/svg/single/#{$theme}/#{$icon}.svg');
}
}
@davidhellmann
davidhellmann / input.scss
Created March 18, 2022 12:15 — forked from martinherweg/input.scss
Generated by SassMeister.com.
@use 'sass:map';
$themes: ['default', 'yellow', 'purple-yellow', 'gold', 'midnight-blue', 'purple-blue'];
$themeIcons: ();
@each $theme in $themes {
$index: index($themes, $theme);
$themeIcons: map.set($themeIcons, $theme, 'theme#{$index}')
}
@davidhellmann
davidhellmann / Craft Add Items To Cart
Created June 29, 2021 09:16 — forked from j2is/Craft Add Items To Cart
How to add items to the cart, this example is headless but can be modified for a regular setup by also posting a CSRF token.
import axios from "axios";
async function request(request) {
if (!request) {
return { data: undefined, error: "no request" };
}
const data = typeof FormData !== "undefined" ? new FormData() : {};
if (request.data) {
Object.entries(request.data).forEach(([key, value]) => {
@davidhellmann
davidhellmann / input.scss
Created May 17, 2021 13:37
Generated by SassMeister.com.
/*
// build the clamp property
const clamp = (multiMin = 0, multiMax = null) => {
const _calcMulti = calcMulti(multiMin, multiMax || multiMin)
const _fsMin = _calcMulti.fsMin
const _fsMax = _calcMulti.fsMax
return `clamp(${_fsMin}rem, calc(${_fsMin}rem + (${_fsMax} - ${_fsMin}) * ((100vw - ${screenMin}rem) / (${screenMax} - ${screenMin}))), ${_fsMax}rem)`
}
*/