This file contains 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
var $video = $('#sbranding_hero_video video'); | |
var $image_1 = $('.sbranding-hero_shadow-1'); | |
var $image_2 = $('.sbranding-hero_shadow-2'); | |
var currentSrc1 = 'https://uploads-ssl.webflow.com/5f996b22b00afe35a55e6f79/6619145cb252ec488c91b348_Ellipse%20495.svg'; | |
var currentSrc2 = 'https://uploads-ssl.webflow.com/5f996b22b00afe35a55e6f79/6619145ca350727bae3f0e30_Ellipse%20496.svg'; | |
function preloadImage(src) { | |
var img = new Image(); | |
img.src = src; | |
} |
This file contains 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
var video = document.getElementById('hero_video'); | |
var video_wrapper = document.getElementById('mc-hero'); | |
var videoStart = video_wrapper.offsetTop; | |
var target = 0, | |
current = 0, | |
easeAmount = 0.05; | |
function scrollVideo() { | |
var videoLength = video.duration, |
This file contains 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
(function() { | |
let fontData = new Map(); | |
// Recursive function to walk the DOM tree | |
function processNode(node) { | |
if (node.nodeType === Node.ELEMENT_NODE) { | |
const style = window.getComputedStyle(node); | |
const fontFamily = style.getPropertyValue("font-family"); | |
const fontWeight = style.getPropertyValue("font-weight"); | |
This file contains 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
function delay(fn, ms){ | |
let timer = 0 | |
return function(...args){ | |
clearTimeout(timer) | |
timer = setTimeout(fn.bind(this, ...args), ms || 0) | |
} | |
} |
This file contains 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 GeoJS script is loaded asynchronously. --> | |
<script async src="https://get.geojs.io/v1/ip/geo.js"></script> | |
<!-- A function is defined to handle the JSON response from the GeoJS API. --> | |
<script type="application/javascript"> | |
function geoip(json) { | |
// The JSON data returned from GeoJS is parsed and the relevant fields are extracted and assigned to variables. | |
const cities = [ |
This file contains 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
sudo apt update && sudo apt upgrade -y | |
sudo apt install -y build-essential gpp g++ wget curl oathtool youtube-dl | |
sudo apt install -y unace rar unrar unzip p7zip-rar p7zip sharutils uudeview mpack arj cabextract lzip lunzip file-roller | |
sudo apt install -y tidy ubuntu-make build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev | |
sudo apt install -y libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev | |
#INSTALL RUBY | |
sudo apt install ruby-full -y | |
sudo gem update --system | |
sudo su -c "gem install sass" | |
sudo gem install compass |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/** | |
* Vsakemu switcherju oz boxu, ki spreminja pač kamero se doda tag, ki mora biti ime kamere na katero želi preklopit | |
* Vsak switcher mora imet to skripto not. Skripts-> CameraSwitcher | |
* | |
* */ | |
public class CameraSwitcher : MonoBehaviour |
This file contains 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
class Polygon { | |
static calcArea (...points) { | |
var area = 0; | |
var X = points.map((v) => { return v[0] }); | |
var Y = points.map((v) => { return v[1] }); | |
var numPoints = points.length; | |
var j = numPoints - 1; | |
var i = 0; |
This file contains 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
export default class Slider { | |
constructor(sliderWrapper) { | |
// wrapper, so it can handle multiple on the same page | |
this.sliderWrapper = document.querySelector(sliderWrapper); | |
if (! this.sliderWrapper) return; | |
// prev next buttons | |
this.prev = this.sliderWrapper.querySelector('.x-slider__prev'); | |
this.next = this.sliderWrapper.querySelector('.x-slider__next'); |
This file contains 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
$post_id = wp_insert_post([ | |
'post_type' => 'contact-form', | |
'post_title' => $_POST['name'] | |
]); | |
$data = [ | |
'email' => sanitize_email($_POST['email']), | |
'first' => sanitize_text_field($_POST['name']), | |
'last' => sanitize_text_field($_POST['surname']), | |
'message' => sanitize_textarea_field()($_POST['message']), |
NewerOlder