Skip to content

Commit

Permalink
auth page done
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Feb 27, 2013
1 parent 007ff1d commit 31da1ca
Show file tree
Hide file tree
Showing 11 changed files with 587 additions and 4 deletions.
15 changes: 15 additions & 0 deletions assets/css/_base/button.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.hexo-button
button_color(hex)
background hex
&:hover
background darken(hex, 30%)
&.red
button_color(color-red)
&.blue
button_color(color-blue)
&.green
button_color(color-green)
&.yellow
button_color(color-yellow)
&.grey
button_color(color-meta)
28 changes: 28 additions & 0 deletions assets/css/_base/layout.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*
margin 0
padding 0

body
font 14px font-default
background color-background
color color-font

a
text-decoration none
color color-link
&:hover
text-decoration underline

.alignleft
float left

.alignright
float right

.clearfix
clearfix()

input::-moz-focus-inner
button::-moz-focus-inner
padding 0
border 0
24 changes: 24 additions & 0 deletions assets/css/_base/variable.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
color-background = #eee
color-font = #444
color-meta = #999
color-border = #ddd
color-link = #258fb8

color-green = #1eba6b
color-red = #ed5b65
color-blue = #47A7EB
color-yellow = #E8ED5A

font-default = "Helvetica Neue", "Helvetica", Arial, sans-serif
font-serif = "Georgia", serif
font-mono = Monaco, Menlo, Consolas, Courier New, monospace

font-icon = FontAwesome
font-icon-path = 'font/fontawesome-webfont'

@font-face {
font-family 'FontAwesome'
font-style normal
font-weight normal
src url(font-icon-path.eot?#iefix) format('embedded-opentype'), url(font-icon-path.woff) format('woff'), url(font-icon-path.ttf) format('truetype'), url(font-icon-path.svg#FontAwesomeRegular) format('svg')
}
88 changes: 88 additions & 0 deletions assets/css/auth.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
@import 'nib'

@import '_base/variable'
@import '_base/layout'

#content
position absolute
top 50%
left 50%
margin-left -200px
margin-top -135px
width 400px
background #fff
border-radius 10px
box-shadow 0 0 15px #ddd
.logo
width 150px
height 150px
margin 40px auto 15px
position relative
&:before
content '\f023'
font 150px/1 font-icon
position absolute
left 0
top 0
width 100%
height 100%
text-align center
color #ccc
form
padding 0 30px 30px
height 35px
&.error
input
border-color color-red
button
background color-red
&:hover, &:active
background darken(color-red, 20%)
input
border 1px solid color-border
padding 0 10px
width 280px
font 14px/35px font-default
height 35px
border-right none
button
width 39px
height 37px
border none
background color-green
cursor pointer
position relative
&:hover, &:active
background darken(color-green, 20%)
&:before
width 100%
height 100%
position absolute
top 0
left 0
text-align center
content '\f00c'
font 20px/40px font-icon
color #fff

#footer
position fixed
bottom 0
left 0
width 100%
color color-meta
font-size 0.9em
a
color color-meta
float left
padding 0 10px
border-right 1px solid #fff
border-left 1px solid #ddd
&:first-child
padding-left 0
border-left none
&:last-child
padding-right 0
border-right none
.inner
padding 15px 20px
2 changes: 2 additions & 0 deletions lib/plugins/console/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ extend.console.register('server', 'Run server', function(args){

app.set('views', hexo.core_dir + 'views');
app.set('view engine', 'ejs');
app.locals.config = config;
app.locals.version = hexo.version;
//app.locals.layout = 'layout';
//app.locals.cache = true;
app.engine('ejs', require('../../render').renderFile);
Expand Down
145 changes: 145 additions & 0 deletions public/css/auth.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
@font-face {
font-family: 'FontAwesome';
font-style: normal;
font-weight: normal;
src: url("font/fontawesome-webfont.eot?#iefix") format('embedded-opentype'), url("font/fontawesome-webfont.woff") format('woff'), url("font/fontawesome-webfont.ttf") format('truetype'), url("font/fontawesome-webfont.svg#FontAwesomeRegular") format('svg');
}
* {
margin: 0;
padding: 0;
}
body {
font: 14px "Helvetica Neue", "Helvetica", Arial, sans-serif;
background: #eee;
color: #444;
}
a {
text-decoration: none;
color: #258fb8;
}
a:hover {
text-decoration: underline;
}
.alignleft {
float: left;
}
.alignright {
float: right;
}
.clearfix {
zoom: 1;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
input::-moz-focus-inner,
button::-moz-focus-inner {
padding: 0;
border: 0;
}
#content {
position: absolute;
top: 50%;
left: 50%;
margin-left: -200px;
margin-top: -135px;
width: 400px;
background: #fff;
-webkit-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: 0 0 15px #ddd;
box-shadow: 0 0 15px #ddd;
}
#content .logo {
width: 150px;
height: 150px;
margin: 40px auto 15px;
position: relative;
}
#content .logo:before {
content: '\f023';
font: 150px/1 FontAwesome;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
text-align: center;
color: #ccc;
}
#content form {
padding: 0 30px 30px;
height: 35px;
}
#content form.error input {
border-color: #ed5b65;
}
#content form.error button {
background: #ed5b65;
}
#content form.error button:hover,
#content form.error button:active {
background: #e7202d;
}
#content form input {
border: 1px solid #ddd;
padding: 0 10px;
width: 280px;
font: 14px/35px "Helvetica Neue", "Helvetica", Arial, sans-serif;
height: 35px;
border-right: none;
}
#content form button {
width: 39px;
height: 37px;
border: none;
background: #1eba6b;
cursor: pointer;
position: relative;
}
#content form button:hover,
#content form button:active {
background: #189556;
}
#content form button:before {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
text-align: center;
content: '\f00c';
font: 20px/40px FontAwesome;
color: #fff;
}
#footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
color: #999;
font-size: 0.9em;
}
#footer a {
color: #999;
float: left;
padding: 0 10px;
border-right: 1px solid #fff;
border-left: 1px solid #ddd;
}
#footer a:first-child {
padding-left: 0;
border-left: none;
}
#footer a:last-child {
padding-right: 0;
border-right: none;
}
#footer .inner {
padding: 15px 20px;
}
Binary file added public/css/font/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit 31da1ca

Please sign in to comment.