]> Git repositories of Nishi - koakuma.git/commitdiff
fix for png on ie6
authorNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 08:13:21 +0000 (08:13 +0000)
committerNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 08:13:21 +0000 (08:13 +0000)
git-svn-id: file:///raid/svn-personal/koakuma/trunk@24 219d0f9c-2d94-d447-890a-813e76b88fe9

Static/style.css
Static/transparent.gif [new file with mode: 0644]
koakuma.cgi.in

index da9f6f34221be5b8afad8b28d6749f8e0f454ace..d84bce19370211fc734bbf686b8bb500a2732c5d 100644 (file)
@@ -49,6 +49,11 @@ th {
        height: 88px;
 }
 
+img {
+       border: none;
+       background-color: transparent;
+}
+
 #title {
        padding: 5px;
        background-color: #606080;
diff --git a/Static/transparent.gif b/Static/transparent.gif
new file mode 100644 (file)
index 0000000..d7941ce
Binary files /dev/null and b/Static/transparent.gif differ
index 7861db6cf913f3ca75def2dc8eb0bf37289854a0..652590a966f6ae65ffb72fcf40c74690724c2da5 100644 (file)
@@ -240,10 +240,16 @@ proc start_html {title has_toc} {
        rputs   "               <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
        rputs   "               <title>$title - Koakuma</title>"
        rputs   "               <link rel=\"stylesheet\" href=\"$css\">"
+       set msie " src=\"$koakuma_png\""
+       if { [info exists "env(HTTP_USER_AGENT)"] } {
+               if { [regexp {MSIE 6} "$env(HTTP_USER_AGENT)"] } {
+                       set msie " style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='$koakuma_png', sizingMethod='scale');\" src=\"/static/transparent.gif\""
+               }
+       }
        rputs   "       </head>"
        rputs   "       <body>"
        rputs   "               <a href=\"/koakuma\" id=\"gomain\">"
-       rputs   "                       <img src=\"$koakuma_png\" alt=\"Koakuma by Kasuya Baian\" height=\"128px\">"
+       rputs   "                       <img alt=\"Koakuma by Kasuya Baian\" height=\"128px\"$msie>"
        rputs   "               </a>"
        rputs   "               <div id=\"space\"></div>"
        rputs   "               <div id=\"title\">"