Skip to content

Commit 7e93be8

Browse files
committed
Merge branch 'master' into gh-pages
2 parents 96bf569 + 9c579ee commit 7e93be8

File tree

2 files changed

+67
-9
lines changed

2 files changed

+67
-9
lines changed

index.html

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,74 @@
44
<head>
55
<title>Soliloquy</title>
66

7+
<meta http-equiv="Content-Type" Content="text/html; charset=UTF-8" />
78
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript" charset="utf-8"></script>
89
<script src="src/jquery.soliloquy.js" type="text/javascript" charset="utf-8"></script>
910

1011
<script type="text/javascript" charset="utf-8">
1112
$(function()
1213
{
13-
$('.feed').soliloquy().facebook( { username: 'NPR', posts: 2, relative_dates: false } );
14+
$('.feed').soliloquy().facebook( { username: 'CriterionCollection', posts: 8, relative_dates: false } );
1415
$('.feed').soliloquy().twitter( 'devth', { posts: 5, relative_dates: false } );
1516
$('.feed').soliloquy().twitter_list( 'rails', 'core', { posts: 2 } );
1617
$('.feed').soliloquy().lastfm( { relative_dates: false });
18+
19+
20+
$('h1').hover(function(){
21+
$('.english').hide();
22+
$('.japanese').show();
23+
}, function(){
24+
$('.english').show();
25+
$('.japanese').hide();
26+
});
27+
1728
});
1829
</script>
1930

2031
<style type="text/css" media="screen">
2132
body { font-family: 'Adobe Garamond Pro', 'Garamond Premier Pro', Garamond, Times, 'Times New Roman', serif; }
22-
h1 { text-align:center; color: #ddd; margin:40px 0; font-size:120px; }
33+
h1 { text-align:center; color: #000; border-bottom: 1px solid #fff; padding-bottom: 30px; margin:40px 0; font-size:100px;
34+
text-shadow: #ccc 0px 2px 10px; position: relative;
35+
height: 100px; cursor: default;
36+
}
37+
.japanese { display: none; position: relative; top:-20px; color: #b3001e; }
2338

2439
.feed { width: 800px; margin: auto;}
25-
.feed .post { clear: both; font-size: 20px; margin:20px; color:#333; }
40+
.feed .post { clear: both; font-size: 20px; margin:10px; padding-bottom: 10px;
41+
color:#333; border-bottom: 1px solid #eee; overflow: auto;
42+
background: -webkit-gradient(
43+
linear, left bottom, left top,
44+
color-stop(0.1, #fafafa),
45+
color-stop(0.49, #fff)
46+
);
47+
}
2648

2749

2850
.thumbnail { float: left; display: block; padding: 0 10px 10px 10px; }
2951
.post_content { display: table-cell }
3052

31-
.created-at { font-size:70%; color:#666;}
53+
.created-at { font-size:70%; color:#666; clear: both; }
3254
.screen-name { font-weight: bold; }
55+
56+
.picture { display: block; padding: 4px; }
57+
.picture img { padding: 4px; border: 1px solid #ccc; }
58+
59+
60+
.facebook .link-picture { float: left; padding: 4px 10px 4px 0; }
61+
.facebook .link-content { color: #999; font-size: 90%; padding-top: 6px; display: table-cell; clear: both; }
62+
.facebook .link-content .description { display: block; }
63+
64+
.facebook .created-at { display: block; }
65+
3366

3467
</style>
3568
</head>
3669

3770
<body>
38-
<h1>Soliloquy</h1>
71+
<h1>
72+
<span class="english">Soliloquy</span>
73+
<span class="japanese">独り言</span>
74+
</h1>
3975
<div class="feed"></div>
4076
<div class="twitter_list"></div>
4177
</body>

src/jquery.soliloquy.js

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ http://github.com/devth/soliloquy
106106
}
107107
minutes = (date_time.getMinutes().toString().length == 1) ? "0" + date_time.getMinutes() : date_time.getMinutes();
108108
return ((date_time.getMonth() + 1) + "/" + (date_time.getDate()) + "/" + date_time.getFullYear() +
109-
" " + (hours) + ":" + minutes + ampm);
109+
" at " + (hours) + ":" + minutes + ampm);
110110
}
111111
}
112112
function relative_time( parsed_date )
@@ -224,10 +224,32 @@ http://github.com/devth/soliloquy
224224
if ( post.type == "status" ){
225225
html += processPost( post.message );
226226
} else if ( post.type == "link" ){
227-
html += '<div class="link"><a href="' + post.link + '">' + post.name + '</a></div>';
228-
html += post.description;
227+
if ( post.message ) html += '<span class="message">' + processPost(post.message) + '</span>';
228+
if ( post.picture ){
229+
html += '<div class="link-picture"><a href="' + post.link + '"><img src="' + post.picture + '"></a></div>';
230+
}
231+
html += '<div class="link-content"><a href="' + post.link + '">' + post.name + '</a><span class="description">' + post.description + '</span></div>';
232+
} else if ( post.type == "photo" ){
233+
html += '<span class="photo">';
234+
html += post.message;
235+
html += '<span class="picture">';
236+
if ( post.link ) html += '<a href="' + post.link + '">';
237+
html += '<img src="' + post.picture + '">';
238+
if ( post.link ) html += '</a>';
239+
html += '</span>';
240+
html += '</span';
229241
}
230-
html += " <span class='created-at'>" + date_string + "</span>";
242+
html += ' <span class="created-at">';
243+
if ( post.icon ) html += '<img src="' + post.icon + '" /> ';
244+
html += date_string + "</span>";
245+
246+
247+
if ( post.comments ){
248+
html += '<div class="comments">';
249+
html += '</div>';
250+
}
251+
252+
231253
html += "</div>";
232254
html += '</div>';
233255
return html;

0 commit comments

Comments
 (0)