Skip to content

Instantly share code, notes, and snippets.

@niw
Created September 30, 2011 23:05
Show Gist options
  • Save niw/1255267 to your computer and use it in GitHub Desktop.
Save niw/1255267 to your computer and use it in GitHub Desktop.
Tumbler Theme for blog.niw.at
<!DOCTYPE html>
<html>
<!--
Copyright (c) 2011 Yoshimasa Niwa
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<head>
<title>{block:PostSummary}{PostSummary} - {/block:PostSummary}{Title}</title>
<meta charset="utf-8">
<meta name="description" content="{MetaDescription}">
<link rel="shortcut icon" href="{Favicon}">
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}">
<meta name="viewport" content="width=950">
<meta name="color:Link" content="#39c">
<meta name="color:Text" content="#141414">
<meta name="text:Anchor" content="*">
<meta name="if:Twitter Widgets" content="1">
<meta name="if:Like Button" content="1">
<meta name="if:Hatena Button" content="1">
<meta name="if:Google Code Prettify" content="">
<meta name="text:Google Analytics ID" content="">
<meta name="text:Google Analytics Domain Name" content="">
<meta name="text:Google Site Verification" content="">
<meta name="text:Disqus Shortname" content="">
<meta name="text:Copyright" content="">
{Block:IfGoogleSiteVerification}
<meta name="google-site-verification" content="{Text:Google Site Verification}">
{/Block:IfGoogleSiteVerification}
<style>
html, body{
border: 0;
margin: 0;
padding: 0;
height: 100%;
}
body {
font-size: 14px;
font-family: georgia, serif;
background: #fff;
color: {color:Text};
}
a img {
border: 0;
vertical-align: text-bottom;
}
a, a:visited {
color: {color:Link};
text-decoration: none;
}
a:hover {
color: #333;
background: #fff;
}
p {
margin: 0 0 0.5em 0;
}
iframe {
border: none;
}
ul, ol {
margin: 0;
padding: 0;
list-style: none;
}
li {
margin: 0;
padding: 0;
}
em, cite {
font-style: normal;
font-weight: bold;
}
code {
font-family: Menlo, Monaco, monospace;
font-size: 80%;
white-space: pre-wrap;
padding: 3px;
margin: 0 2px;
background: #fff;
border: 1px solid #ddd;
border-radius: 3px;
}
form {
display: inline;
}
v\\:* {
behavior: url(#default#VML);
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-table;}
/* \*/
* html .clearfix {height: 1%;}
.clearfix {display: block; zoom: 1;}
/* */
.meta {
color: #ccc;
}
#wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -80px auto;
width: 1000px;
}
#footer_push {
height: 80px;
}
#footer {
clear: both;
height: 40px;
width: 600px;
padding: 20px 270px 20px 130px;
margin: 0 auto;
overflow: hidden;
font-size: 80%;
}
#header {
height: 180px;
padding: 0 270px 0 130px;
position: relative;
}
#header h1 {
margin: 0;
position: absolute;
bottom: 40px;
font-size: 60px;
font-family: "Helvetica Neue", Arial, sans-serif;
font-weight: 100;
}
#header h1 a {
color: {color:Text};
}
#content {
clear: both;
margin: 10px 0;
}
#page {
width: 660px;
padding: 0 0 0 100px;
float: left;
position: relative;
}
#sidebar {
width: 200px;
float: right;
position: relative;
line-height: 190%;
font-size: 80%;
}
.post {
padding: 20px 30px;
margin: 0 0 20px 0;
background: #fafafa;
line-height: 190%;
position: relative;
}
.post h1, .post h2, .post h3, .post h4 {
font-family: "Helvetica Neue", Arial, sans-serif;
margin: 0.5em 0;
font-size: 100%;
font-weight: bold;
}
.post .title {
font-size: 180% !important;
font-weight: 200 !important;
}
.post .subtitle {
margin: 0 0 10px 0;
text-align: center;
}
.post p {
margin-bottom: 1em;
}
.post ol {
margin-left: 20px;
list-style: decimal;
}
.post ul {
margin-left: 20px;
list-style: square;
}
.post img,
.post .regular iframe {
padding: 3px;
background: #fff;
margin: 1px 50px;
border: 1px solid #ddd;
border-radius: 3px;
box-shadow: 0 0 1px #e0e0e0;
}
.post img {
display: block;
}
.post .twitter-tweet-rendered {
margin-left: 50px !important;
margin-right: 50px !important;
}
.post a:hover img {
border: 1px solid {color:Link};
}
.post hr {
border: none;
display: block;
height: 1px;
width: 50%;
background: #ddd;
margin: 1em auto;
}
.post pre {
overflow: auto;
word-wrap: break-word;
padding: 3px;
background: #fff;
line-height: 120%;
border: 1px solid #ddd;
border-radius: 3px;
box-shadow: 0 0 1px #e0e0e0;
}
.post pre code {
margin: 0;
padding: 0;
background: transparent;
border: none;
box-shadow: none;
}
.post .share {
margin: 30px 0 0 0;
padding: 10px 0 10px 0;
border-top: 1px dotted #ddd;
}
.heading {
position: absolute;
left: -100px;
top: 20px;
font-family: "Helvetica Neue", Arial, sans-serif;
font-weight: 200;
}
.date {
font-size: 80%;
}
.anchor {
text-align: right;
font-size: 200%;
}
.additional {
clear: both;
padding: 10px 0;
text-align: center;
}
.quote .text {
margin: 10px 0 10px 40px;
font-size: 120%;
position: relative;
}
.quote .text big {
font-size: 60px;
vertical-align: -25px;
opacity: 0.4;
-moz-opacity: 0.4;
filter: alpha(opacity=40);
display: block;
position: absolute;
left: -40px;
top: 10px;
}
.media {
text-align: center;
}
{Block:IfGoogleCodePrettify}
.pln { color: #000 } /* plain text */
.str { color: #080 } /* string content */
.kwd { color: #008 } /* a keyword */
.com { color: #800 } /* a comment */
.typ { color: #606 } /* a type name */
.lit { color: #066 } /* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun, .opn, .clo { color: #660 }
.tag { color: #008 } /* a markup tag name */
.atn { color: #606 } /* a markup attribute name */
.atv { color: #080 } /* a markup attribute value */
.dec, .var { color: #606 } /* a declaration; a variable name */
.fun { color: red } /* a function name */
/* Specify class=linenums on a pre to get line numbering */
li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none }
/* Alternate shading for lines */
li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee }
/* IE indents via margin-left */
ol.linenums { margin-top: 0; margin-bottom: 0 }
{/Block:IfGoogleCodePrettify}
{CustomCSS}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<h1><a href="/">{Title}</a></h1>
</div>
<div id="content" class="clearfix">
<div id="page">
{block:SearchPage}
{block:SearchResults}
<h2>{lang:Found SearchResultCount results for SearchQuery 2}</h2>
{/block:SearchResults}
{block:NoSearchResults}
<h2>{lang:No search results for SearchQuery 2}</h2>
{/block:NoSearchResults}
{/block:SearchPage}
{block:Posts}
<div class="post clearfix">
<div class="heading">
{block:IfAnchor}
<div class="anchor"><a href="{PermaLink}">{text:Anchor}</a></div>
{/block:IfAnchor}
{block:Date}
<div class="date">{MonthNumber}/{DayOfMonth}, {Year}</div>
{/block:Date}
</div>
{block:Regular}
<div class="regular">
{block:Title}<h2 class="title">{Title}</h2>{/block:Title}
{Body}
</div>
{/block:Regular}
{block:Photo}
<div class="photo">
<div class="media">{LinkOpenTag}<img src="{PhotoURL-400}" alt="{PhotoAlt}">{LinkCloseTag}</div>
{block:Caption}
<div class="subtitle meta">
<span class="caption">{Caption}</span>
</div>
{/block:Caption}
</div>
{/block:Photo}
{block:Quote}
<div class="quote">
<div class="text"><big>&#147;</big> {Quote}</div>
{block:Source}
<div class="subtitle meta">
by <span class="source">{Source}</span>
</div>
{/block:Source}
</div>
{/block:Quote}
{block:Link}
<div class="link">
<div class="text"><a href="{URL}" class="link" {Target}>{Name}</a></div>
{block:Description}
<span class="description">{Description}</span>
{/block:Description}
</div>
{/block:Link}
{block:Conversation}
<div class="conversation">
{block:Title}<h2 class="title">{Title}</h2>{/block:Title}
<ul>
{block:Lines}
<li>{block:Label}<span class="label">{Label}</span>{/block:Label} {Line}</li>
{/block:Lines}
</ul>
</div>
{/block:Conversation}
{block:Audio}
<div class="audio">
<div class="media">{AudioPlayerGrey}</div>
{block:Caption}
<div class="subtitle meta">
<span class="caption">{Caption}</span>
</div>
{/block:Caption}
</div>
{/block:Audio}
{block:Video}
<div class="video">
<div class="media">{Video-400}</div>
{block:Caption}
<div class="subtitle meta">
<span class="caption">{Caption}</span>
</div>
{/block:Caption}
</div>
{/block:Video}
{block:PermalinkPage}
<div class="share">
{Block:IfTwitterWidgets}
<a href="https://twitter.com/share" class="twitter-share-button" data-url="{Permalink}" data-text="{block:PostSummary}{PostSummary}{/block:PostSummary}" data-count="horizontal" data-via="niw" data-lang="ja">Tweet</a>
{/Block:IfTwitterWidgets}
{Block:IfLikeButton}
<div class="fb-like" data-href="{Permalink}" data-send="false" data-layout="button_count" data-width="130" data-show-faces="false" style="vertical-align: top; margin-top:-1px;"></div>
{/Block:IfLikeButton}
{Block:IfHatenaButton}
<a href="http://b.hatena.ne.jp/entry/{Permalink}" class="hatena-bookmark-button" data-hatena-bookmark-layout="standard" data-hatena-bookmark-title="{block:PostSummary}{PostSummary}{/block:PostSummary}" title="このエントリーをはてなブックマークに追加">Hatena Bookmark</a>
{/Block:IfHatenaButton}
</div>
{Block:IfDisqusShortname}
<div id="disqus_thread"></div>
{/Block:IfDisqusShortname}
{/block:PermalinkPage}
</div>
{/block:Posts}
<div class="additional">
{block:PreviousPage}
<a href="{PreviousPage}">&#171; {lang:Previous page}</a> &nbsp;&nbsp;
{/block:PreviousPage}
{block:NextPage}
<a href="{NextPage}">{lang:Next page} &#187;</a>
{/block:NextPage}
</div>
</div>
<div id="sidebar">
{Description}
<p><a href="/archive" id="archive_link">{lang:Archive}</a></p>
</div>
</div>
<div id="footer_push"></div>
</div>
<div id="footer">
&copy; {CopyrightYears}{block:IfCopyright} {Text:Copyright}{/block:IfCopyright}.
</div>
{Block:IfTwitterWidgets}
<script src="//platform.twitter.com/widgets.js" async></script>
{/Block:IfTwitterWidgets}
{block:PermalinkPage}
{Block:IfLikeButton}
<div id="fb-root"></div>
<script>
!function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) return
js = d.createElement(s)
js.id = id
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk')
</script>
<script src="http://b.st-hatena.com/js/bookmark_button_wo_al.js" async></script>
{/Block:IfLikeButton}
{Block:IfHatenaButton}
<script src="http://b.st-hatena.com/js/bookmark_button_wo_al.js" async></script>
{/Block:IfHatenaButton}
{Block:IfDisqusShortname}
<script src="http://{text:Disqus Shortname}.disqus.com/embed.js" async></script>
<script>
var disqus_shortname = '{text:Disqus Shortname}',
disqus_url = '{Permalink}',
disqus_identifier = '{PostID}',
disqus_title = '{PostTitle}'
</script>
{/Block:IfDisqusShortname}
{/block:PermalinkPage}
{Block:IfGoogleCodePrettify}
<!-- NOTE still working on make this script works pretty in real. -->
<!-- Original Google-Code-Prettify - need to use prettyprint class in <pre> tag.
<script src="http://static.tumblr.com/mvaamwn/imIm0dqj7/prettify.js" async></script>
-->
<script src="http://static.tumblr.com/mvaamwn/UiOm0drrj/prettify.js" async></script>
<script>
!function(){
if(document.addEventListener)
document.addEventListener('DOMContentLoaded', function(){prettyPrint()}, false)
else if(document.attachEvent)
document.attachEvent('onreadystatechange', function(){prettyPrint()})
}()
</script>
{/Block:IfGoogleCodePrettify}
{block:IfGoogleAnalyticsID}
<script>
var _gaq = _gaq || []
_gaq.push(['_setAccount', '{text:Google Analytics ID}'])
{block:IfGoogleAnalyticsDomainName}
_gaq.push(['_setDomainName', '{text:Google Analytics Domain Name}'])
{/block:IfGoogleAnalyticsDomainName}
_gaq.push(['_trackPageview'])
!function() {
var g = document.createElement('script'),
s = document.getElementsByTagName('script')[0]
g.async = true
g.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'
s.parentNode.insertBefore(g, s)
}()
</script>
{/block:IfGoogleAnalyticsID}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment