aboutsummaryrefslogtreecommitdiffstats
path: root/svg-notifications.md
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2016-06-05 03:31:15 +0800
committerkumavis <kumavis@users.noreply.github.com>2016-06-05 03:31:15 +0800
commit45ac0ef565abf441367068579569a025c9c359d9 (patch)
treecf08ce961df9b86b011c8eb3e7b7ef3c18874914 /svg-notifications.md
parentb879e2423e7e22f7813b9866c4a5aacc7664d276 (diff)
downloadtangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.tar
tangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.tar.gz
tangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.tar.bz2
tangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.tar.lz
tangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.tar.xz
tangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.tar.zst
tangerine-wallet-browser-45ac0ef565abf441367068579569a025c9c359d9.zip
Update svg-notifications.md
Diffstat (limited to 'svg-notifications.md')
-rw-r--r--svg-notifications.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/svg-notifications.md b/svg-notifications.md
index fd3b63f7a..2c9e5cc2c 100644
--- a/svg-notifications.md
+++ b/svg-notifications.md
@@ -8,13 +8,16 @@ Heres some utilities for preparing the data uri:
no base64
specify mime type: image/svg+xml
result should look like:
+ ```
data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%0D%0A%20%20width%3D%271000px%27%20height%3D%27500px%27%20viewBox%3D%270%200%20200%20100%27%3E%0D%0A%20%20%3Crect%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27white%27%20%2F%3E%0D%0A%20%20%3Ctext%20x%3D%270%27%20y%3D%2720%27%20font-family%3D%27monospace%27%20font-size%3D%276%27%20fill%3D%27black%27%3E%0D%0A%20%20%20%20%3Ctspan%20x%3D%270%27%20dy%3D%271.2em%27%3EDomain%3A%20https%3A%2F%2Fboardroom.to%3C%2Ftspan%3E%0D%0A%20%20%20%20%3Ctspan%20x%3D%270%27%20dy%3D%271.2em%27%3EFrom%3A%20%200xabcdef%3C%2Ftspan%3E%0D%0A%20%20%20%20%3Ctspan%20x%3D%270%27%20dy%3D%271.2em%27%3ETo%3A%20%20%20%200xfedcba%3C%2Ftspan%3E%0D%0A%20%20%20%20%3Ctspan%20x%3D%270%27%20dy%3D%271.2em%27%3EValue%3A%201.025%20Ether%3C%2Ftspan%3E%0D%0A%20%20%20%20%3Ctspan%20x%3D%270%27%20dy%3D%271.2em%27%3EGas%3A%200.025%20Ether%3C%2Ftspan%3E%0D%0A%20%20%3C%2Ftext%3E%0D%0A%3C%2Fsvg%3E
+ ```
build a template using pure svg:
generate uri
-'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(svgSrc)
+`'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(svgSrc)`
+```
<svg xmlns='http://www.w3.org/2000/svg'
width='1000px' height='500px' viewBox='0 0 200 100'>
<rect x='0' y='0' width='100%' height='100%' fill='white' />
@@ -26,9 +29,10 @@ generate uri
<tspan x='0' dy='1.2em'>Gas: 0.025 Ether</tspan>
</text>
</svg>
+```
or svg-embedded html:
-
+```
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="500">
<rect x='0' y='0' width='100%' height='100%' fill='white' />
<foreignObject class="node" x="46" y="22" width="200" height="300">
@@ -39,4 +43,5 @@ or svg-embedded html:
</div>
</body>
</foreignObject>
-</svg> \ No newline at end of file
+</svg>
+```