Template:EquipmentLabel: Difference between revisions

From Pumping Station One
fixed url paths in html for images
No edit summary
 
(18 intermediate revisions by 3 users not shown)
Line 20: Line 20:
==Label==
==Label==
</noinclude>
</noinclude>
 
<html><div style="display: flex; float: right; padding-left: 24px; "><span style="display: flex; height: auto ; width: 22em ;">
<html>
<svg id="printableArea" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 555 175" enable-background="new 0 0 555 175" xml:space="preserve" height="175px" width="555px" style="border:2px solid #000000;display: flex; height: auto ; width: auto ;" onClick="printSVG()">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="555" height="175px" viewBox="0 0 555 175" enable-background="new 0 0 555 175" xml:space="preserve" style="border:2px solid #000000;">


<g id="qr">
<g id="qr">
<image width="150" height="150" xlink:href="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://wiki.pumpingstationone.org/</html>{{FULLPAGENAMEE}}<html>" />
<image width="150" height="150" transform="translate(2,2)" xlink:href="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://wiki.pumpingstationone.org/wiki/</html>{{FULLPAGENAMEE}}<html>" />
</g>
</g>


Line 94: Line 93:
</g>
</g>


</svg>
<script type="text/JavaScript">
</html>
<![CDATA[
             
function printSVG() {
const newWindow = window.open('', '_blank');
newWindow.document.write(svg.outerHTML);
newWindow.document.close();
//newWindow.print(); //uncomment to auto-print on click
}
 
const svg = document.getElementById('printableArea');
 
]]>
 
</script>
 
 
</svg></div></html>