Created
November 14, 2009 07:31
-
-
Save jaredatron/234427 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// include this in your tumblr theme | |
$(function() { | |
var gist_injectors = $.map($('p.embed_gist').get(), (function(p){ | |
return function(){ | |
gist_injectors.shift(); | |
var gist_id = $(p).find('a:first').attr('href').replace(/.*gist.github.com\//g,''); | |
document.write = function(gist_style_link){ | |
$('head').append(gist_style_link); | |
document.write = function(gist_html){ | |
$(p).replaceWith(gist_html); | |
if (gist_injectors[0]) gist_injectors[0](); | |
}; | |
}; | |
$(document.body).append('<scr'+'ipt src="http://gist.github.com/'+gist_id+'.js"></scr'+'ipt>'); | |
}; | |
})); | |
if (gist_injectors[0]) gist_injectors[0](); | |
}); |
This file contains hidden or 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
<!-- embed a gist like this --> | |
<p class="embed_gist"><a href="http://gist.github.com/234427">http://gist.github.com/234427</a></p> |
This file contains hidden or 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
/* I like to add these styles */ | |
.gist { | |
line-height: 1.3em !important; | |
border: none !important; | |
color: white !important; | |
margin : 2em !important; | |
line-height: 1.5 !important; | |
overflow: auto !important; | |
} | |
.gist .gist-file { | |
border: 0 !important; | |
margin-bottom: 1em !important; | |
} | |
.gist .gist-file .gist-data { | |
background: rgba(0, 0, 0, 0.785156) !important; | |
border: none !important; | |
padding: 1em !important; | |
} | |
.gist .gist-file .gist-meta{ | |
font-size: 100% !important; | |
font-family: "Lucida Grande","Lucida Sans","Lucida Sans Unicode",Geneva,Verdana,sans-serif !important; | |
background: transparent !important; | |
padding: 0 !important; | |
} | |
.gist .gist-syntax .k, | |
.gist .gist-syntax .kd, | |
.gist .gist-syntax .kc, | |
.gist .gist-syntax .o{ | |
color: orange !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am wondering if its possible to turn off/make the inner frame border invisible? Which part of the CSS would control that? Thank you,