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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/*********************** | |
YouTube api feed BEGIN | |
***********************/ | |
$(document).ready(function () { | |
var channelId = "UCrhuhV3v32U8DbI25GUsdIA"; | |
var apiKey = "AIzaSyCE-obn38anepy2x4JmF-wOdCseiE234Zo"; | |
$.ajax({ | |
type: "GET", | |
url: "https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=" + channelId + "&maxResults=10&order=date&type=video&key=" + apiKey, |
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
<? | |
$channel_id = "UCrhuhV3v32U8DbI25GUsdIA"; | |
$api_key = "AIzaSyCE-obn38anepy2x4JmF-wOdCseiE234Zo"; | |
$video_list_query = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=". $channel_id. "&maxResults=10&order=date&type=video&key=". $api_key); | |
$video_list = json_decode($video_list_query); | |
?> | |
<? | |
foreach ($video_list->items as $video) : |
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
<? | |
$full_link = strval($arItem["PROPERTIES"]["LINK_TO_MAP"]["~VALUE"]); | |
preg_match('~src="(.*?)"~', $full_link, $matches); | |
?> | |
<a href="<?=$matches[1]?>" class="shop__map fancy-map">Схема проезда</a> |
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
/*********************** | |
Waypoints BEGIN | |
***********************/ | |
$(function () { | |
var itemQueue = []; | |
var delay = 150; | |
var queueTimer; | |
function processItemQueue() { | |
if (queueTimer) return; |
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
<div class="circle days"></div> | |
<div class="circle hours"></div> | |
<div class="circle minutes"></div> | |
<div class="circle seconds"></div> |
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
<script> | |
function setIntroHeight(){ | |
var vh = window.innerHeight * 0.01; | |
document.documentElement.style.setProperty('--vh', vh + 'px'); | |
} | |
setIntroHeight(); | |
</script> | |
<style> | |
.block{ |
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
<? $watermark = Array( | |
array("name" => "watermark", "position" => "bottomright", "size"=>"real", "file"=>$_SERVER['DOCUMENT_ROOT'].SITE_TEMPLATE_PATH."/img/watermark.png"), | |
array("name" => "watermark", "position" => "center", "size"=>"real", "file"=>$_SERVER['DOCUMENT_ROOT'].SITE_TEMPLATE_PATH."/img/watermark_text.png") | |
);?> | |
<?$photo_resized = CFile::ResizeImageGet($photo, array('width'=>960, 'height'=>640), BX_RESIZE_IMAGE_EXACT, false,$watermark);?> |
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
<video loop muted autoplay id="head_video"> | |
<source src="" type="video/webm" id="source_webm"> | |
<source src="" type="video/mp4" id="source_mp4"> | |
</video> | |
<script> | |
var aboutHeaderCheck = function() { | |
var aboutHeader = document.querySelector('.s-about-head'); | |
var video = document.getElementById("head_video"); | |
var video_mp4 = document.getElementById("source_mp4"); |
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 getCoords(elem) { | |
const box = elem.getBoundingClientRect(); | |
return { | |
top: box.top + pageYOffset, | |
left: box.left + pageXOffset | |
}; | |
} |
OlderNewer