Showcase of AOS library that animates elements on scroll - use case of anchor & anchor-placement setting with different easing
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
<main class="main-container"> | |
<header class="main-header">HEADER</header> | |
<div class="main-content">MAIN CONTENT</div> | |
<footer class="main-footer">FOOTER</footer> | |
</main> |
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
{ | |
"html_attributions" : [], | |
"results" : [ | |
{ | |
"formatted_address" : "101 Plaza Center, Secaucus, NJ 07094, United States", | |
"geometry" : { | |
"location" : { | |
"lat" : 40.79164149999999, | |
"lng" : -74.0568873 | |
}, |
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 images for checkboxes and radiobuttons | |
*/ | |
body { | |
background-color: #fff; | |
color: #333; | |
font-family: "Open Sans", Arial, Helvetica, sans-serif; | |
line-height: 1.6; | |
} |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.table { | |
display: table; | |
/* border-collapse: separate; */ | |
border-collapse: collapse; |
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
<?php | |
//set up pods::find parameters to limit to 5 items | |
$param = array( | |
'limit' => 5, | |
); | |
//create pods object | |
$pods = pods('pod_name', $params ); | |
//check that total values (given limit) returned is greater than zero | |
if ( $pods->total() > 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
/* | |
No jQuery necessary. | |
Thanks to Dan's StackOverflow answer for this: | |
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport | |
*/ | |
function isElementInViewport(el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
rect.top >= 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
function onViewport(el, elClass, offset, callback) { | |
/*** Based on http://ejohn.org/blog/learning-from-twitter/ ***/ | |
var didScroll = false; | |
var this_top; | |
var height; | |
var top; | |
if(!offset) { var offset = 0; } | |
$(window).scroll(function() { |
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
<f:layout name="Page"/> | |
<div xmlns="http://www.w3.org/1999/xhtml" lang="en" | |
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers" | |
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"> | |
<f:section name="SimpleLanguageSwitcher"> | |
<!-- Get current language id, e.g. 0, 1 --> | |
<!-- In my case 0 = German, 1 = English --> | |
<f:if condition="{v:page.language(normalWhenNoLanguage: 1)} == 1"> |
NewerOlder