tdiary用の麻雀牌列表示プラグイン (Tilesプラグイン) というものを作ってみた。何でこんなものを作ったかというと、comjong.comをtdiary blogkit化しようという野望なわけで。
作りは単純で、麻雀牌列を文字列として与えると、画像を表示するだけ。例えば、
<%=tiles( "b1 b2 b5 b7 b9 c2 c4 c5 d2 d4 we we ws sp ws", "東1局 1本場 東家 1順目 配給原点" )%>などと書くと、
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
東1局 1本場 東家 1順目 配給原点
<DIV class=tiles> <P class=tiles_images> <IMG class=tile height=32 alt=一索 src="./tiles_images/b1.png" width=24> <IMG class=tile height=32 alt=二索 src="./tiles_images/b2.png" width=24> <IMG class=tile height=32 alt=五索 src="./tiles_images/b5.png" width=24> <IMG class=tile height=32 alt=七索 src="./tiles_images/b7.png" width=24> <IMG class=tile height=32 alt=九索 src="./tiles_images/b9.png" width=24> <IMG class=tile height=32 alt=二萬 src="./tiles_images/c2.png" width=24> <IMG class=tile height=32 alt=四萬 src="./tiles_images/c4.png" width=24> <IMG class=tile height=32 alt=五萬 src="./tiles_images/c5.png" width=24> <IMG class=tile height=32 alt=二筒 src="./tiles_images/d2.png" width=24> <IMG class=tile height=32 alt=四筒 src="./tiles_images/d4.png" width=24> <IMG class=tile height=32 alt=東 src="./tiles_images/we.png" width=24> <IMG class=tile height=32 alt=東 src="./tiles_images/we.png" width=24> <IMG class=tile height=32 alt=南 src="./tiles_images/ws.png" width=24> <IMG class=tile height=32 alt= src="./tiles_images/sp.png" width=24> <IMG class=tile height=32 alt=南 src="./tiles_images/ws.png" width=24> </P> <P class=tiles_comment>東1局 1本場 東家 1順目 配給原点</P> </DIV>
ただしclass名などはまだ暫定で、変更の可能性がある。
また、インラインで
<%=tile( "b1" )%>と書くと
牌画像は一二四十の田中猛彦氏の牌画を利用させていただいた。ライセンスは、
拙作の牌画については,Web ページ上で自由に使っていただいてかまいません(許諾もいりません).とのこと。非常にありがたい。
とりあえず作ってはみたものの、まだちょっと手を入れたいところはある。そんなわけでtodoリスト。
一昨年の11月以来、20ヶ月ぶりに携帯電話を買い換えた。
au SmartSports Run&Walkで遊びたいので、丈夫そうなCASIO G'zOne W62CAに。気がついたらここ3代はCASIO続き。
使っての感想などはまた後ほど。
ToDo/ToBuy
_ izumick [今日の記事で紹介いたしました。http://d.hatena.ne.jp/izumick/20040728 何かお手..]
_ fukumoto [izumickさん、ありがとうございます。 こちらもとりあえずざっくり作ってはみたものの、きちんと公開できる形にする..]
_ izumick [残念ながら、はてなのプラグインは自作できません。 自鯖でのんびりとtdiaryを運営しているので、そちらに使おうかと..]