mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Minor style tweaks to 'spoiler' export template; fixed IE image size issue; added shortcut icon.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@448 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -151,11 +151,24 @@ script:
|
||||
write_cards()
|
||||
}
|
||||
copy_file("blank.gif")
|
||||
write_image_file(
|
||||
file: "set-symbol.png",
|
||||
width: 200,
|
||||
symbol_variation(symbol: set.symbol, variation: "rare")
|
||||
)
|
||||
write_image_file(
|
||||
file: "set-icon.png",
|
||||
width: 16,
|
||||
heght: 16
|
||||
symbol_variation(symbol: set.symbol, variation: "rare")
|
||||
)
|
||||
# the html page
|
||||
html := "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<title>{ to_html(set.title) }</title>
|
||||
<link rel='stylesheet' type='text/css' href='{copy_file("style.css")}' />
|
||||
<link rel='stylesheet' type='text/css' href='{copy_file("style.css")}'>
|
||||
<link rel='shortcut icon' type='image/png' href='set-icon.png'>
|
||||
<script type='text/javascript' src='{copy_file("script.js")}'></script>
|
||||
<style type='text/css'>
|
||||
body \{
|
||||
|
||||
@@ -46,19 +46,24 @@ function nice_preview() {
|
||||
}
|
||||
}
|
||||
|
||||
var dir;
|
||||
function fix_img() {
|
||||
if (this.currentStyle.width == 'auto' && this.currentStyle.height == 'auto') {
|
||||
this.style.width = this.offsetWidth + 'px';
|
||||
this.style.height = this.offsetHeight + 'px';
|
||||
}
|
||||
this.onload = null;
|
||||
this.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.src+'",sizingMethod="scale")';
|
||||
this.src = dir + "blank.gif";
|
||||
}
|
||||
function fix_png_alpha() {
|
||||
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent)) return; // only in ie 5.5 and 6
|
||||
var dir = document.getElementsByTagName("SCRIPT")[0].src.replace(/[^\/]*$/,''); // dir for blank image
|
||||
dir = document.getElementsByTagName("SCRIPT")[0].src.replace(/[^\/]*$/,''); // dir for blank image
|
||||
var imgs = document.getElementsByTagName("IMG");
|
||||
for (var i in imgs) {
|
||||
var img = imgs[i];
|
||||
if ((/\.png$/i).test(img.src)) {
|
||||
if (img.currentStyle.width == 'auto' && img.currentStyle.height == 'auto') {
|
||||
img.style.width = img.offsetWidth + 'px';
|
||||
img.style.height = img.offsetHeight + 'px';
|
||||
}
|
||||
img.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+img.src+'",sizingMethod="scale")';
|
||||
img.src = dir + "blank.gif";
|
||||
img.onload = fix_img;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,4 +72,3 @@ function init() {
|
||||
fix_png_alpha();
|
||||
nice_preview();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.set-symbol {
|
||||
float: left;
|
||||
float: right;
|
||||
margin-right: .5em;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ ul {
|
||||
display: inline;
|
||||
font-family: "Magic Symbols", "Magic Symbols 2004";
|
||||
font-size: larger;
|
||||
margin-left: .1em;
|
||||
margin-left: .5em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.card .flavor-text {
|
||||
|
||||
Reference in New Issue
Block a user