-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
274 additions
and
187 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
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,52 @@ | ||
// Copyright 2015 Steven Le ([email protected]) | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Scrollfix. | ||
* @author [email protected] (Steven Le) | ||
*/ | ||
|
||
goog.provide('base.scrollfix'); | ||
|
||
/** @private {Element} */ | ||
base.scrollfix.scrollEl_ = null; | ||
|
||
/** @private {Element} */ | ||
base.scrollfix.fixedEl_ = null; | ||
|
||
/** | ||
* Initializes a scrollfix element. | ||
* @param {!Element} scrollEl Element to monitor for scroll. | ||
* @param {!Element} fixedEl Element to attach an "active" class to when the | ||
* user scrolls past the {@code scrollEl} element. | ||
*/ | ||
base.scrollfix.init = function(scrollEl, fixedEl) { | ||
base.scrollfix.scrollEl_ = scrollEl; | ||
base.scrollfix.fixedEl_ = fixedEl; | ||
|
||
document.body.onscroll = base.scrollfix.onScroll_; | ||
base.scrollfix.onScroll_(); | ||
}; | ||
|
||
/** | ||
* On scroll callback function. | ||
* @private | ||
*/ | ||
base.scrollfix.onScroll_ = function() { | ||
var scrollTop = window.pageYOffset || document.body.scrollTop; | ||
var clientTop = document.body.clientTop || 0; | ||
var top = scrollTop - clientTop; | ||
base.scrollfix.fixedEl_.classList.toggle( | ||
'active', top > base.scrollfix.scrollEl_.offsetTop); | ||
}; |
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,176 @@ | ||
// Copyright 2015 Steven Le ([email protected]) | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
body { | ||
color: #333; | ||
font-family: 'Open Sans', sans-serif; | ||
font-size: 14px; | ||
font-weight: 300; | ||
line-height: 22px; | ||
} | ||
h1, | ||
h2, | ||
h3, | ||
h4 { | ||
font-weight: 400; | ||
} | ||
|
||
code { | ||
background-color: #f5f5f5; | ||
background-image: radial-gradient(#fcfcfc, #f5f5f5); | ||
border: 1px solid #dedede; | ||
font-family: monospace; | ||
padding: 2px 4px; | ||
white-space: nowrap; | ||
} | ||
|
||
pre code { | ||
border-radius: 3px; | ||
display: block; | ||
padding: 10px; | ||
white-space: pre-wrap; | ||
} | ||
|
||
table { | ||
font-weight: 300; | ||
table-layout: fixed; | ||
width: 100%; | ||
|
||
thead th { | ||
font-weight: 400; | ||
} | ||
tbody td { | ||
font-weight: 300; | ||
} | ||
td, | ||
th { | ||
padding: 10px 0; | ||
} | ||
tr { | ||
border-bottom: 1px solid #dedede; | ||
} | ||
} | ||
|
||
.button { | ||
background-color: #2996cc; | ||
border-radius: 3px; | ||
color: #fff; | ||
cursor: pointer; | ||
display: inline-block; | ||
font-size: 13px; | ||
font-weight: 400; | ||
padding: 10px 40px; | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
transition: background-color 0.3s; | ||
|
||
&:hover { | ||
background-color: #2586b7; | ||
} | ||
} | ||
|
||
.border-bottom { | ||
border-bottom: 1px solid #dedede; | ||
} | ||
|
||
#overview { | ||
background-color: #5fb7e4; | ||
background-image: radial-gradient(circle, #5fb7e4, #4ca4d2); | ||
color: #fff; | ||
|
||
h1 { | ||
font-size: 20px; | ||
line-height: 32px; | ||
margin-bottom: 0; | ||
text-transform: uppercase; | ||
} | ||
|
||
h2 { | ||
font-size: 38px; | ||
font-weight: 300; | ||
line-height: 40px; | ||
max-width: 400px; | ||
} | ||
} | ||
|
||
.subnav { | ||
background-color: #f5f5f5; | ||
background-image: radial-gradient(#fcfcfc, #f5f5f5); | ||
border-bottom: 1px solid #dedede; | ||
border-top: 1px solid #dedede; | ||
padding: 15px 0; | ||
|
||
a, | ||
a:visited { | ||
color: #2996cc; | ||
font-size: 13px; | ||
font-weight: 400; | ||
margin-right: 20px; | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
} | ||
a:hover { | ||
color: #2586b7; | ||
} | ||
|
||
&.scrollfix { | ||
display: none; | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
z-index: 100; | ||
} | ||
&.scrollfix.active { | ||
display: block; | ||
} | ||
} | ||
|
||
#grid .content { | ||
padding: 60px 0; | ||
} | ||
|
||
.demo { | ||
padding: 20px 0; | ||
|
||
h4 { | ||
font-weight: 300; | ||
} | ||
} | ||
.demo-box { | ||
background-color: #f5f5f5; | ||
background-image: radial-gradient(#fcfcfc, #f5f5f5); | ||
border: 1px solid #dedede; | ||
border-radius: 3px; | ||
height: 20px; | ||
width: 100%; | ||
|
||
&.short { | ||
height: 10px; | ||
} | ||
&.tall { | ||
height: 50px; | ||
} | ||
} | ||
|
||
.icon { | ||
height: 50px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
width: 50px; | ||
|
||
&.placeholder { | ||
border: 2px solid #dedede; | ||
border-radius: 50%; | ||
} | ||
} |
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
Oops, something went wrong.