Created
December 5, 2014 17:53
-
-
Save sts10/942e7a8fd0ef43fb066a to your computer and use it in GitHub Desktop.
My hacked-together Tumblr theme for schlinkphoto.tumblr.com, as of December 2014. Doesn't really support photosets. Install by copy and pasting as your theme code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>{Title}</title> | |
<META NAME="Title" CONTENT="{Title}"> | |
{block:Description} | |
<META NAME="Description" CONTENT="{MetaDescription}"> | |
{/block:Description} | |
<link rel="shortcut icon" href="{Favicon}"> | |
<link rel="alternate" type="application/rss+xml" href="{RSS}"> | |
<meta name="color:Background" content="#fcfeff"/> | |
<meta name="color:Text" content="#252525"/> | |
<meta name="color:Accent" content="navy blue"/> | |
<meta name="image:Header" content=""/> <!-- to use: src="{image:Header}" --> | |
<!-- <meta name="if:Large Pictures" content="0"/> --> | |
<meta name="if:Fit Pictures" content="1"/> | |
<meta name="if:Show RSS Link" content="1"/> | |
<meta name="if:Show Archive Link" content="1"/> | |
<meta name="if:Show Random Link" content="0"/> | |
<meta name="if:Show Likes Link" content="0"/> | |
<meta name="if:Show Mobile Link" content="0"/> | |
<meta name="if:Show Notes" content="0"/> | |
<meta name="if:Show Reblog Link" content="0"/> | |
<meta name="if:Show Tags" content="0"/> | |
<meta name="if:Infinite Scroll" content="1"/> | |
{block:ifInfiniteScroll} | |
<!-- <script type="text/javascript" src="http://static.tumblr.com/q0etgkr/mFbkoqlkr/tumblrautopager.js"></script>--> | |
{/block:ifInfiniteScroll} | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
// hide #back-top first | |
$("#back-top").hide(); | |
// fade in #back-top | |
$(function () { | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > 100) { | |
$('#back-top').fadeIn(); | |
} else { | |
$('#back-top').fadeOut(); | |
} | |
}); | |
// scroll body to 0px on click | |
$('#back-top a#scroll_up').click(function () { | |
$('body,html').animate({ | |
scrollTop: 0 | |
}, 800); | |
return false; | |
}); | |
}); | |
}); | |
</script> | |
<script> | |
var tumblrAutoPager = { | |
url: "http://proto.jp/", | |
ver: "0.1.7", | |
rF: true, | |
gP: {}, | |
pp: null, | |
ppId: "", | |
LN: location.hostname, | |
init: function () { | |
if ($("autopagerize_icon") || navigator.userAgent.indexOf('iPhone') != -1) return; | |
var tAP = tumblrAutoPager; | |
var p = 1; | |
var lh = location.href; | |
var lhp = lh.lastIndexOf("/page/"); | |
var lht = lh.lastIndexOf("/tagged/"); | |
if (lhp != -1) { | |
p = parseInt(lh.slice(lhp + 6)); | |
tAP.LN = lh.slice(7, lhp); | |
} else if (lht != -1) { | |
tAP.LN = lh.slice(7); | |
if (tAP.LN.slice(tAP.LN.length - 1) == "/") tAP.LN = tAP.LN.slice(0, tAP.LN.length - 1); | |
} else if ("http://" + tAP.LN + "/" != lh) { | |
return; | |
}; | |
var gPFncs = []; | |
gPFncs[0] = function (aE) { | |
var r = []; | |
for (var i = 0, l = aE.length; i < l; i++) { | |
if (aE[i].className == "autopagerize_page_element") { | |
r = gCE(aE[i]); | |
break; | |
} | |
} | |
return r; | |
}; | |
gPFncs[1] = function (aE) { | |
var r = []; | |
for (var i = 0, l = aE.length; i < l; i++) { | |
var arr = aE[i].className ? aE[i].className.split(" ") : null; | |
if (arr) { | |
for (var j = 0; j < arr.length; j++) { | |
arr[j] == "post" ? r.push(aE[i]) : null; | |
} | |
} | |
} | |
return r; | |
}; | |
gPFncs[2] = function (aE) { | |
var r = []; | |
var tmpId = tAP.ppId ? [tAP.ppId] : ["posts", "main", "container", "content", "apDiv2", "wrapper", "projects"]; | |
for (var i = 0, l = aE.length; i < l; i++) { | |
for (var j = 0; j < tmpId.length; j++) { | |
if (aE[i].id == tmpId[j]) { | |
r = gCE(aE[i]); | |
tAP.ppId = aE[i].id; | |
break; | |
} | |
} | |
} | |
return r; | |
}; | |
for (var i = 0; i < gPFncs.length; i++) { | |
var getElems = gPFncs[i](document.body.getElementsByTagName('*')); | |
if (getElems.length) { | |
tAP.gP = gPFncs[i]; | |
tAP.pp = getElems[0].parentNode; | |
break; | |
} | |
} | |
function gCE(pElem) { | |
var r = []; | |
for (var i = 0, l = pElem.childNodes.length; i < l; i++) { | |
r.push(pElem.childNodes.item(i)) | |
} | |
return r; | |
} | |
if (!tAP.pp) { | |
return; | |
} | |
sendRequest.README = { | |
license: 'Public Domain', | |
url: 'http://jsgt.org/lib/ajax/ref.htm', | |
version: 0.516, | |
author: 'Toshiro Takahashi' | |
}; | |
function chkAjaBrowser() { | |
var A, B = navigator.userAgent; | |
this.bw = { | |
safari: ((A = B.split('AppleWebKit/')[1]) ? A.split('(')[0].split('.')[0] : 0) >= 124, | |
konqueror: ((A = B.split('Konqueror/')[1]) ? A.split(';')[0] : 0) >= 3.3, | |
mozes: ((A = B.split('Gecko/')[1]) ? A.split(' ')[0] : 0) >= 20011128, | |
opera: ( !! window.opera) && ((typeof XMLHttpRequest) == 'function'), | |
msie: ( !! window.ActiveXObject) ? ( !! createHttpRequest()) : false | |
}; | |
return (this.bw.safari || this.bw.konqueror || this.bw.mozes || this.bw.opera || this.bw.msie) | |
} | |
function createHttpRequest() { | |
if (window.XMLHttpRequest) { | |
return new XMLHttpRequest() | |
} else { | |
if (window.ActiveXObject) { | |
try { | |
return new ActiveXObject('Msxml2.XMLHTTP') | |
} catch (B) { | |
try { | |
return new ActiveXObject('Microsoft.XMLHTTP') | |
} catch (A) { | |
return null | |
} | |
} | |
} else { | |
return null | |
} | |
} | |
}; | |
function sendRequest(E, R, C, D, F, G, S, A) { | |
var Q = C.toUpperCase() == 'GET', | |
H = createHttpRequest(); | |
if (H == null) { | |
return null | |
} | |
if ((G) ? G : false) { | |
D += ((D.indexOf('?') == -1) ? '?' : '&') + 't=' + (new Date()).getTime() | |
} | |
var P = new chkAjaBrowser(), | |
L = P.bw.opera, | |
I = P.bw.safari, | |
N = P.bw.konqueror, | |
M = P.bw.mozes; | |
if (typeof E == 'object') { | |
var J = E.onload; | |
var O = E.onbeforsetheader | |
} else { | |
var J = E; | |
var O = null | |
} | |
if (L || I || M) { | |
H.onload = function () { | |
J(H); | |
H.abort() | |
} | |
} else { | |
H.onreadystatechange = function () { | |
if (H.readyState == 4) { | |
J(H); | |
H.abort() | |
} | |
} | |
} | |
R = K(R, D); | |
if (Q) { | |
D += ((D.indexOf('?') == -1) ? '?' : (R == '') ? '' : '&') + R | |
} | |
H.open(C, D, F, S, A); | |
if ( !! O) { | |
O(H) | |
} | |
B(H); | |
H.send(R); | |
function B(T) { | |
if (!L || typeof T.setRequestHeader == 'function') { | |
T.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8') | |
} | |
return T | |
} | |
function K(X, V) { | |
var Z = []; | |
if (typeof X == 'object') { | |
for (var W in X) { | |
Y(W, X[W]) | |
} | |
} else { | |
if (typeof X == 'string') { | |
if (X == '') { | |
return '' | |
} | |
if (X.charAt(0) == '&') { | |
X = X.substring(1, X.length) | |
} | |
var T = X.split('&'); | |
for (var W = 0; W < T.length; W++) { | |
var U = T[W].split('='); | |
Y(U[0], U[1]) | |
} | |
} | |
} | |
function Y(b, a) { | |
Z.push(encodeURIComponent(b) + '=' + encodeURIComponent(a)) | |
} | |
return Z.join('&') | |
} | |
return H | |
} | |
function addNextPage(oj) { | |
if (oj.status == 404) { | |
tAP.remainFlg = false; | |
return; | |
} | |
var d = document.createElement("div"); | |
d.innerHTML = oj.responseText; | |
var posts = tAP.gP(d.getElementsByTagName("*")); | |
if (posts.length < 2) { | |
tAP.rF = false; | |
return; | |
} | |
var hr = document.createElement("hr"); | |
hr.className = "tumblrAutoPager_page_separator"; | |
tAP.pp.appendChild(hr); | |
d = document.createElement("div"); | |
d.className = "tumblrAutoPager_page_info"; | |
d.innerHTML = "<p style='float:left'><a href=http://" + tAP.LN + "/page/" + p + ">Page " + p + "</a></p>" + "<br style='clear:both' />"; | |
tAP.pp.appendChild(d); | |
for (var i = 0; i < posts.length; i++) { | |
tAP.pp.appendChild(posts[i]); | |
} | |
var footer = $("footer"); | |
footer ? footer.parentNode.appendChild(footer) : null; | |
tAP.rF = true; | |
// more pages have been added. | |
// so need to re-calcualte media heights | |
art.set_media_container_heights(); | |
} | |
watch_scroll(); | |
function watch_scroll() { | |
var d = document.compatMode == "BackCompat" ? document.body : document.documentElement; | |
var r = d.scrollHeight - d.clientHeight - (d.scrollTop || document.body.scrollTop); | |
if (r < d.clientHeight * 2 && tAP.rF) { | |
tAP.rF = false; | |
p++; | |
sendRequest(addNextPage, "", "GET", "http://" + tAP.LN + "/page/" + p, true); | |
} | |
setTimeout(arguments.callee, 200); | |
}; | |
function $(id) { | |
return document.getElementById(id) | |
}; | |
}, | |
switchAutoPage: function () { | |
this.rF = !this.rF; | |
var aE = document.getElementsByTagName('*'); | |
for (var i = 0, l = aE.length; i < l; i++) { | |
if (aE[i].className == "tAP_switch") { | |
aE[i].firstChild.nodeValue = this.rF ? "AutoPage[OFF]" : "AutoPage[ON]"; | |
} | |
} | |
} | |
}; | |
window.addEventListener ? window.addEventListener('load', tumblrAutoPager.init, false) : window.attachEvent ? window.attachEvent("onload", tumblrAutoPager.init) : window.onload = tumblrAutoPager.init; | |
</script> | |
<style type="text/css"> | |
img { border:0px; } | |
body { | |
width: 100%; | |
height: 100%; | |
background: {color:Background}; | |
color: {color:Text}; | |
font-family: 'PT Sans', Arial, sans-serif; | |
font-size: 14px; | |
margin:0px; | |
padding:0px; | |
/*line-height: 20px;*/ | |
} | |
a:link, a:active, a:visited { | |
text-decoration: none; | |
color: {color:Text}; | |
} | |
a:hover { | |
text-decoration: none; | |
color: {color:Accent}; | |
} | |
a { | |
text-decoration: none; | |
border-bottom: none; | |
} | |
/* ---------------------------------------------------- Funky Shit ------------------ */ | |
::selection, | |
a::selection, | |
img::selection { | |
background: #CCC; /*#00deff;*/ | |
color: #ffffff; | |
} | |
::-moz-selection { | |
background: #ccc; /*#00deff;*/ | |
color: #ffffff; | |
} | |
/* ---------------------------------------------------- Navigation ------------------ */ | |
#black_bar { | |
position: absolute; | |
top:0px; | |
left:0px; | |
width: 100%; | |
background-color: black; | |
height: 20px; | |
} | |
#container_top { | |
position: relative; | |
margin-right: 150px; | |
margin-top: 0px; | |
margin-bottom:40px; | |
} | |
.top_nav_left { | |
position: fixed; | |
margin: 0px auto; | |
top: 0px; | |
left:250px; | |
background-color: #f3a632; | |
} | |
.top_nav_left a:hover { | |
color: #ccc; | |
} | |
.top_nav_right { | |
position: fixed; | |
margin: 0px auto; | |
top: 0px; | |
right:250px; | |
background-color: white; | |
} | |
.top_nav_left ul, .top_nav_right ul { | |
margin: 0; | |
padding: 10px; | |
} | |
.top_nav_left li, .top_nav_right li { | |
display: inline; | |
list-style-type: none; | |
font-size: 16px; | |
font-weight: bold; | |
padding-left: 8px; /* horizontal space between tags */ | |
padding-right: 8px; | |
} | |
.left_nav { | |
position: fixed; | |
top: 350px; | |
left: 50%; | |
width: 200px; | |
height: 100%; | |
/*margin-right: 0;*/ | |
margin-top: 0; | |
margin-bottom: 0; | |
/*padding-left: 25px;*/ | |
padding-right: 0px; | |
margin-left: -505px; /*space between left nav and the posts */ | |
background-color: white; | |
font-family: 'arial narrow', 'arial', sans-serif; | |
font-size:16px; | |
line-height: 1.5em; | |
letter-spacing: 1px; | |
} | |
.left_nav a { | |
color: #ccc; | |
} | |
ul.nav { | |
/*position: relative;*/ | |
margin-top: 30px; | |
margin-left: 30px; | |
list-style: none; | |
/*margin: 0; | |
padding: 0px;*/ | |
line-height: 16px; | |
} | |
ul.nav li { | |
padding: 0px; | |
} | |
ul.nav li:first-child { | |
font-weight: bold; | |
text-transform: uppercase; | |
margin-bottom: 3px; | |
} | |
ul.nav img { | |
max-width: 100px; | |
height: auto; | |
} | |
.right_nav { | |
position: fixed; | |
top: 250px; /*was 250px*/ | |
left: 50%; | |
width:225px; | |
margin-left: 390px; | |
height: 100%; | |
background-color: white; | |
padding-top: 0px; /*was 50px*/ | |
font-family: 'arial narrow', 'arial', sans-serif; | |
/*font-size:16px;*/ | |
line-height: 1.2em; | |
} | |
.right_nav ul { | |
margin: 0px; | |
padding: 0px; | |
margin-bottom: 25px; | |
margin-left: 20px; | |
} | |
.right_nav li { | |
list-style-type: none; | |
margin: 0; | |
padding: 0px; | |
font-size:13px; | |
/*border-top: 1px solid black;*/ | |
/*width: 100px;*/ | |
margin-bottom: 4px; | |
} | |
.right_nav a:hover { | |
color: #ccc; | |
} | |
.subhead { | |
border-bottom: 1.5px solid #252525; | |
/*text-decoration: underline;*/ | |
display: inline-block; | |
white-space: nowrap; | |
color: #252525; | |
font-size:16px !important; | |
/*font-style: italic;*/ | |
text-transform: uppercase; | |
padding-bottom: 2px !important; | |
margin-bottom: 8px !important; | |
} | |
.my_tags { | |
position: relative; | |
left: -20px; | |
text-align:center; | |
/*font-family:'Helvetica Neue', Arial, Helvetica, sans-serif; */ | |
color:#ccc; | |
text-decoration: none; | |
border: none; | |
margin-bottom:-4px; | |
/*text-transform:lowercase;*/ | |
} | |
.my_tags li { | |
display: inline; | |
list-style-type: none; | |
text-decoration: none; | |
border-bottom: 0px !important; | |
color: #ccc; | |
padding-left: 10px; /* horizontal space between tags */ | |
padding-right: 10px; | |
} | |
.my_tags li a { | |
color: #ccc; | |
border-bottom: 0px !important; | |
} | |
.sharetools { | |
position: relative; | |
margin-top: 20px; | |
padding-left:174px; | |
margin-bottom: -10px; | |
} | |
.tumblr_button { | |
float: left; | |
} | |
.facebook_cut { | |
float: left; | |
width: 48px; | |
overflow: hidden; | |
margin-left: 10px; | |
margin-right: 10px; | |
} | |
.twitter_button { | |
float:left; | |
} | |
.clearfix { | |
clear: both; | |
} | |
/* ---------------------------------------------------- Posts ------------------ */ | |
div.posts { | |
margin-left:25px; /*margin: 0px auto; */ | |
margin-right:25px; | |
margin-top: 40px; | |
/*width: 500px;*/ | |
font-family: 'georgia', times, serif; | |
line-height: 1.6em; | |
} | |
/* | |
{block:IfFitPictures} | |
div.posts img { | |
width: 500px; | |
} | |
{/block:IfFitPictures} | |
*/ | |
div.posts div.post { | |
margin-bottom: 100px; | |
} | |
div.posts div.post a { | |
border-bottom: 1px dotted {color:Accent}; | |
} | |
div.posts div.post div.postfoot { | |
color: {color:Accent}; | |
} | |
div.posts div.post div.postfoot a { | |
color: {color:Accent}; | |
border-bottom: 0px dotted {color:Accent}; | |
} | |
div.posts div.post div.postfoot a:hover { | |
color: {color:Text}; | |
} | |
div.posts div.post span.clean_link a { | |
text-decoration: none; | |
border-bottom: 0px dotted transparent; | |
} | |
.post .media { | |
height: 100%; | |
/* image-rendering: -moz-crisp-edges; | |
image-rendering: -o-crisp-edges; | |
image-rendering: -webkit-optimize-contrast; | |
-ms-interpolation-mode: nearest-neighbor;*/ | |
} | |
/* | |
@media all and (max-width: 849px) { .left_nav { width: 170px; } } | |
@media all and (min-width: 850px) { .left_nav { width: 170px; } } | |
@media all and (min-width: 900px) { .left_nav { width: 170px; } } | |
@media all and (min-width: 950px) { .left_nav { width: 170px; } } | |
@media all and (min-width: 1000px) { .left_nav { width: 175px; } } | |
@media all and (min-width: 1025px) { .left_nav { width: 182px; } } | |
@media all and (min-width: 1050px) { .left_nav { width: 200px; } }*/ | |
@media all and (max-width: 1000px) { .left_nav { left:10px; margin-right: 0; margin-left: 0;} } | |
.index_photo { | |
/*max-height: 700px;*/ | |
} | |
.index_photo_div { | |
/*border: 1px solid black;*/ | |
display: block; | |
/*background-image: url({image:Logo});*/ | |
background-repeat: no-repeat; | |
background-position: left center; | |
background-size: contain; | |
height: 90vmin; /* 65vw isn't bad, 90vh is better. or 90vmin? */ | |
/*max-height: 90vw;*/ | |
/* never want height > width */ | |
} | |
.page_photo { | |
width: 90%; | |
} | |
.caption { | |
color: black; | |
width: 600px; | |
} | |
/* ---------------------------------------------------- PhotoSet ------------------ */ | |
ul.photoset { | |
list-style: none; | |
margin: 0; | |
padding: 0px; | |
} | |
ul.photoset li { | |
padding-bottom: 10px; | |
} | |
ul.photoset li:last-child { | |
padding-bottom: 0px !important; | |
} | |
/* ---------------------------------------------------- Audio ------------------ */ | |
img.albumart { | |
width: 207px; | |
height: 207px; | |
} | |
/* ---------------------------------------------------- Quote ------------------ */ | |
div.quote { | |
font-size: 24px; | |
font-family:georgia; | |
font-weight:bold; | |
font-style:italic; | |
line-height: 28px; | |
} | |
div.source { | |
text-align: right; | |
} | |
/* ---------------------------------------------------- Chat ------------------ */ | |
div.chat ul { list-style:none; margin:0px; padding:0px; } | |
div.chat li { padding: 3px 0; } | |
div.chat span.label { } | |
div.chat div.line { } | |
/* ---------------------------------------------------- Text ------------------ */ | |
.title a { | |
/*text-transform: uppercase; | |
font-weight: bold;*/ | |
color: #ccc; | |
} | |
/* ---------------------------------------------------- Notes ------------------ */ | |
div.notes { margin-top: 75px; } | |
ol.notes { padding: 0px; margin: 0px 5px; list-style-type: none; } | |
ol.notes li.note { border-top: solid 0px #ccc; padding: 0 0 3px 0; } | |
ol.notes li.note img.avatar {vertical-align: -4px; margin-right: 0px; width: 16px; height: 16px; } | |
ol.notes li.note span.action { font-weight: normal; } | |
ol.notes li.note span.action a { font-weight: normal; } | |
ol.notes li.note .answer_content { font-weight: normal; } | |
ol.notes li.note blockquote { border-color: none; padding: 1px 3px; margin: 0px 0px 0px 0px; } | |
ol.notes li.note blockquote a { text-decoration: none; } | |
/* ---------------------------------------------------- Pagination ------------------ */ | |
div.pagination { | |
margin-bottom: 100px; | |
} | |
.current_page { | |
font-weight: bold; | |
background: {color:Accent}; | |
padding: 2px 6px 0px 6px; | |
-webkit-border-radius: 18px; | |
-moz-border-radius: 18px; | |
border-radius: 18px; | |
} | |
/* ---------------------------------------------------- Stuff ------------------ */ | |
blockquote { margin-left:30px !important; } | |
div.tumblrAutoPager_page_info { | |
display:none; | |
} | |
hr { | |
display:none; | |
} | |
#tumblr_controls { | |
position: fixed !important; | |
} | |
#back-top { | |
position: fixed; | |
right: 20px; | |
bottom: 15px; | |
z-index: 1000; | |
} | |
{CustomCSS} | |
</style> | |
</head> | |
<body> | |
{block:IndexPage} | |
<div id="back-top"> | |
<!-- <a href="http://schlinkblog.tumblr.com">REGULAR TUMBLR</a><br><br> --> | |
<a id="scroll_up" href="#top">TOP</a> | |
</div> | |
{/block:IndexPage} | |
<div id="container_top"> | |
<a style="font-size:110px; margin-left: 25px; font-family:'helvetica neue', 'helvetica'; color:black;" href="/">SCHLINKPHOTO</a> | |
{block:IndexPage} | |
<div style="margin-left:25px;"> | |
<a style="font-size:13px; font-family:'helvetica neue', 'helvetica'; color:#777;" href="http://schlinkblog.tumblr.com">REGULAR TUMBLR</a> | |
</div> | |
{/block:IndexPage} | |
</div> <!-- ends container_top --> | |
<div class="posts"> | |
{block:Posts} | |
<div class="post"> | |
{block:Text} | |
{block:Title}<a href="{Permalink}" class="title" style="border-bottom: 0px !important; padding-left:15px; margin-left:-15px; border-left: 1px solid #ccc;"> | |
<span style="font-size: 22px; border-bottom: 0px !important; color: black;">{Title}</span></a> | |
<br />{/block:Title} | |
{Body} | |
{/block:Text} | |
{block:Answer} | |
<div class="title">{Asker}: {Question}</div> | |
{Answer} | |
{/block:Answer} | |
{block:Photo} | |
{block:IndexPage} | |
<span class="clean_link"><a href="{Permalink}"> | |
<div class="media_container" data-width="{PhotoWidth-HighRes}" data-height="{PhotoHeight-HighRes}"> | |
<img class="media" src="{PhotoURL-HighRes}" alt="{PhotoAlt}"> | |
</div> | |
</a> | |
</span> | |
{/block:IndexPage} | |
{block:PermalinkPage} | |
<span class="clean_link">{LinkOpenTag}<img src="{PhotoURL-HighRes}" alt="{PhotoAlt}" class="page_photo" />{LinkCloseTag} | |
</span> | |
{block:Caption}<div class="caption">{Caption}</div>{/block:Caption} | |
{/block:PermalinkPage} | |
{/block:Photo} | |
{block:Photoset} | |
<ul class="photoset"> | |
{block:Photos} | |
<li><img src="{PhotoURL-500}" /></li> | |
{/block:Photos} | |
</ul> | |
{Caption} | |
{/block:Photoset} | |
{block:Quote} | |
<div class="quote">{Quote}</div> | |
{block:Source}<div class="source">— {Source}</div>{/block:Source} | |
{/block:Quote} | |
{block:Link} | |
<a href="{URL}" class="linkpost" {Target}><span style="font-size: 22px">➜ {Name}</span></a> | |
{block:Description} | |
<div class="caption">{Description}</div> | |
{/block:Description} | |
{/block:Link} | |
{block:Chat} | |
<div class="chat"> | |
{block:Title}<a href="{Permalink}" class="title">{Title}</a>{/block:Title} | |
<ul> | |
{block:Lines} | |
<li class="{Alt}"> | |
<div class="line"> | |
{block:Label}<b>{Label}</b>{/block:Label} | |
{Line} | |
</div> | |
</li> | |
{/block:Lines} | |
</ul> | |
</div> | |
{/block:Chat} | |
{block:Audio} | |
<div style="float:left; padding-right: 15px;"> | |
{block:AlbumArt} | |
<img src="{AlbumArtURL}" class="albumart" /> | |
{/block:AlbumArt} | |
{AudioPlayerBlack} | |
</div> | |
{block:Caption}<div class="caption">{Caption}</div>{/block:Caption} | |
<br style="clear:both;" /> | |
{/block:Audio} | |
{block:Video} | |
<div class="video"> | |
{Video-500} | |
{block:Caption}<div class="caption">{Caption}</div>{/block:Caption} | |
</div> | |
{/block:Video} | |
{block:Date} | |
<div class="postfoot"> | |
{block:IndexPage} | |
<!-- <a href="{Permalink}" style="font-family: 'helvetica neue', 'helvetica', 'arial', arial, sans-serif;">X</a> --> | |
<!-- <span style="font-size: 12px; font-family: 'georgia', times, serif;">{Month} {DayofMonth}, {Year} at {12hour}:{Minutes}{AmPm}</span> --> | |
<!-- Posted {TimeAgo}   --> | |
<!-- ✖ --> | |
<!-- {block:IfShowNotes} | |
{block:NoteCount} | |
{NoteCountWithLabel} | |
{/block:NoteCount} | |
{/block:IfShowNotes} </a>--> | |
{/block:IndexPage} | |
<!-- {block:ContentSource} | |
<a href="{SourceURL}"> ❖ | |
Source: | |
{block:SourceLogo} | |
<img src="{BlackLogoURL}" width="{LogoWidth}" | |
height="{LogoHeight}" alt="{SourceTitle}" /> | |
{/block:SourceLogo} | |
{block:NoSourceLogo} | |
{SourceTitle} | |
{/block:NoSourceLogo} | |
</a> | |
{/block:ContentSource} --> | |
{block:ifShowReblogLink} | |
<a href="{ReblogURL}"> ⟲ Reblog</a> | |
{/block:ifShowReblogLink} | |
</div> | |
{/block:Date} | |
{block:ifShowTags} | |
{block:HasTags} | |
  | |
<div class="my_tags"> | |
<ul> | |
{block:Tags} | |
<li><a href="{TagURL}">#{Tag}</a></li> | |
{/block:Tags} | |
</ul> | |
</div> | |
{/block:HasTags} | |
{/block:ifShowTags} | |
{block:Permalink} | |
{block:PostNotes} | |
<div class="notes"> | |
{block:NoteCount} | |
<div class="title">{NoteCountWithLabel}</div> | |
{/block:NoteCount} | |
{PostNotes} | |
</div> | |
{/block:PostNotes} | |
{/block:Permalink} | |
</div><!-- /post --> | |
{/block:Posts} | |
{block:ifNotInfiniteScroll} | |
{block:Pagination} | |
<div class="pagination"> | |
{block:PreviousPage} | |
<a href="{PreviousPage}">« Previous</a> | |
{/block:PreviousPage} | |
{block:JumpPagination length="10"} | |
{block:CurrentPage} | |
<span class="current_page">{PageNumber}</span> | |
{/block:CurrentPage} | |
{block:JumpPage} | |
<a class="jump_page" href="{URL}">{PageNumber}</a> | |
{/block:JumpPage} | |
{/block:JumpPagination} | |
{block:NextPage} | |
<a href="{NextPage}">Next »</a> | |
{/block:NextPage} | |
{/block:Pagination} | |
</div> | |
{/block:ifNotInfiniteScroll} | |
</div><!-- /posts --> | |
<script type="text/javascript"> | |
var art = { | |
init: function() { | |
art.set_media_container_heights(); | |
}, | |
set_media_container_heights: function(){ | |
console.log("resizing..."); | |
var window_width = $(window).width(); | |
var window_height = $(window).height(); | |
// Leave some room for caption | |
window_height -= 60; | |
window_width -= 100; | |
$('.post .media_container').each(function(i, el){ | |
var el = $(el); | |
var media_width = el.data('width'); | |
var media_height = el.data('height'); | |
// Calculate height based on window width | |
var new_height = media_height * (window_width / media_width); | |
// Use new_height, unless its taller than the window | |
el.css('height', Math.min(new_height, window_height)); | |
// sam shit | |
var new_width = media_width * (window_height / media_height); | |
el.css('width', Math.min(new_width, window_width)); | |
}); | |
}, | |
}; | |
$(window).ready(function(){ | |
art.init(); | |
}); | |
$(window).resize(function(){ | |
art.set_media_container_heights(); | |
}); | |
</script> | |
<!-- <div style="display:none;">THEME BY PARTI</div> --> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment