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 { cn } from "@/lib/utils"; | |
import { Monitor, Moon, Sun } from "lucide-react"; | |
import { motion } from "framer-motion"; | |
import { useEffect, useId, useState } from "react"; | |
import { useTheme } from "next-themes"; | |
import { cva, VariantProps } from "class-variance-authority"; | |
const themeSwitcherVariants = cva( |
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
import { motion, motionValue, transform, useScroll, useTransform } from "framer-motion"; | |
import { useRef } from "react"; | |
const items = [ | |
// ... | |
] | |
const Component = () => { | |
const ref = useRef(null); |
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
/* | |
Gulpfile.js file for the tutorial: | |
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN | |
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev | |
Steps: | |
1. Install gulp globally: | |
npm install --global gulp |
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
<?php | |
echo '<ul class="iv-slider">'; | |
$sliders = get_post_meta( get_the_id(), 'gp', false ); | |
foreach ( $sliders as $slider ) { | |
echo '<li class="iv-slide">'; | |
echo '<h3>'.$slider["iv-slider-title"].'</h3>'; | |
echo '<p>'.$slider["iv-slider-desc"].'</p>'; | |
echo wp_get_attachment_image(array_shift($slider["iv-slider-img"])); |
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
jQuery.fn.nextOrFirst = function(selector) { | |
var next = this.next(selector); | |
return next.length ? next : this.prevAll(selector).last(); | |
}; | |
jQuery.fn.prevOrLast = function(selector) { | |
var prev = this.prev(selector); | |
return prev.length ? prev : this.nextAll(selector).last(); | |
}; |
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
/** | |
* TrueCurrent for Owl Carousel | |
* @since 2.0.2 | |
*/ | |
;(function($, window, document, undefined) { | |
'use strict'; | |
var TrueCurrent = function(carousel) { | |
var current = 0; |
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
// The plugin code | |
(function($){ | |
$.fn.parallax = function(options){ | |
var $$ = $(this); | |
offset = $$.offset(); | |
var defaults = { | |
"start": 0, | |
"stop": offset.top + $$.height(), | |
"coeff": 0.95 | |
}; |
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
add_action('customize_controls_print_footer_scripts', function(){?> | |
<script type="text/javascript"> | |
( function ( wp, $ ) { | |
console.log($("#save")) | |
var btn = $("<button style='margin-right: 5px' class='button button-primary'>Reload CSS</button>").click(function(e){ | |
e.preventDefault(true); | |
wp.customize.previewer.preview.iframe.get(0).contentWindow.reloadStylesheets(); | |
}); | |
$("#save").after(btn); |
NewerOlder