diff buy.html @ 40:1ac1409ea68c laserkard

[svn r41] implemented dynamic text.
author rlm
date Mon, 25 Jan 2010 03:42:08 -0500
parents 07c19a58ba5a
children c4747d955ac8
line wrap: on
line diff
     1.1 --- a/buy.html	Sun Jan 24 15:06:22 2010 -0500
     1.2 +++ b/buy.html	Mon Jan 25 03:42:08 2010 -0500
     1.3 @@ -10,7 +10,7 @@
     1.4  
     1.5  <script type="text/javascript" src="./buycode.js"></script>
     1.6  <script type="text/javascript" src="./awesome_js/raphael.js"></script>
     1.7 -
     1.8 +<script type="text/javascript" src="./awesome_js/robert.js"></script>
     1.9  <script type="text/javascript" src="./awesome_js/cufon-yui.js"></script>
    1.10  <script type="text/javascript" src="./awesome_js/HelveticaNeue_LT_55_Roman_700-HelveticaNeue_LT_55_Roman_700-HelveticaNeue_LT_55_Roman_italic_700-HelveticaNeue_LT_55_Roman_italic_700.font.js"></script>
    1.11  
    1.12 @@ -52,22 +52,8 @@
    1.13  	
    1.14  <div id="display">PERL-REPLACE::DISPLAY</div>
    1.15  
    1.16 -<script language="javascript">
    1.17  
    1.18  
    1.19 -var raphe = Raphael("disp_contain", 515, 318);
    1.20 -
    1.21 -var c = raphe.rect(0, 0, 514, 317);
    1.22 -c.attr("stroke", "#00f");
    1.23 -tt = raphe.print(10, 150, "Kevin Rustagi", raphe.getFont("HelveticaNeue", 700), 75);
    1.24 -
    1.25 -
    1.26 -tt.attr("stroke", "#f00");
    1.27 -tt.attr("fill", "RED");
    1.28 -
    1.29 -
    1.30 -</script>
    1.31 -
    1.32  
    1.33  </div>
    1.34  
    1.35 @@ -94,8 +80,272 @@
    1.36  <div id = "copyright">&copy; 2010 LaserKard, LLC</div>
    1.37  
    1.38  
    1.39 +<script language="javascript">
    1.40 +//this is the main painting object, established here and created with default painting values
    1.41 +var raphe = Raphael("disp_contain", 515, 318);
    1.42  
    1.43  
    1.44 +
    1.45 +function drawElement(obj)
    1.46 +{
    1.47 +	
    1.48 +}
    1.49 +
    1.50 +
    1.51 +
    1.52 +
    1.53 +function redraw(style)
    1.54 +{
    1.55 +
    1.56 +if (style == "bold")
    1.57 +{
    1.58 +	
    1.59 +
    1.60 +
    1.61 +if(typeof alias != 'undefined' ){alias.remove();}
    1.62 +if(typeof email != 'undefined' ){email.remove();}
    1.63 +if(typeof occupation != 'undefined' ){occupation.remove();}
    1.64 +if(typeof company != 'undefined' ){company.remove();}
    1.65 +if(typeof phone != 'undefined' ){phone.remove();}
    1.66 +if(typeof website != 'undefined' ){website.remove();}
    1.67 +if(typeof lnn != 'undefined' ){lnn.remove();}
    1.68 +
    1.69 +
    1.70 +
    1.71 +var oText = document.getElementById('Name');
    1.72 +var text_val = oText.value; 
    1.73 +alias = raphe.print(10, 160, text_val, raphe.getFont('HelveticaNeue', 700), 75);
    1.74 +alias.attr('stroke', '#6a6a6a');
    1.75 +alias.attr('fill', 'none')
    1.76 +var c = alias.getBBox().width;
    1.77 +alias.translate((485 - c)/2,0);
    1.78 +
    1.79 +	
    1.80 +var oText = document.getElementById('Email');
    1.81 +var text_val = oText.value; 
    1.82 +
    1.83 +email = raphe.print(280, 270, text_val, raphe.getFont("HelveticaNeue", 700), 25);
    1.84 +email.attr('stroke', '#6a6a6a');
    1.85 +email.attr('fill', 'TRANSPARENT');
    1.86 +
    1.87 +
    1.88 +
    1.89 +	
    1.90 +}
    1.91 +
    1.92 +
    1.93 +if (style == "arrow")
    1.94 +{
    1.95 +	
    1.96 +if(typeof alias != 'undefined' ){alias.remove();}
    1.97 +if(typeof email != 'undefined' ){email.remove();}
    1.98 +if(typeof occupation != 'undefined' ){occupation.remove();}
    1.99 +if(typeof company != 'undefined' ){company.remove();}
   1.100 +if(typeof phone != 'undefined' ){phone.remove();}
   1.101 +if(typeof website != 'undefined' ){website.remove();}
   1.102 +if(typeof lnn != 'undefined' ){lnn.remove();}
   1.103 +
   1.104 +
   1.105 +var oText = document.getElementById('Name');
   1.106 +var text_val = oText.value; 
   1.107 +alias = raphe.print(40, 110, text_val, raphe.getFont('HelveticaNeue', 700), 64);
   1.108 +alias.attr('stroke', '#6a6a6a');
   1.109 +alias.attr('fill', 'none')
   1.110 +
   1.111 +
   1.112 +
   1.113 +var oText = document.getElementById('Company');
   1.114 +var text_val = oText.value; 
   1.115 +
   1.116 +company = raphe.print(40, 155, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.117 +company.attr('stroke', '#6a6a6a');
   1.118 +company.attr('fill', 'TRANSPARENT');
   1.119 +
   1.120 +
   1.121 +var oText = document.getElementById('Occupation');
   1.122 +var text_val = oText.value; 
   1.123 +
   1.124 +occupation = raphe.print(40, 190, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.125 +occupation.attr('stroke', '#6a6a6a');
   1.126 +occupation.attr('fill', 'TRANSPARENT');
   1.127 +
   1.128 +
   1.129 +var oText = document.getElementById('Email');
   1.130 +var text_val = oText.value; 
   1.131 +
   1.132 +email = raphe.print(280, 270, text_val, raphe.getFont("HelveticaNeue", 700), 25);
   1.133 +email.attr('stroke', '#6a6a6a');
   1.134 +email.attr('fill', 'TRANSPARENT');
   1.135 +
   1.136 +
   1.137 +lnn = raphe.path("M 2 272 L 258 272");
   1.138 +lnn.attr('stroke', '#6a6a6a');
   1.139 +	
   1.140 +}
   1.141 +
   1.142 +
   1.143 +if (style == "classic")
   1.144 +{
   1.145 +	
   1.146 +if(typeof alias != 'undefined' ){alias.remove();}
   1.147 +if(typeof email != 'undefined' ){email.remove();}
   1.148 +if(typeof occupation != 'undefined' ){occupation.remove();}
   1.149 +if(typeof company != 'undefined' ){company.remove();}
   1.150 +if(typeof phone != 'undefined' ){phone.remove();}
   1.151 +if(typeof website != 'undefined' ){website.remove();}
   1.152 +if(typeof lnn != 'undefined' ){lnn.remove();}
   1.153 +
   1.154 +
   1.155 +var oText = document.getElementById('Email');
   1.156 +var text_val = oText.value; 
   1.157 +
   1.158 +email = raphe.print(0, 42, text_val, raphe.getFont("HelveticaNeue", 700), 29);
   1.159 +email.attr('stroke', '#6a6a6a');
   1.160 +email.attr('fill', 'TRANSPARENT');
   1.161 +var c = email.getBBox().width;
   1.162 +email.translate((510 - c)/2,0);
   1.163 +
   1.164 +
   1.165 +var oText = document.getElementById('Phone');
   1.166 +var text_val = oText.value; 
   1.167 +
   1.168 +phone = raphe.print(0, 75, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.169 +phone.attr('stroke', '#6a6a6a');
   1.170 +phone.attr('fill', 'TRANSPARENT');
   1.171 +var c = phone.getBBox().width;
   1.172 +phone.translate((510 - c)/2,0);
   1.173 +
   1.174 +
   1.175 +
   1.176 +
   1.177 +var oText = document.getElementById('Name');
   1.178 +var text_val = oText.value; 
   1.179 +alias = raphe.print(0, 164, text_val, raphe.getFont('HelveticaNeue', 800), 55);
   1.180 +alias.attr('stroke', '#6a6a6a');
   1.181 +alias.attr('fill', 'none')
   1.182 +var c = alias.getBBox().width;
   1.183 +alias.translate((510 - c)/2,0);
   1.184 +
   1.185 +
   1.186 +var oText = document.getElementById('Company');
   1.187 +var text_val = oText.value; 
   1.188 +company = raphe.print(0, 247, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.189 +company.attr('stroke', '#6a6a6a');
   1.190 +company.attr('fill', 'TRANSPARENT');
   1.191 +var c = company.getBBox().width;
   1.192 +company.translate((510 - c)/2,0);
   1.193 +
   1.194 +
   1.195 +var oText = document.getElementById('Occupation');
   1.196 +var text_val = oText.value; 
   1.197 +
   1.198 +occupation = raphe.print(0, 278, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.199 +occupation.attr('stroke', '#6a6a6a');
   1.200 +occupation.attr('fill', 'TRANSPARENT');
   1.201 +var c = occupation.getBBox().width;
   1.202 +occupation.translate((510 - c)/2,0);
   1.203 +
   1.204 +
   1.205 +
   1.206 +
   1.207 +var oText = document.getElementById('Website');
   1.208 +var text_val = oText.value; 
   1.209 +
   1.210 +website = raphe.print(0, 0, text_val, raphe.getFont("HelveticaNeue", 700), 21);
   1.211 +website.attr('stroke', '#6a6a6a');
   1.212 +website.attr('fill', 'TRANSPARENT');
   1.213 +
   1.214 +var c = website.getBBox().width;
   1.215 +website.translate((317 - c)/2,0);
   1.216 +
   1.217 +website.translate(0, -490);
   1.218 +website.rotate(90,0,0);
   1.219 +}
   1.220 +
   1.221 +
   1.222 +if (style == "direct")
   1.223 +{
   1.224 +	
   1.225 +if(typeof alias != 'undefined' ){alias.remove();}
   1.226 +if(typeof email != 'undefined' ){email.remove();}
   1.227 +if(typeof occupation != 'undefined' ){occupation.remove();}
   1.228 +if(typeof company != 'undefined' ){company.remove();}
   1.229 +if(typeof phone != 'undefined' ){phone.remove();}
   1.230 +if(typeof website != 'undefined' ){website.remove();}
   1.231 +if(typeof lnn != 'undefined' ){lnn.remove();}
   1.232 +
   1.233 +
   1.234 +
   1.235 +var oText = document.getElementById('Name');
   1.236 +var text_val = oText.value; 
   1.237 +alias = raphe.print(37, 70, text_val, raphe.getFont('HelveticaNeue', 700), 65);
   1.238 +alias.attr('stroke', '#6a6a6a');
   1.239 +alias.attr('fill', 'none')
   1.240 +
   1.241 +
   1.242 +var oText = document.getElementById('Occupation');
   1.243 +var text_val = oText.value; 
   1.244 +occupation = raphe.print(37, 120, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.245 +occupation.attr('stroke', '#6a6a6a');
   1.246 +occupation.attr('fill', 'TRANSPARENT');
   1.247 +
   1.248 +
   1.249 +var oText = document.getElementById('Company');
   1.250 +var text_val = oText.value; 
   1.251 +company = raphe.print(37, 178, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.252 +company.attr('stroke', '#6a6a6a');
   1.253 +company.attr('fill', 'TRANSPARENT');
   1.254 +
   1.255 +
   1.256 +
   1.257 +var oText = document.getElementById('Phone');
   1.258 +var text_val = oText.value; 
   1.259 +phone = raphe.print(37, 210, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.260 +phone.attr('stroke', '#6a6a6a');
   1.261 +phone.attr('fill', 'TRANSPARENT');
   1.262 +
   1.263 +
   1.264 +var oText = document.getElementById('Email');
   1.265 +var text_val = oText.value; 
   1.266 +email = raphe.print(37, 240, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.267 +email.attr('stroke', '#6a6a6a');
   1.268 +email.attr('fill', 'TRANSPARENT');
   1.269 +
   1.270 +
   1.271 +var oText = document.getElementById('Website');
   1.272 +var text_val = oText.value; 
   1.273 +website = raphe.print(37, 270, text_val, raphe.getFont("HelveticaNeue", 700), 27);
   1.274 +website.attr('stroke', '#6a6a6a');
   1.275 +website.attr('fill', 'TRANSPARENT');
   1.276 +
   1.277 +lnn = raphe.path("M 350 165 L 512 165  M 350 173 L 512 173  M 350 181 L 512 181  M 350 189 L 512 189 M 350 197 L 512 197 M 350 213 L 512 213 M 350 205 L 512 205 M 350 221 L 512 221");
   1.278 +lnn.attr('stroke', '#6a6a6a');
   1.279 +
   1.280 +
   1.281 +
   1.282 +}
   1.283 +
   1.284 +
   1.285 +
   1.286 +
   1.287 +
   1.288 +}
   1.289 +
   1.290 +
   1.291 +
   1.292 +
   1.293 +
   1.294 +</script>
   1.295 +
   1.296 +
   1.297 +
   1.298 +<script language="javascript">
   1.299 +
   1.300 +
   1.301 +redraw("bold");
   1.302 +
   1.303 +</script>
   1.304 +
   1.305  </body>
   1.306  
   1.307  </html>