Commit a41595b0 authored by Luc Didry's avatar Luc Didry
Browse files

Fix FF compatibility + remove toUpperCase

parent 1c50fd1b
Pipeline #23759 passed with stage
in 15 seconds
@font-face {
font-family: 'DejaVu Sans';
src: url('../fonts/dejavu-sans-webfont.eot'); /* IE9 Compat Modes */
src: url('../fonts/dejavu-sans-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/dejavu-sans-webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('../fonts/dejavu-sans-webfont.ttf') format('truetype'), /* Safari, Android, iOS */
}
@font-face{font-family:'DejaVu Sans';src:url(../fonts/dejavu-sans-webfont.eot);src:url(../fonts/dejavu-sans-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/dejavu-sans-webfont.woff2) format('woff2'),url(../fonts/dejavu-sans-webfont.woff) format('woff'),url(../fonts/dejavu-sans-webfont.ttf) format('truetype'),url(../fonts/dejavu-sans-webfont.svg#dejavu_sansregular) format('svg')}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>WemaWema</title> <title>WemaWema</title>
<link href="css/dejavu-sans.css" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<link href="css/normalize.css" rel="stylesheet"> <link href="css/normalize.css" rel="stylesheet">
<link href="css/skeleton.css" rel="stylesheet"> <link href="css/skeleton.css" rel="stylesheet">
<link href="css/wema_wema.css" rel="stylesheet"> <link href="css/wema_wema.css" rel="stylesheet">
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
<h1>WemaWema</h1> <h1>WemaWema</h1>
<p> <p>
<label for="wemake">WE MAKE</label> <label for="wemake">WE MAKE</label>
<input id="wemake" placeholder="PORN" value="PORN" type="text" autofocus> <a class="button" href="#" id="download">Download</a> <input id="wemake" placeholder="PORN" type="text" value="PORN" autofocus> <a class="button" href="#" id="download">Download</a>
</p> </p>
<canvas id="canvas" width="800" height="400"></canvas> <canvas id="canvas" width="800" height="400"></canvas>
</div> </div>
......
...@@ -38,8 +38,7 @@ var domIsReady = (function(domIsReady) { ...@@ -38,8 +38,7 @@ var domIsReady = (function(domIsReady) {
}); });
})(document, window, domIsReady); })(document, window, domIsReady);
function refreshText() { function refreshText(useValue) {
console.log('toto');
var w = document.getElementById('wemake'); var w = document.getElementById('wemake');
var c = document.getElementById('canvas'); var c = document.getElementById('canvas');
var ctx = c.getContext('2d'); var ctx = c.getContext('2d');
...@@ -49,20 +48,20 @@ function refreshText() { ...@@ -49,20 +48,20 @@ function refreshText() {
roundRect(ctx, 0, 0, c.width, c.height, 20, true, false); roundRect(ctx, 0, 0, c.width, c.height, 20, true, false);
// rounded rectangle // rounded rectangle
ctx.lineWidth = 20; ctx.lineWidth = 20;
ctx.strokeStyle = 'rgb(0, 0, 0)'; ctx.strokeStyle = 'rgb(0, 0, 0)';
roundRect(ctx, 25, 25, 750, 350, 20, false); roundRect(ctx, 25, 25, 750, 350, 20, false);
ctx.textAlign="center"; ctx.textAlign="center";
// Write WE MAKE // Write WE MAKE
ctx.font = 'bold 150px "DejaVu Sans"'; ctx.font = 'bold 150px sans-serif';
ctx.fillStyle = 'rgba(0, 0, 0, 1)'; ctx.fillStyle = 'rgba(0, 0, 0, 1)';
ctx.fillText('WE MAKE', 400, 160, 725); ctx.fillText('WE MAKE', 400, 160, 725);
// Write new value // Write new value
ctx.font = 'bold 220px "DejaVu Sans"'; ctx.font = 'bold 220px sans-serif';
ctx.fillStyle = 'rgba(0, 0, 0, 1)'; ctx.fillStyle = 'rgba(0, 0, 0, 1)';
ctx.fillText(w.value.toUpperCase(), 400, 350, 725); ctx.fillText(w.value, 400, 350, 725);
} }
function roundRect(ctx, x, y, width, height, radius, fill, stroke) { function roundRect(ctx, x, y, width, height, radius, fill, stroke) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment