This file contains hidden or 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
'use strict'; | |
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const autoprefixer = require('gulp-autoprefixer'); | |
const concat = require('gulp-concat'); | |
const livereload = require('gulp-livereload'); | |
const http = require('http'); |
This file contains hidden or 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
'use strict'; | |
/* ----------------- */ | |
/* Dependencies | |
/* ----------------- */ | |
const gulp = require('gulp'); | |
const browserSync = require('browser-sync').create(); | |
const sourcemaps = require('gulp-sourcemaps'); |
This file contains hidden or 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 elixir = require('laravel-elixir'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Elixir Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Elixir provides a clean, fluent API for defining some basic Gulp tasks | |
| for your Laravel application. By default, we are compiling the Sass |
This file contains hidden or 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 { mix } = require('laravel-mix') | |
const path = require('path') | |
/* | |
|-------------------------------------------------------------------------- | |
| Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| This file defines the building steps of the application. Here's where the | |
| client-side technologies are configured according to the needs. Steps such |
This file contains hidden or 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
myArray = [[1,2,[3]],4]; // -> [1,2,3,4] | |
function flatten(arrayVal) { | |
return arrayVal.reduce((newArray, currentValue) => Array.isArray(currentValue) ? newArray.concat(flatten(currentValue)) : newArray.concat(currentValue), []) | |
} | |
console.log('flatten: ', flatten(myArray)); |
This file contains hidden or 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
#! /usr/bin/env node | |
var path = require('path') | |
var glob = require('glob') | |
var webfontsGenerator = require('webfonts-generator') | |
const THEME_DIR = 'public/wp-content/themes/soventix'; | |
glob(`${THEME_DIR}/assets/images/icons/*.svg`, {}, function (error, files) { | |
webfontsGenerator({ | |
files: files, | |
dest: `${THEME_DIR}/assets/iconfonts/`, |
This file contains hidden or 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
{"cache_mobile":1,"purge_cron_interval":10,"purge_cron_unit":"HOUR_IN_SECONDS","minify_css":1,"minify_concatenate_css":1,"exclude_css":[],"critical_css":"","minify_js":1,"exclude_inline_js":[],"exclude_js":["s1static\/content"],"exclude_defer_js":[],"delay_js":1,"delay_js_scripts":["getbutton.io","a.omappapi.com\/app\/js\/api.min.js","feedbackcompany.com\/includes\/widgets\/feedback-company-widget.min.js","snap.licdn.com\/li.lms-analytics\/insight.min.js","static.ads-twitter.com\/uwt.js","platform.twitter.com\/widgets.js","twq(","\/sdk.js#xfbml","static.leadpages.net\/leadbars\/current\/embed.js","translate.google.com\/translate_a\/element.js","widget.manychat.com","xfbml.customerchat.js","static.hotjar.com\/c\/hotjar-","smartsuppchat.com\/loader.js","grecaptcha.execute","Tawk_API","shareaholic","sharethis","simple-share-buttons-adder","addtoany","font-awesome","wpdiscuz","cookie-law-info","pinit.js","\/gtag\/js","gtag(","\/gtm.js","\/gtm-","fbevents.js","fbq(","google-analytics.com\/analytics.js","ga( '","ga |
This file contains hidden or 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
'use client' | |
import Image from 'next/image' | |
import React, { useState, useEffect } from 'react' | |
import { DefaultCellComponentProps } from 'payload' | |
import { Media } from '@/payload-types' | |
const getImage = (imageId: string) => { | |
return fetch( | |
`/api/media/${imageId}` | |
) |