web開発者のブログらしくソースコードに色が付くプラグインを入れてみた。
いろいろ探し回ってWP-Syntax « Extend › Pluginsを入れてみた。
Supported Languages
The following languages are supported in the lang attribute:abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, strong>php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80
(Bold languages just highlight the more popular ones.)
スタイルシートを指示通りに入れると現在のテンプレートではデザインが崩れるのでちょこっと改造
.wp_syntax { color: #100; background-color: #f9f9f9; border: 1px solid silver; margin: 0 0 1.5em -2px; /*-2pxに変更*/ overflow: auto; }/* IE FIX */ .wp_syntax { overflow-x: auto; overflow-y: hidden; padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 15 : 0); width: 100%; } .wp_syntax table { border-collapse: collapse; } .wp_syntax div, .wp_syntax td { vertical-align: top; padding: 2px 4px; } .wp_syntax .line_numbers { text-align: right; background-color: #def; color: gray; overflow: visible; } /* potential overrides for other styles */ .wp_syntax pre { margin: 0; padding: 5px; /*なんとなく追加w*/ width: auto; float: none; clear: none; overflow: visible; }
過去の投稿もあわせて修正。
2009/10/01 ちょっと修正
tml4stric → html4stric
Trackbacks /
Pingbacks