-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Max Degterev
committed
Feb 27, 2012
0 parents
commit f892979
Showing
8 changed files
with
1,870 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Zepto window scroll plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE HTML> | ||
<html lang="en-US"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Zepto onScroll</title> | ||
<link rel="stylesheet" href="static/reset.css"> | ||
<link rel="stylesheet" href="static/style.css"> | ||
</head> | ||
<body> | ||
<div id="main"> | ||
<h1>Add some gold.</h1> | ||
|
||
<p>Look what I'm dealing with, man. I'm dealing with fools and trolls. I'm dealing with soft targets, and it's just strafing runs in my underwear before my first cup of coffee … they lay down with their ugly wives and their ugly children and just look at their loser lives and then they look at me and say, 'I can't process it.' Well, no, and you never will! Stop trying! Just sit back and enjoy the show.</p> | ||
|
||
<p>I am on a drug. It's called Charlie Sheen. It's not available. If you try it once, you will die. Your face will melt off and your children will weep over your exploded body.</p> | ||
|
||
<p>It's being directed and written by a genius named David Ward who, I don't know, won the Academy Award at 23 for writing The Sting? It was his pen and his vision that created the classic that we know today as Major League. In fact, a lot of people think the movie's called Wild Thing, as they should. Whatever … If they want me in it, it's a smash. If they don't, it's a turd that opens on a tugboat.</p> | ||
|
||
<p>I tried marriage. I'm 0 for 3 with the marriage thing. So, being a ballplayer — I believe in numbers. I'm not going 0 for 4. I'm not wearing a golden sombrero.</p> | ||
|
||
<a id="ttp" href="javascript:void(0);">To the top, please!</a> | ||
</div> | ||
|
||
<script src="static/zepto.js"></script> | ||
<script src="static/zepto.scroll.js"></script> | ||
<script src="static/script.js"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
/** | ||
* Old HTML5 ✰ Boilerplate plus some extra tweaks | ||
* | ||
* html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline) | ||
* v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark | ||
* html5doctor.com/html-5-reset-stylesheet/ | ||
* | ||
*/ | ||
|
||
/** | ||
* Basic reset | ||
*/ | ||
|
||
html, body, body div, span, object, iframe, | ||
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, | ||
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, | ||
fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, canvas, details, figcaption, figure, | ||
footer, header, hgroup, menu, nav, section, summary, | ||
time, mark, audio, video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-size: 100%; | ||
vertical-align: baseline; | ||
} | ||
|
||
/* | ||
* 1) Keeps page centred in all browsers regardless of content height | ||
* 2) Removes Android and iOS tap highlight color to prevent entire container being highlighted | ||
* www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/ | ||
* 3) Prevents iOS text size adjust after orientation change, without disabling user zoom | ||
* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ | ||
*/ | ||
html { | ||
overflow-y: scroll; /* 1 */ | ||
-webkit-tap-highlight-color: rgba(0,0,0,0); /* 2 */ | ||
-webkit-text-size-adjust: 100%; /* 3 */ | ||
-ms-text-size-adjust: 100%; /* 3 */ | ||
} | ||
|
||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { | ||
display: block; | ||
} | ||
|
||
/* | ||
* Corrects inline-block display not defined in IE6/7/8/9 & FF3 | ||
*/ | ||
audio, | ||
canvas, | ||
video { display: inline-block; *display: inline; *zoom: 1; } | ||
|
||
|
||
|
||
/* | ||
* Prevents modern browsers from displaying 'audio' without controls | ||
*/ | ||
audio:not([controls]) { display: none; } | ||
|
||
/* | ||
* Addresses styling not present IE6/7/8/9, FF3, S4 | ||
* Ensures content is hidden from all presentations, including screenreaders | ||
*/ | ||
[hidden] { display: none; } | ||
|
||
/* | ||
* 1. Improve image quality when scaled in IE7: h5bp.com/d | ||
* 2. Remove the gap between images and borders on image containers: h5bp.com/e | ||
*/ | ||
img { -ms-interpolation-mode: bicubic; vertical-align: middle; } | ||
|
||
/* | ||
* Correct overflow not hidden in IE9 | ||
*/ | ||
svg:not(:root) { overflow: hidden; } | ||
|
||
/** | ||
* Some styling tweaks you might want to review | ||
*/ | ||
blockquote, q { quotes: none; } | ||
blockquote:before, blockquote:after, | ||
q:before, q:after { content: ''; content: none; } | ||
|
||
ins { background-color: #ff9; color: #000; text-decoration: none; } | ||
|
||
mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } | ||
|
||
del { text-decoration: line-through; } | ||
|
||
abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } | ||
dfn { font-style: italic; } | ||
|
||
table { border-collapse: collapse; border-spacing: 0; } | ||
td { vertical-align: top; } | ||
|
||
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } | ||
|
||
/** | ||
* Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/ | ||
*/ | ||
body { font: 13px/1.231 sans-serif; *font-size: small; } /* Hack retained to preserve specificity */ | ||
|
||
/* Normalize monospace sizing: | ||
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */ | ||
pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; } | ||
pre { | ||
/* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */ | ||
white-space: pre; white-space: pre-wrap; word-wrap: break-word; | ||
} | ||
|
||
/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */ | ||
a:hover, a:active, input:hover, input:active { outline: 0; } | ||
|
||
/* Remove default styles for lists */ | ||
ul, ol, li { list-style:none; list-style-image: none; } | ||
|
||
small { font-size: inherit; } | ||
|
||
/* Set sub, sup without affecting line-height: gist.github.com/413930 */ | ||
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } | ||
sup { top: -0.5em; } | ||
sub { bottom: -0.25em; } | ||
|
||
/* 1) Make inputs and buttons play nice in IE: www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ | ||
2) WebKit browsers add a 2px margin outside the chrome of form elements. | ||
Firefox adds a 1px margin above and below textareas | ||
3) Set font-size to match <body>'s, and font-family to sans-serif | ||
4) Align to baseline */ | ||
button, input, select, textarea { width: auto; overflow: visible; margin: 0; font-size: 100%; font-family: sans-serif; vertical-align: baseline; *vertical-align: middle; } | ||
|
||
/* 1) Remove default scrollbar in IE: www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ | ||
2) Align to text-top | ||
3) Only vertical resize which is best in most cases */ | ||
textarea { overflow: auto; vertical-align: top; resize: vertical; } | ||
|
||
/* Hand cursor on clickable input elements */ | ||
label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; } | ||
|
||
/* | ||
* Corrects inability to style clickable 'input' types in iOS | ||
*/ | ||
button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; } | ||
|
||
/* | ||
* 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet) | ||
* 2. Correct inner spacing displayed oddly in IE6/7 | ||
*/ | ||
button, input { line-height: normal; *overflow: visible; } | ||
|
||
/* | ||
* Addresses box sizing set to content-box in IE8/9 | ||
*/ | ||
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; } | ||
|
||
/* | ||
* 1. Addresses appearance set to searchfield in S5, Chrome | ||
* 2. Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) | ||
*/ | ||
input[type="search"] { -webkit-appearance: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } | ||
|
||
/* | ||
* Corrects inner padding displayed oddly in S5, Chrome on OSX | ||
*/ | ||
input[type="password"], | ||
input[type="search"]::-webkit-search-decoration, | ||
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; } | ||
|
||
/* Remove extra padding and inner border in Firefox */ | ||
input::-moz-focus-inner, button::-moz-focus-inner { border: 0; padding: 0; } | ||
|
||
/* | ||
* Delete this if you don't want to support IE6-7 | ||
*/ | ||
legend { *margin-left: -7px; } | ||
|
||
/* | ||
* Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7 | ||
*/ | ||
table button, table input { *overflow: auto; } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$('#ttp').on('click', function(e) { | ||
$.scroll(0); | ||
}); |
Oops, something went wrong.