Skip to content

Commit

Permalink
Archive mail
Browse files Browse the repository at this point in the history
  • Loading branch information
simurai committed Feb 8, 2014
1 parent a41b89d commit 20f35f0
Show file tree
Hide file tree
Showing 13 changed files with 1,621 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2012-10-23-flexible-web-apps.md
Expand Up @@ -18,4 +18,4 @@ __Quick note__: [@kizmarh](https://twitter.com/kizmarh) actually did the header

PS. This was my first time ever talking in front of people.. so it might be a bit rough and rushed. ;-)

__Update__: Uploaded the [Mail UI](http://archive.simurai.com/lab/flapps/mail/) example, but the code might be a bit messy. I just quickly did for the talk. Also, only tested in Chrome.
__Update__: Uploaded the [Mail UI](/archive/mail/) example, but the code might be a bit messy. I just quickly did for the talk. Also, only tested in Chrome.
205 changes: 205 additions & 0 deletions archive/mail/app.css
@@ -0,0 +1,205 @@

/* nav ----------------------------------- */

nav {
flex: 0 0 auto;
background-color: hsl(0,0%,25%);
padding: 10px 10px 0 10px;
margin: 0;
list-style: none;
overflow-y: scroll;
-webkit-overfow-scrolling: touch;

display: flex;
flex-direction: column;
justify-content: space-between;
}

.button-group {
margin-bottom: 10px;
}

nav button {
display: block;
background-color: hsl(0,0%,50%);
width: 60px;
height: 60px;
padding: 0;
margin: 0 0 10px 0;
font-size: 30px;
border: none;
background: linear-gradient( hsl(0,0%,50%), hsl(0,0%,40%));
box-shadow: inset 0 1px 0 hsla(0,0%,100%,.3),
inset 0 -1px 3px hsla(0,0%,0%,.5),
0 1px 3px hsla(0,0%,0%,.8);
}


/* aside ----------------------------------- */

aside {
flex: 1 1 auto;
display: flex;
flex-direction: column;
height: 100%;

background-color: hsl(0,0%,80%);
border-right: 1px solid hsl(0,0%,70%);
}


aside h1 {
text-align: left;
}


/* list */

.list {
flex: 1 1 auto;
min-height: 0;
background-color: hsl(0,0%,15%);
padding: 0px;
margin: 0;
list-style: none;
overflow-y: scroll;
-webkit-overfow-scrolling: touch;
}

.list-item {
padding: 30px 20px;
border-bottom: 1px solid hsl(0,0%,70%);
background: hsl(0,0%,90%);
cursor: pointer;
}

.list-item:active {
background: hsl(0,0%,80%);
}

.list-item.active {
background: hsl(0,0%,95%);
}




/* section ----------------------------------- */

section {
flex: 1 1 auto;
display: flex;
flex-direction: column;
}

.back {
width: 50px;
margin-right: 10px;
cursor: pointer;
display: none;
}

.back:active {
background: hsl(0,0%,40%);
}

.reply {
padding: 10px;
background-color: hsl(0,0%,80%);
border-bottom: 1px solid hsl(0,0%,80%);
}

textarea {
display: block;
margin: 0;
box-sizing: border-box;
padding: 10px;
width: 100%;
resize: vertical;
height: 100px;
font: inherit;
border: 1px solid hsl(0,0%,80%);
background-color: hsl(0,0%,95%);
}
textarea:focus {
outline: none;
border: 1px solid hsl(210,60%,60%);
background-color: hsl(0,0%,98%);
}

.from {
margin: 0;
padding: 10px;
text-align: center;
font-weight: normal;
color: hsl(0,0%,70%);
border-bottom: 1px solid hsl(0,0%,80%);
background-color: hsl(0,0%,90%);
}

.message {
padding: 20px;
flex: 1 1 auto;
overflow: auto;
min-height: 0;
background-color: hsl(0,0%,98%);
}

.message p {
margin: 0 0 20px 0;
}



/* narrow ----------------------------------- */

@media (max-width: 800px) {

nav {
position: relative;
z-index: 2;
}

aside {
//opacity: 0;
//pointer-events: none;
}

.back {
display: block;
}

section {
flex: 1 1 auto;
}

.isList section,
.isMessage aside {
position: absolute;
top: 0;
left: 80px;
z-index: -1;
pointer-events: none;
}

.isList aside {
z-index: 1;
-webkit-animation: isListSlide .2s cubic-bezier(0, .30, .10, 1);
}
@-webkit-keyframes isListSlide {
0% { -webkit-transform: translate3d(-30%,0,0); }
100% { -webkit-transform: translate3d(0,0,0); }
}


.isMessage section {
z-index: 1;
-webkit-animation: isMessageSlide .2s cubic-bezier(0, .30, .10, 1);
}
@-webkit-keyframes isMessageSlide {
0% { -webkit-transform: translate3d(30%,0,0); }
100% { -webkit-transform: translate3d(0,0,0); }
}


}
11 changes: 11 additions & 0 deletions archive/mail/app.js
@@ -0,0 +1,11 @@
$(document).ready(function(){

$(".list-item").click( function(e){
$("html").attr("class", "isMessage");
});

$("#back").click( function(e){
$("html").attr("class", "isList");
});

});
18 changes: 18 additions & 0 deletions archive/mail/font-awesome/README.md
@@ -0,0 +1,18 @@
#Font Awesome 2.0
##the iconic font designed for use with Twitter Bootstrap

The full suite of pictographic icons, examples, and documentation can be found at:
http://fortawesome.github.com/Font-Awesome/

##Contact
- Email: dave@davegandy.com
- Twitter: http://twitter.com/fortaweso_me
- Work: Lead Product Designer @ http://kyru.us

##License
Version 2.0 of the Font Awesome font, CSS, and LESS files are licensed under CC BY 3.0:
http://creativecommons.org/licenses/by/3.0/
A mention of 'Font Awesome - http://fortawesome.github.com/Font-Awesome'
in human-readable source code is considered acceptable attribution (most common on the
web). If human readable source code is not available to the end user, a mention in an 'About'
or 'Credits' screen is considered acceptable (most common in desktop or mobile software).

0 comments on commit 20f35f0

Please sign in to comment.