Skip to content

Commit

Permalink
design update
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiran Sheng committed Apr 29, 2012
1 parent 1ed254f commit a1be583
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 11 deletions.
3 changes: 2 additions & 1 deletion home.html
Expand Up @@ -9,6 +9,7 @@


</title> </title>
<link href="/static/css/_normalize.css" rel="stylesheet" type="text/css" /> <link href="/static/css/_normalize.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>


<![if (lt IE 9)]> <![if (lt IE 9)]>
<link href="/static/css/ie-home.css" rel="stylesheet" type="text/css" /> <link href="/static/css/ie-home.css" rel="stylesheet" type="text/css" />
Expand All @@ -22,7 +23,7 @@


<link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono|Open+Sans+Condensed:700' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono|Open+Sans+Condensed:700' rel='stylesheet' type='text/css'>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="/static/js/hyphenator.min.js" type="text/javascript"> <script src="http://yiranstatic/static/js/hyphenator.min.js" type="text/javascript">
</script> </script>
<script src="/static/js/term.js" type="text/javascript"> <script src="/static/js/term.js" type="text/javascript">
</script> </script>
Expand Down
6 changes: 6 additions & 0 deletions index.yaml
Expand Up @@ -9,3 +9,9 @@ indexes:
# manually, move them above the marker line. The index.yaml file is # manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy # automatically uploaded to the admin console when you next deploy
# your application using appcfg.py. # your application using appcfg.py.

- kind: Post
properties:
- name: draft
- name: created_at
direction: desc
6 changes: 3 additions & 3 deletions static/css/home.css
Expand Up @@ -69,7 +69,7 @@ visibility: hidden;
} }
iframe.hide{display: none;} iframe.hide{display: none;}
iframe, #widgets-area{ iframe, #widgets-area{
top:20px; right: -90px; top:16px; right: -90px;
border: 0px solid #ffffff; border: 0px solid #ffffff;
} }


Expand Down Expand Up @@ -220,7 +220,7 @@ width: 527px;
padding: 20px; padding: 20px;
height: 520px; height: 520px;
background: url(../imgs/bg3.png); background: url(../imgs/bg3.png);
font-family: monospace, serif; font-family: 'Inconsolata', monospace, sans-serif;
font-size: 13px; font-size: 13px;
color: #00ff00; color: #00ff00;
line-height: 150%; line-height: 150%;
Expand All @@ -240,7 +240,7 @@ outline: none;
width: 527px; width: 527px;
height: 21px; height: 21px;
color: #00ff00; color: #00ff00;
font-family: monospace, serif; font-family: 'Inconsolata', monospace, sans-serif;
font-size: 14px; font-size: 14px;
line-height: 150%; line-height: 150%;
margin: 0; margin: 0;
Expand Down
Binary file added static/imgs/bg0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/imgs/bg0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 39 additions & 6 deletions static/js/term.js
Expand Up @@ -50,12 +50,16 @@ var play = {
return x return x
}, },


recent: function(_type) { recent: function(_type, quite) {
if (this.Recent) { if (this.Recent) {
if (typeof _type !== "undefined"){ if (typeof _type !== "undefined"){
if (this.Recent[_type]){ if (this.Recent[_type]){
$(this.Recent[_type]).appendTo("#output"); if (!quite) {
return "==========>"+_type $(this.Recent[_type]).appendTo("#output");
return "==========>"+_type
} else {
return
}
} else { } else {
this.Recent[_type] = ""; this.Recent[_type] = "";
if (this[_type] instanceof Function) this[_type](); if (this[_type] instanceof Function) this[_type]();
Expand All @@ -70,6 +74,9 @@ var play = {
this.Recent = {all:""}; this.Recent = {all:""};
this.blog(); this.blog();
this.experiment(); this.experiment();
this.research();

return "Now loading..."
}, },


experiment: function(quite) { experiment: function(quite) {
Expand All @@ -79,6 +86,14 @@ var play = {
dataType: "jsonp"}); dataType: "jsonp"});
}, },


research : function(quite) {
$.ajax("http://research.yiransheng.com/jsonp",
{ success : _research,
crossDomain:true,
dataType: "jsonp"});
},


blog: function(quite) { blog: function(quite) {
$.ajax("/recent", { success: function(res){ $.ajax("/recent", { success: function(res){
var x=0, p, o=$("<div><p>Recent Blog Posts</p></div>"); var x=0, p, o=$("<div><p>Recent Blog Posts</p></div>");
Expand All @@ -94,9 +109,9 @@ var play = {
} }
play.Recent.blog = o.html(); play.Recent.blog = o.html();
play.Recent.all += o.html(); play.Recent.all += o.html();
$(o.html()).appendTo("#output"); play.recent("blog");
}, },
crossDomain: true, crossDomain: false,
dataType: "json"}); dataType: "json"});
}, },


Expand Down Expand Up @@ -125,6 +140,23 @@ var play = {


}, },


_research = function(res){
var x=0, p, o = $("<div><p>Recent Research</p></div>");
for (i in res){
item = res[i]
p = $("<p></p>")
$("<a></a>").text("[Research]"+item.title)
.attr("href", item.permlink)
.appendTo(p);
o.append(p);
x++;
if (x>4) {break}
}
play.Recent.research = o.html();
play.Recent.all += o.html();
play.recent("research");
},

_jsonp = function(x) { _jsonp = function(x) {
var res = x, x=0, p, o = $("<div><p>Recent Experiments</p></div>"); var res = x, x=0, p, o = $("<div><p>Recent Experiments</p></div>");
for (i in res.registered){ for (i in res.registered){
Expand All @@ -138,7 +170,8 @@ _jsonp = function(x) {
} }
play.Recent.experiment = o.html(); play.Recent.experiment = o.html();
play.Recent.all += o.html(); play.Recent.all += o.html();
$(o.html()).appendTo("#output");
play.recent("experiment");
}, },


tid = -1, tid = -1,
Expand Down
2 changes: 1 addition & 1 deletion templates/layout.html
Expand Up @@ -10,7 +10,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="{{ url_for('static', filename='js/jsloader.min.js') }}" type="text/javascript"></script> <script src="{{ url_for('static', filename='js/jsloader.min.js') }}" type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/prettify.js') }}" type="text/javascript" async="async"></script> <script src="{{ url_for('static', filename='js/prettify.js') }}" type="text/javascript" async="async"></script>
<script src="{{ url_for('static', filename='js/hyphenator.min.js') }}" type="text/javascript" async="async"></script> <script src="http://yiranstatic.appspot.com/static/js/hyphenator.min.js" type="text/javascript"></script>
<link href="{{ url_for('feed') }}" rel="alternate" title="RSS" type="application/rss+xml" /> <link href="{{ url_for('feed') }}" rel="alternate" title="RSS" type="application/rss+xml" />
<link href="{{ url_for('static', filename='css/prettify.css') }}" rel="stylesheet" type="text/css"> <link href="{{ url_for('static', filename='css/prettify.css') }}" rel="stylesheet" type="text/css">
<script type="text/javascript" <script type="text/javascript"
Expand Down

0 comments on commit a1be583

Please sign in to comment.