Skip to content

Commit

Permalink
v2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
laiwei committed Dec 2, 2012
1 parent 8c6267b commit 1e06055
Show file tree
Hide file tree
Showing 21 changed files with 1,235 additions and 300 deletions.
163 changes: 48 additions & 115 deletions past/static/css/all.css
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
html{-webkit-text-size-adjust:none;-ms-text-size-adjust:none;}
body,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button{margin:0;padding:0;}
img{border:0 none;}
body{font-family:"Microsoft Yahei",Tahoma;background:#E3E8EC url(/static/img/bg.gif) repeat;}
.wrapper{width:940px;position:relative;margin:0 auto;}
ul li{list-style:square;}
ol li{margin:0px 0px 0px 1.5em;}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;font-weight:normal;}
sup{top:-0.5em;margin-left:5px;}
sub{bottom:-0.25em;}
a:link,a:visited,a:active{color:#6E3939;text-decoration:none;}
a:hover{color:#CB2027;text-decoration:underline;}
.fr{float:right;}
.fl{float:left;}
.clear{clear:both;}

/*header*/
#header{width:100%;display:block;height:50px;background:url(/static/img/top-bar-white.png) 0 bottom repeat-x;margin-bottom:5px;position:fixed;z-index:5;top:0;left:0;}
#header .wrapper{height:45px;font-size:20px;background:rgba(250, 250, 250, 0.3);}
#past{position:absolute;left:50%;top:10px;margin-left:-61px;}
#thepast{margin:55px auto 0;width:940px;}
#thepast h2{padding:10px 15px;color:#6E3939;font-size:16px;}
#thepast p{margin:0 15px 8px;color:#777;text-shadow:rgba(255, 255, 255, 0.9) 0px 1px 0px;text-indent:2em;font-size:13px;}
#thepast p.thepast_c{text-align:center;color:#6E3939;}
.thepast_bd{border-bottom:1px dashed #CCC;padding-bottom:8px;}
.dotted{border-bottom:1px dotted #aaa;}
#menu_l,#menu_r{position:absolute;top:0;height:45px;line-height:45px;}
#menu_l{left:0;}
#menu_r{right:0;}
#menu_l a.active{color:#CB2027;background:url(/static/img/nav_st.png) -30px 0 repeat-x;border:1px solid #EEE;border-width:0 1px;}
#menu_l a{display:block;padding:0 15px;float:left;font-size:16px;text-decoration:none;}

#menu{float:right;position:relative;}
#menu li{list-style: none;}
#navi_comt{margin-left:-240px;left:50%;top:-220px;font-size:12px;color:#999;width: 435px;box-shadow:inset 0 -1px 0 white,0 1px 6px rgba(0, 0, 0, .3);border-bottom:2px solid #EFEBDA;background:url(/static/img/tips_bg.gif) 0 0 repeat;padding: 15px 30px 15px 15px;border-bottom-left-radius: 5px;border-bottom-right-radius:5px;position:fixed;z-index:4;border-bottom-right-radius:5px;}
#navi_comt textarea{line-height: 24px;font-size: 12px;margin-top:5px;height:145px;font-family:"Microsoft Yahei",Tahoma;background:url(/static/img/comt.png);border:0 none;outline:none;resize:none;width:100%;overflow-y:hidden;height:150px;}
#navi_comt input{padding:8px 12px;float:right;font-family:"Microsoft Yahei",Tahoma;line-height:28px;border:1px solid #DDD;background:#F0EDED;padding:0 15px;border-radius:5px;font-size:13px;color:#CB2027;cursor:pointer;}

.from a{opacity: 0.17;}
.from a:hover{opacity:0.47;}
.oauth a{opacity:1;}
.from {display:inline-block;margin:0 0 -2px 0px;}
.from a{background:url(/static/img/sns.png) no-repeat;display:inline-block;text-indent:-9999em;width:16px;height:16px;}
.from.twitter a{background-position:0 -16px;}
.from.sina a{background-position:0 -32px;}
.from.douban a{background-position:0 -48px;}
.from.wordpress a{background-position:0 -64px;}
.from.thepast a{background-position:0 -80px;}
.from.renren a{background-position:0 -96px;}
.from.instagram a{background-position:0 -112px;}

.time{font-size:11.5px;color:#999;font-style:italic;}

/*sidebar*/
#sidebar{float:left;width:210px;margin-top:28px;margin-right:28px;}
.side_box{padding:15px;background-color:white;box-shadow:0 1px 3px rgba(34, 25, 25, .4);margin-bottom:28px;}
#user_info .avatar{float:left;margin-right:15px;width:64px;height:64px;}
#user_info .name{margin:0 6px 2px 4px;}
.info_profile{border-bottom: 1px solid #F5F2F2;margin-left:-15px;margin-right:-15px;padding:0 15px 15px;}
.info_inner{background:#FFFEF0;margin:0 -15px -15px;padding:10px 15px;line-height:22px;word-wrap:break-word;}

#new_bar{margin-top:20px;margin-left:237px;border-bottom:3px double rgba(34, 25, 25, .1);padding-bottom:8px;color:#6E3939;font-size:20px;}
.new_show{margin:15px 0 0 237px;width:740px;position:relative;right:0;top:0;}


#login_btn{display:inline-block;line-height:28px;border:1px solid #DDD;padding:0 15px;border-radius:5px;font-size:16px;cursor:pointer;margin-top:8px;color: #CB2027;}
#login_off,#comts_off{display:block;position:absolute;width:20px;height:20px;right:5px;top:5px;background:url(/static/img/close.gif) no-repeat 0 0;cursor:pointer;}
#login_off:hover,#comts_off:hover{background-position:0 -30px}
#login_off:active,,#comts_off:hover{background-position:0 -60px}

/*navi_login*/
#navi_login{margin-left:-174px;left:50%;top:-165px;font-size:12px;color:#999;width:348px;box-shadow:inset 0 -1px 0 white,0 1px 6px rgba(0, 0, 0, .3);border-bottom:2px solid #EFEBDA;background:url(/static/img/tips_bg.gif) 0 0 repeat;height: 150px;padding: 5px 22px;border-bottom-left-radius: 5px;border-bottom-right-radius:5px;position:fixed;z-index:4;border-bottom-right-radius: 5px;}
#navi_login{margin-left:-174px;left:50%;top:-165px;font-size:12px;color:#999;width:368px;box-shadow:inset 0 -1px 0 white,0 1px 6px rgba(0, 0, 0, .3);border-bottom:2px solid #EFEBDA;background:url(/static/img/tips_bg.gif) 0 0 repeat;height: 150px;padding: 5px 22px;border-bottom-left-radius: 5px;border-bottom-right-radius:5px;position:fixed;z-index:4;border-bottom-right-radius: 5px;}
#navi_login h3{font-size:18px;font-weight:400;color: #666;text-align:center;}
.login_head{padding:18px 0px;border-bottom:1px solid #F6F4EE;}
.login_connent{padding:20px 15px;}
.login_connent{padding:2px 5px 2px 5px;}

#navi_login ul{display:inline-block;}
#navi_login ul li{margin-right:5px;}
Expand All @@ -55,97 +54,41 @@ a:hover{color:#CB2027;text-decoration:underline;}
.login.renren a{background-position:0 -152px !important;}
.login.instagram a{background-position:0 -190px !important;}

#login_user{display:inline-block;}
#tools{background:url(/static/img/header_sprite.png) 7px -236px no-repeat;padding-left:35px;}
#tools:hover{background-position:-133px -236px;}
#tools .avatar{margin-right:10px;}
#tools em{border-color:#CCC transparent transparent transparent;border-style:solid;border-width: 5px 4px 0 4px;height:6px;width:0;display:inline-block;}
#tools:hover em{border-color:#AAA transparent transparent transparent;}

#login_comt{width:16px;height:42px;display:inline-block;background:url(/static/img/header_sprite.png) 0 -108px no-repeat;text-indent:-9999em;cursor:pointer;}

#login_user ul{top:45px;right:-4px;position:absolute;background:white;width:140px;text-align:left;box-shadow:0 1px 3px rgba(0, 0, 0, .25);overflow:hidden;font-size:14px;display:none;}
#login_user ul li{display:block;position:relative;border-bottom:1px solid #E1DFDF;}
#login_user ul li a {display:block;padding:8px 10px 8px 36px;text-align:left;font-weight:400;line-height:16px;}
#login_user ul li em{width:16px;height:16px;position:absolute;left:10px;top:10px;background:url(/static/img/header_sprite.png) 0 -1px no-repeat}
#login_user ul li.mine em{background-position:0 -1px}
#login_user ul li.mine:hover em{background-position:-140px -1px}
#login_user ul li.mobile em{background-position:0 -31px}
#login_user ul li.mobile:hover em{background-position:-140px -31px}
#login_user ul li.friends em{background-position:0 -61px}
#login_user ul li.friends:hover em{background-position:-140px -61px}
#login_user ul li.goodies em{background-position:0 -91px}
#login_user ul li.goodies:hover em{background-position:-140px -91px}#login_user ul li.papers em{background-position:0 -121px}#login_user ul li.papers:hover em{background-position:-140px -121px}#login_user ul li.about em{background-position:0 -151px}#login_user ul li.about:hover em{background-position:-140px -151px}#login_user ul li.settings em{background-position:0 -181px}#login_user ul li.search:hover em{background-position:-140px -181px}#login_user ul li.signup em{background-position:0 -211px}#login_user ul li.signup:hover em{background-position:-140px -211px}#login_user ul li.friends .info{height:15px;width:64px;background:url(/static/img/icon_find_btn.png) no-repeat 0 0}#login_user ul li.friends:hover .info{background-position:0 -30px}
#login_user ul li a:hover {
background-color: #F2F2F2;
color: #221919;
text-decoration: none;
}


/*main*/
#main{font-size:13px;min-height:800px;width:940px;margin:0px auto 20px auto;padding:88px 0px 30px 0px;color:#666;position:relative;}
#main{font-size:13px;line-height:18px;min-height:800px;width:940px;margin:0px auto 20px auto;padding:88px 0px 30px 0px;color:#666;position:relative;}
.home_show{width:980px;}
.loading{display:none;}
.date,.settings h2{position:relative;min-height:24px;margin:10px 0 15px;padding:10px 0 18px;text-shadow:0 1px rgba(255, 255, 255, .9);border-bottom: 3px double rgba(34, 25, 25, .1);color: #6E3939;font-size:20px;}

.date p,#new_bar p{color:#999;font-size:12px;margin-top:6px;}
.show{position:relative;background:#FFF;width:190px;overflow:hidden;float:left;background-color:white;
box-shadow: 0 1px 3px rgba(0, 0, 0, .3);margin:0 20px 20px 0;padding:15px 15px 0;color:#666;}
box-shadow: 0 1px 3px rgba(0, 0, 0, .3);margin:0 20px 20px 0;padding:15px 15px 0;color:#666;}

.show img{max-width:190px;}
.show_info{color:#999;border-top:1px solid #F5F2F2;background:#FAFAFA;position:relative;margin:15px -15px 0;padding: 5px 5px;}
.show_info p{display:table-cell;max-width:190px;vertical-align:middle;font-size:11.5px;}
.show_info .avatar{float:left;margin-right:6px;width:24px;height:24px;}
.show.nopic .avatar{width:24px;height:24px;}
.show.nopic .show_info{padding:5px 5px;}
.show p{margin-bottom:10px;}
.show_info{color:#999;border-top:1px solid #F5F2F2;background:#FAFAFA;position:relative;margin:10px -15px 0;padding: 10px 15px 5px;}
.show_info p{margin-bottom: 5px;font-size:11.5px;}
.show_info .avatar{float:left;margin:2px 8px 0px 0px;width:30px;height:30px;}
.show .info .name{color:#FFF;clear:right;display:block;margin-top:6px;}


/*sidebar*/
#sidebar{float:left;width:210px;}
#user_info{padding:15px;background-color:white;box-shadow:0 1px 3px rgba(34, 25, 25, .4);}
#user_info .avatar{float:left;margin-right:15px;width:64px;height:64px;}
#user_info .name{margin:0 6px 2px 4px;}
.info_profile{border-bottom: 1px solid #F5F2F2;margin-left:-15px;margin-right:-15px;padding:0 15px 15px;}
.info_inner{background:#FFFEF0;margin:0 -15px -15px;padding:10px 15px;line-height:22px;word-wrap:break-word;}

#new_bar{margin-top:20px;margin-left:237px;border-bottom:3px double rgba(34, 25, 25, .1);padding-bottom:8px;color:#6E3939;font-size:20px;}
.new_show{margin:15px 0 0 237px;width:740px;position:relative;right:0;top:0;}


.from a{opacity: 0.17;}
.from a:hover{opacity:0.47;}
.oauth a{opacity:1;}
.from {display:inline-block;margin:5px 0 0px 0px;}
.from a{background:url(/static/img/sns.png) no-repeat;display:inline-block;text-indent:-9999em;width:16px;height:16px;}
.from.twitter a{background-position:0 -16px;}
.from.sina a{background-position:0 -32px;}
.from.douban a{background-position:0 -48px;}
.from.wordpress a{background-position:0 -64px;}
.from.thepast a{background-position:0 -80px;}
.from.renren a{background-position:0 -96px;}
.from.instagram a{background-position:0 -112px;}
.show.nopic .show_info{padding:5px 5px;}


/*note*/
#note{background:url(/static/img/note.png) repeat-y;margin-bottom:15px;}
#create{font-family:"Microsoft Yahei",Tahoma;line-height:38px;padding-left:5px;margin-left:40px;border:0 none;border-left:3px double #6E3939;width:900px;background:none;resize:none;outline:none;font-size:16px;font-weight:400;height:580px;overflow-y:hidden;}
::-webkit-input-placeholder { color:#999;font-size:16px;}
#create{font-family:"Microsoft Yahei",Tahoma;line-height:38px;padding-left:5px;margin-left:40px;border:0 none;border-left:3px double #6E3939;width:900px;background:none;resize:none;outline:none;font-size:14px;font-weight:400;height:420px;overflow-y:hidden;}
::-webkit-input-placeholder { color:#999;font-size:15px;}
#navi_comts::-webkit-input-placeholder{font-size:12px;}
input:-moz-placeholder {color:#999;}
.now_date{text-align:right;padding-bottom:5px;}
input:-moz-placeholder {color:#999;font-size:15px;}
.now_date{text-align:right; padding-bottom:5px;}
.created{margin:15px auto;}
.created input{padding:8px 12px;float:right;font-family:"Microsoft Yahei",Tahoma;line-height:28px;border:1px solid #DDD;background:#F0EDED;padding:0 15px;border-radius:5px;font-size: 16px;color:#CB2027;cursor:pointer;}
.created input{padding:8px 12px;float:right;font-family:"Microsoft Yahei",Tahoma;line-height:28px;border:1px solid #DDD;background:#F0EDED;padding:0 15px;border-radius:5px;font-size: 14px;color:#CB2027;cursor:pointer;}
.message{padding:10px 25px 0 40px;line-height:24px;}

#navi_comt{margin-left:-240px;left:50%;top:-220px;font-size:12px;color:#999;width: 435px;box-shadow:inset 0 -1px 0 white,0 1px 6px rgba(0, 0, 0, .3);border-bottom:2px solid #EFEBDA;background:url(/static/img/tips_bg.gif) 0 0 repeat;padding: 15px 30px 15px 15px;border-bottom-left-radius: 5px;border-bottom-right-radius:5px;position:fixed;z-index:4;border-bottom-right-radius:5px;}
#navi_comt textarea{line-height: 24px;font-size: 12px;margin-top:5px;height:145px;font-family:"Microsoft Yahei",Tahoma;background:url(/static/img/comt.png);border:0 none;outline:none;resize:none;width:100%;overflow-y:hidden;height:150px;}
#navi_comt input{padding:8px 12px;float:right;font-family:"Microsoft Yahei",Tahoma;line-height:28px;border:1px solid #DDD;background:#F0EDED;padding:0 15px;border-radius:5px;font-size:13px;color:#CB2027;cursor:pointer;}

#footer{margin-top:1.5em;text-align:center;color:#8C7E7E;line-height:1.5em;border:double rgba(34, 25, 25, .14);padding:4px 0;
border-width: 3px 0 3px 0;width:861px;margin:0 auto;font-size:13px;margin-bottom:20px;}


#past_text p{text-align:center;color:#999;width:860px;margin:20px auto;line-height:12px;font-size:13px;}

/*settings*/
Expand All @@ -167,15 +110,5 @@ border-width: 3px 0 3px 0;width:861px;margin:0 auto;font-size:13px;margin-bottom
.error {background:url(/static/img/icon_error.png) no-repeat left 2px;}
.success,.error{font-size:1.2em;font-weight:700;border:0;padding:10px 0 15px 45px;margin:10px 0;text-align:left;vertical-align:middle;color:#333;}

#shadow_nav{background:url("/static/img/subnav_bg.png") repeat-x scroll 0 0 transparent;box-shadow:0 -3px 5px rgba(0, 0, 0, 0.02) inset,0 1px 0 rgba(255, 255, 255, 0.9);height:208px;overflow:hidden;padding-bottom:15px;}
#shadow_nav a:hover{text-decoration:none;}
.actions {
display: none;
position: absolute;
z-index: 3;
top: 6px;
right: 6px;
left: 6px;}
.right {
right: 0;
}
.clear{clear:both;}

2 changes: 1 addition & 1 deletion past/static/css/new.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ font-size:12px;

background-color: #fff;
/*background-color: #fff;*/
border: 1px solid #F1EDED;
border: 0.5px solid #F1EDED;
}
.box .cell {
padding: 10px;
Expand Down
126 changes: 126 additions & 0 deletions past/static/js/date.format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
* The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default.
*/

var dateFormat = function () {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
timezoneClip = /[^-+\dA-Z]/g,
pad = function (val, len) {
val = String(val);
len = len || 2;
while (val.length < len) val = "0" + val;
return val;
};

// Regexes and supporting functions are cached through closure
return function (date, mask, utc) {
var dF = dateFormat;

// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
mask = date;
date = undefined;
}

// Passing date through Date applies Date.parse, if necessary
date = date ? new Date(date) : new Date;
if (isNaN(date)) throw SyntaxError("invalid date");

mask = String(dF.masks[mask] || mask || dF.masks["default"]);

// Allow setting the utc argument via the mask
if (mask.slice(0, 4) == "UTC:") {
mask = mask.slice(4);
utc = true;
}

var _ = utc ? "getUTC" : "get",
d = date[_ + "Date"](),
D = date[_ + "Day"](),
m = date[_ + "Month"](),
y = date[_ + "FullYear"](),
H = date[_ + "Hours"](),
M = date[_ + "Minutes"](),
s = date[_ + "Seconds"](),
L = date[_ + "Milliseconds"](),
o = utc ? 0 : date.getTimezoneOffset(),
flags = {
d: d,
dd: pad(d),
ddd: dF.i18n.dayNames[D],
dddd: dF.i18n.dayNames[D + 7],
m: m + 1,
mm: pad(m + 1),
mmm: dF.i18n.monthNames[m],
mmmm: dF.i18n.monthNames[m + 12],
yy: String(y).slice(2),
yyyy: y,
h: H % 12 || 12,
hh: pad(H % 12 || 12),
H: H,
HH: pad(H),
M: M,
MM: pad(M),
s: s,
ss: pad(s),
l: pad(L, 3),
L: pad(L > 99 ? Math.round(L / 10) : L),
t: H < 12 ? "a" : "p",
tt: H < 12 ? "am" : "pm",
T: H < 12 ? "A" : "P",
TT: H < 12 ? "AM" : "PM",
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
};

return mask.replace(token, function ($0) {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
};
}();

// Some common format strings
dateFormat.masks = {
"default": "ddd mmm dd yyyy HH:MM:ss",
shortDate: "m/d/yy",
mediumDate: "mmm d, yyyy",
longDate: "mmmm d, yyyy",
fullDate: "dddd, mmmm d, yyyy",
shortTime: "h:MM TT",
mediumTime: "h:MM:ss TT",
longTime: "h:MM:ss TT Z",
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};

// Internationalization strings
dateFormat.i18n = {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
]
};

// For convenience...
Date.prototype.format = function (mask, utc) {
return dateFormat(this, mask, utc);
};

Loading

0 comments on commit 1e06055

Please sign in to comment.