Skip to content

Instantly share code, notes, and snippets.

@SindhujaD
Created January 6, 2014 01:20
Show Gist options
  • Save SindhujaD/8276588 to your computer and use it in GitHub Desktop.
Save SindhujaD/8276588 to your computer and use it in GitHub Desktop.
A Pen by JaT5.
<main>
<input placeholder="Search, or say OK Google" x-webkit-speech autocomplete="off" />
<header></header>
<section class="card">
<h1>Welcome to Google Now</h1>
<h2>Everything is currently a work in progress. Any card marked with an <span class="blue">asterik (*)</span> is currently being worked on. Hope you enjoy this project!</h2>
</section>
<section class="card">
<h1>Cards show up here when you need them</h1>
<h2>Over time, prediction improves and more cards appear. To see examples, check out the sample cards.</h2><hr>
<span class="blue icon-file-text"></span> <span class="blue">Show sample cards</span>
</section>
<section class="card">
<h1>Swipe cards away when you don't need them</h1>
<h2>Over time, prediction improves and more cards appear. To see examples, check out the sample cards.</h2><br>
<p class="center"><span class="blue icon-arrow-left"></span> <span class="blue">Go ahead, try it.</span> <span class="blue icon-arrow-right"></span></p>
<br>
</section>
<section class="card">
<h1>John Doe is at work</h1>
<div class="work"></div>
</section>
<section class="card">
<h1>Sammy Soe<span class="blue">*</span></h1>
<h2>is 100 feet away</h2>
</section>
<section class="card">
<h1>Ralph Roe has left work<span class="blue">*</span></h1>
<span class="g-title">12 min</span> from home<br>
<span>Updated 4 min ago</span>
<div class="left"></div>
<div class="question">Ralph Roe has allowed you to see updated on his commute. Interested in updates on Ralph Roe's commute? <u>Learn more</u><br><br>
<span class="offset">Yes</span><span class="offset">No</span></div>
</section>
<section class="card">
<h1>Happy Birthday!</h1>
<div class="birthday"></div>
<h2>You are 590,805,235 seconds young today!</h2>
</section>
<section class="card">
<h1><time></time> Wednesday<span class="blue">*</span></h1>
<h2>Time at home</h2>
</section>
<section class="card">
<h1><span class="bold o-title">18 minutes</span> to Work</h1>
<h2>GA-151 S and GA-2 W</h2>
<div class="map"></div>
<span class="blue icon-location-arrow"></span> <span class="blue">Navigate / 18 min via GA-151 S and GA-2 W</span>
</section>
<section class="card">
<h1>Stocks today</h1>
<h2>Updated: 4:00 PM, November 12</h2><hr>
<div class="stock">APPL<span class="offset blue">520.01</span><span class="offset red">-10.06</span><span class="offset red">-0.98%</span></div><hr>
<div class="stock">GOOG<span class="offset blue">1,011.78</span><span class="offset green">1.19</span><span class="offset green">0.12%</span></div><hr>
</section>
<section class="card">
<h1><span class="bold r-title">Storm warning</span></h1>
<h2>Madison, WI - May 08, 9:55am EST</h2>
<p>Severe thunderstorm, observed today and radar continues to indicate a tornado. This tornado is located 6mi south of Madison, moving north.</p>
<div class="storm"></div>
<span class="blue icon-file-text"></span> <span class="blue">Read more</span>
</section>
<section class="card">
<h1>The Connaught Hotel<span class="blue">*</span></h1>
<h2>Carlos Place, Mayfair, London W1K 2AL, United Kingdom</h2>
<span class="r-title">Checkout is at 1:15 PM</span>
<div class="hotel"></div>
</section>
<section class="card">
<h2>News related to a story you read earlier</h2>
<h1>Boston bombings suspect taken from hospital to prison - CBS News</h1>
<h2>Source: CBS News - 10 hours ago</h2><hr>
<span class="blue icon-globe"></span> <span class="blue">Read full story</span>
</section>
<section class="card">
<h1>Lunch with John @ 12pm</h1>
<h2>827 Broad St Chattanooga, TN 37402</h2>
<div class="lunch"></div>
<span class="blue icon-bullhorn"></span> <span class="blue">Remind me</span><hr>
<span class="blue icon-location-arrow"></span> <span class="blue">Directions to 827 Broad St Chattanooga, TN 37402</span>
</section>
<section class="card">
<h2>42 kilometers is<span class="blue">*</span></h2>
<h1>26.097 miles</h1><hr>
</section>
<section class="card">
<h1>Monday, July 1</h1>
<h2>Canada Day 2013</h2><hr>
<span class="blue icon-bullhorn"></span> <span class="blue">Remind me</span>
</section>
<section class="card">
<h1>Watching live TV?</h1>
<h2>Samsung TV found on Wi-Fi network</h2><hr>
<span class="blue icon-microphone"></span> <span class="blue">Listen for a TV show</span>
</section>
<section class="card">
<h1>View nearby events<span class="blue">*</span></h1>
<h2>Justin Bieber - Nicki Minaj - other crappy singers...</h2>
</section>
<section class="card">
<h1>Photo spots nearby<span class="blue">*</span></h1>
</section>
<section class="card">
<h1>Stop by the post office</h1>
<span class="icon-bell"></span> 2:10PM <br> <hr>
<span class="blue icon-time"></span> <span class="blue">Snooze</span>
</section>
</main>
var time = new Date();
var h = time.getHours();
if (h > 12) {
h -= 12;
} else if (h === 0) {
h = 12;
}
var m = time.getMinutes();
if (m < 10){ m = "0" + m; }
$("time").text(h + ":" + m);
@import url(http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,700,500italic,900,700italic,900italic);
@import "http://www.oceanicviewstudios.com/css/font-awesome.min.css";
* { font-family: 'Roboto', sans-serif; line-height:1.2; vertical-align:middle; }
body { background:#f5f5f5; color:gray; }
p {
font-size:.9rem;
color:gray;
font-weight:400;
}
main {
display:block;
position:relative;
width:30rem;
margin:3vh auto;
padding:1.5rem 0 0;
background:#e5e5e5;
outline
border-radius:.25rem;
overflow:hidden;
}
header {
position:absolute;
z-index:0;
top:0; left:0; right:0;
height:10rem;
transition:transform .5s, opacity .3s;
background:url(http://www.droid-life.com/wp-content/uploads/2013/01/googlenownewyork.png) center center;
background-size:cover;
}
input, .card {
position:relative;
z-index:2;
}
input {
display:block;
width:26rem;
margin:4.5rem 1rem 2rem;
border:0;
font-size:1.2rem;
font-weight:300;
padding:.75rem 1rem;
border-radius:3px;
box-shadow:0 1px 2px #aaa;
transition:.5s, margin-bottom .15s;
}
input:focus {
margin:0 1rem 1rem;
outline:0;
}
input:focus + header {
transform:translate3d(0,-10rem,0);
opacity:0;
}
hr {
background: #f3f3f3;
clear: both;
float: none;
width: 100%;
height: 1px;
border: none;
}
.card {
padding:1rem 1rem 1.5rem 1.5rem;
box-shadow:0 1px 2px #aaa;
background:white;
margin:0 1rem 1rem;
border-radius:3px;
user-select:none;
animation:fly-in-from-left .5s 1s ease both;
transform-origin:top left;
}
.card:nth-child(even){
animation-name:fly-in-from-right;
animation-delay:1.1s;
transform-origin:top right;
}
@keyframes fly-in-from-left {
from {
transform:translateY(15rem) rotate(15deg);
opacity:0;
}
}
@keyframes fly-in-from-right {
from {
transform:translateY(15rem) rotate(-15deg);
opacity:0;
}
}
.card:after {
font-family: FontAwesome;
position:absolute;
font-size:.9rem;
top:1.5rem;
right:1rem;
content:"\f142";
color:gray;
width:1rem;
line-height:1rem;
text-align:center;
border-radius:50%;
pointer-events:none;
}
h1 {
font-size:2rem;
font-weight:200;
}
span.bold {
font-weight: 400;
}
span.r-title {
color: #ff4444;
}
span.o-title {
color: #ff8800;
}
span.g-title {
color: hsl(90, 55%, 44%);
}
span.red {
color: hsl(350, 55%, 49%);
}
span.green {
color: hsl(90, 55%, 44%);
}
span.blue {
color: hsl(194, 73%, 51%);
}
span.offset {
margin-left: 65px;
}
.center {
text-align: center;
}
h2 {
font-size:.9rem;
line-height:2.5;
color:gray;
font-weight:400;
}
.birthday{
height:12rem;
background-image:url(http://i.imgur.com/S08LqoZ.png);
margin:.5rem 0 0 -1.5rem;
width:28rem;
}
.map {
height:12rem;
background-image: url(http://i.imgur.com/D6ravs9.png);
margin:.5rem 0 1.5rem -1.5rem;
width:28rem;
}
.storm {
height:12rem;
background-image: url(http://i.imgur.com/N6QCJE2.png);
margin:.5rem 0 1.5rem -1.5rem;
width:28rem;
}
.hotel {
height:12rem;
background-image: url(http://i.imgur.com/E31pRwG.png);
margin:.5rem 0 1.5rem -1.5rem;
width:28rem;
}
.lunch {
height:12rem;
background-image: url(http://i.imgur.com/bIKbxfo.jpg);
margin:.5rem 0 1.5rem -1.5rem;
width:28rem;
}
.work {
height:12rem;
background-image: url(http://i.imgur.com/CT7dzFK.jpg);
margin:.5rem 0 1.5rem -1.5rem;
width:28rem;
}
.left {
height:12rem;
background-image: url(http://i.imgur.com/CdGPsgl.jpg);
margin:.5rem 0 0 -1.5rem;
width:28rem;
}
.question {
background-color: #5cc5ec;
color: #fff;
font-style:italic;
height:6rem;
padding: 25px 0 0 0;
margin:0 0 0 -1.5rem;
width:28rem;
}
.question:after {
content:'';
display:block;
position:absolute;
top:272px;
left:400px;
width:0;
height:0;
border-color: transparent transparent #5cc5ec transparent;
border-style: solid;
border-width: 10px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment