I wanted a way to be able to display code and such in my blog entries. I'm not a fan of copying and pasting because the formatting often gets broken and it's hard to maintain.
Insert something like this in your HTML <head> section.
<link rel="stylesheet" type="text/css" href="codebox.css" />
And stick this somewhere in the body. It's invisible but contains the localized string for the download link. I put this in the MoveableType "Header" template.
<div class="codeboxDownloadStr">Download Code</div>
The rest is just inserting a <div> whose id is the URL to the file you want to insert into a neat little box!
<div class="codebox" id="/tech/codebox.js"></div>
And that's it!
Copyright 2012 rickk.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.