larger font for code samples (closes #60)
This commit is contained in:
parent
54f1fcf381
commit
74d342daf7
@ -197,7 +197,7 @@ body {
|
||||
margin: 10px auto;
|
||||
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-size: 20px;
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
|
||||
|
27
index.html
27
index.html
@ -184,27 +184,20 @@
|
||||
<section>
|
||||
<h2>Pretty Code</h2>
|
||||
<pre><code contenteditable>
|
||||
var supports3DTransforms = document.body.style['webkitPerspective'] !== undefined ||
|
||||
document.body.style['MozPerspective'] !== undefined ||
|
||||
document.body.style['perspective'] !== undefined;
|
||||
|
||||
function linkify( selector ) {
|
||||
if( supports3DTransforms ) {
|
||||
|
||||
var nodes = document.querySelectorAll( selector );
|
||||
if( supports3DTransforms ) {
|
||||
|
||||
var nodes = document.querySelectorAll( selector );
|
||||
|
||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||
var node = nodes[i];
|
||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||
var node = nodes[i];
|
||||
|
||||
if( !node.className || !node.className.match( /roll/g ) ) {
|
||||
node.className += ' roll';
|
||||
node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>';
|
||||
}
|
||||
};
|
||||
}
|
||||
if( !node.className ) ) {
|
||||
node.className += ' roll';
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
linkify( 'a' );
|
||||
</code></pre>
|
||||
<p>Courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user