Skip to content

Instantly share code, notes, and snippets.

@fideloper
Created June 4, 2013 18:21
Show Gist options
  • Save fideloper/5708224 to your computer and use it in GitHub Desktop.
Save fideloper/5708224 to your computer and use it in GitHub Desktop.
Quick example of Google prettify
<!-- your site content -->
<script src="mother-fuckin-jquery.js" type="text/javascript"></script>
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
$(function()
{
$('.post pre, table code').addClass('prettyprint');
prettyPrint();
});
</script>
.post pre { margin-bottom: 20px }
code { background-color: #fde9ce }
.prettyprint {
overflow-x: auto;
font-family: Monaco,Consolas,"Lucida Console",monospace;
background-color: #333;
padding: 1.5em;
font-size: .75em;
border: 0;
color: #e9e4e5;
line-height: 1.9em;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-moz-background-clip: padding-box;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.prettyprint .pln { color: #e9e4e5 }
.prettyprint .str { color: #bcd42a }
.prettyprint .kwd { color: #4bb1b1 }
.prettyprint .com { color: #888 }
.prettyprint .typ { color: #ef7c61 }
.prettyprint .lit { color: #bcd42a }
.prettyprint .pun,
.prettyprint .opn,
.prettyprint .clo { color: #fff }
.prettyprint .tag { color: #4bb1b1 }
.prettyprint .atn { color: #ef7c61 }
.prettyprint .atv { color: #bcd42a }
.prettyprint .dec,
.prettyprint .var { color: #606 }
.prettyprint .fun { color: red }
.prettyprint code {
font-family: Monaco,Consolas,"Lucida Console",monospace;
background-color: transparent;
}
@mikeerickson
Copy link

LOL at the script tag for jquery! Classic :-)

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