Skip to content

Instantly share code, notes, and snippets.

@azu azu/gist:838726
Created Feb 22, 2011

Embed
What would you like to do?
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="https://github.com/mach3/js-jquery-class/raw/master/jquery.class.min.js"></script>
<script type="text/javascript" src="https://github.com/mach3/js-tumblrposts.js/raw/master/tumblrposts.js"></script>
<script type="text/javascript">
(function() {
var posts = new TumblrPosts({
domain:"jser.info",
maxNum:300
});
posts.bind(posts.EVENT_COMPLETE, function(e) {
var that = this;
$.each(this.getPosts(), function(i, post) {
var title = that.getTitleByPost(post, 100),
html = '<li><a href="{{url}}">{{title}}</a></li>'
.replace(/{{url}}/, post.url)
.replace(/{{title}}/, title);
$(html).appendTo($("ul#updated"));
});
// getTags() でタグリストを取得
$.each(this.getTags(), function(i, tag) {
var html = '<li class="level' + (tag.count % 6 + 1) + '">'
+ '<a href="/tagged/' + tag.name + '">' + tag.name + '</a></li>';
$(html).appendTo($("ul#tags"));
});
$("ul#tags").css("border", "1px dotted");
$("div#receive-contetnts").show();
});
posts.run();
})();
</script>
/*--------------------------------------
Tag Cloud
---------------------------------------*/
ul.tagCloud {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
line-height: 1;
margin: 5px 0;
padding: 1em 5px;
}
ul.tagCloud li {
margin: 0;
padding: 0;
display: inline-block;
font-size: 100%; /* ここで相対的に文字サイズを変更 */
}
ul.tagCloud li a {
padding: 0 5px;
position: relative;
text-decoration: none;
color: #fff;
background-color: #fff;
border: 1px solid #e2edb5;
}
ul.tagCloud li.level1 a {
z-index: 6;
font-size: 167%;
background-color: #b5d246;
}
ul.tagCloud li.level2 a {
top: 5px;
z-index: 5;
font-size: 136%;
background-color: #c0d860;
}
ul.tagCloud li.level3 a {
z-index: 4;
font-size: 114%;
background-color: #cbe07d;
}
ul.tagCloud li.level4 a {
top: 5px;
z-index: 3;
font-size: 100%;
background-color: #d6e699;
}
ul.tagCloud li.level5 a {
z-index: 2;
font-size: 85%;
background-color: #e2edb5;
}
ul.tagCloud li.level6 a {
z-index: 1;
font-size: 70%;
background-color: #edf4d0;
}
/* オンマウス */
ul.tagCloud li a:hover {
z-index: 10;
border-color: #a2ba42;
background-color: #b4cc54;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.