diff options
[mo] Added mozilla observatory
1 files changed, 60 insertions, 0 deletions
| -rw-r--r-- | public/mozilla-observatory.html | 60 |
diff --git a/public/mozilla-observatory.html b/public/mozilla-observatory.html new file mode 100644 index 0000000..026116c --- /dev/null +++ b/public/mozilla-observatory.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html> + <head> + <title>Mozilla Observatory button</title> + <link rel="stylesheet" href="https://syndamia.gitlab.io/web-buttons/common-styles.css" crossorigin="anonymous"> +<style> +* { +font-smooth: never; +} +#button { + border: 2px outset #4582ec; + width: 115px; + background: white; +} +#button > * { + height: 35px; +} +#mozilla-logo { + padding: 5px; + float: left; + font: 11px Arial; + font-weight: bold; +} +#score { + color: white; + background-color: #2d882d; + float: right; + font: 18px Arial; + width: 35px; + text-align: center; + margin-bottom: 10px; + border-radius: 7px; + border: 3px solid #106610; +} +</style> + </head> + <body> + <div id="button" class="button-x39"> + <div id="mozilla-logo"> + Mozilla<br>Observatory + </div> + <div id="score"> + A<sup>+</sup> + </div> + </div> + <script src="./dom-to-image/src/dom-to-image.js"></script> + <script> + var node = document.getElementById('button'); + domtoimage.toPng(node) + .then (function (dataUrl) { + var img = new Image(); + img.src = dataUrl; + document.body.appendChild(img); + }) + .catch(function (error) { + console.error('oops, something went wrong!', error); + }); + </script> + </body> +</html> |
