2009-01-01から1年間の記事一覧

jquery.prettyPhoto.js > 表示画像をクリックしてもCLOSE

jQueryでの画像拡大のライブラリはたくさんあるけど、prettyPhotoが見栄えいい感じ。 prettyPhotoではoverlay部分をクリックしたら閉じられるんだけど、 Next、Prevが不要で、CLOSEもイラネって場合に、拡大されている画像自体もクリックで閉じれるようする…

サムネール画像の画質(圧縮率)変更

WordPressへの画像ファイルアップロード時に生成されるサムネール荒れるなぁということで、 wp-includes/media.phpの、 $jpeg_quality=90を $jpeg_quality=100に変更。

このサイトのテンプレート変更

CSS

公式テンプレート?のSoft-mochaというのをいろいろ変更してみた。 CSS3をちょっとだけ。 a { transition:all 0.3s ease-in-out; -moz-transition:all 0.3s ease-in-out; -webkit-transition:all 0.3s ease-in-out; } h1 { -moz-transform: rotate(-5deg); -…

テンプレートで分岐

<mt:If name="main_index"> <mt:Ignore>メインページ</mt:Ignore> <mt:Include module="main_index" /> <mt:ElseIf name="archive_index"> <mt:Ignore>アーカイブページ</mt:Ignore> <mt:Include module="archive_index" /> <mt:ElseIf name="category_archive"> <mt:Ignore>カテゴリー別ブログ記事リスト</mt:Ignore> </mt:elseif></mt:include></mt:elseif></mt:include></mt:if>

meta

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="imagetoolbar" content="false" /> </meta></meta></meta></meta>

うるう年の時は日付を366にする

PHP

function leap_year($leap_year) { if(($leap_year % 4 == 0) && ($leap_year % 100 != 0 || $leap_year % 400 == 0)) { $leap_year = "366"; } else { $leap_year = "365"; } return $leap_year; } といった関数を定義しておいて $leap_year_days = leap_ye…

hatena

はてなダイアリーはじめてみるテスト。はてな記法。 http://hatenadiary.g.hatena.ne.jp/keyword/はてな記法一覧 #!/usr/bin/perl -w use strict; print <<END; <html><body> <h1>Hello! World.</h1> </body></html> END