Skip to content

Instantly share code, notes, and snippets.

@jaredatron
Created November 14, 2009 07:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredatron/234427 to your computer and use it in GitHub Desktop.
Save jaredatron/234427 to your computer and use it in GitHub Desktop.
// 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]();
});
<!-- embed a gist like this -->
<p class="embed_gist"><a href="http://gist.github.com/234427">http://gist.github.com/234427</a></p>
/* 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;
}
@ksobon
Copy link

ksobon commented Nov 3, 2014

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment