Line 3: | Line 3: | ||
<div id="pagebanner" style="background-image: url(https://static.igem.org/mediawiki/2017/6/6a/T--TU_Dresden--planet--galaxy.png);padding-top: 0;"> | <div id="pagebanner" style="background-image: url(https://static.igem.org/mediawiki/2017/6/6a/T--TU_Dresden--planet--galaxy.png);padding-top: 0;"> | ||
<div id="bannerspace"> | <div id="bannerspace"> | ||
− | <svg viewBox="0 0 2200 1000" width="100%"> | + | <svg viewBox="0 0 2200 1000" width="100%" onload="init(evt)"> |
+ | <script type="text/ecmascript"> | ||
+ | <![CDATA[ | ||
+ | |||
+ | function init(evt) | ||
+ | { | ||
+ | if ( window.svgDocument == null ) | ||
+ | { | ||
+ | svgDocument = evt.target.ownerDocument; | ||
+ | } | ||
+ | |||
+ | linkinfo = svgDocument.getElementById('linkinfo'); | ||
+ | linkinfo_bg = svgDocument.getElementById('linkinfo_bg'); | ||
+ | |||
+ | } | ||
+ | |||
+ | // Find your root SVG element | ||
+ | var svg = document.querySelector('svg'); | ||
+ | |||
+ | // Create an SVGPoint for future math | ||
+ | var pt = svg.createSVGPoint(); | ||
+ | |||
+ | // Get point in global SVG space | ||
+ | function cursorPoint(evt){ | ||
+ | pt.x = evt.clientX; pt.y = evt.clientY; | ||
+ | return pt.matrixTransform(svg.getScreenCTM().inverse()); | ||
+ | } | ||
+ | |||
+ | function ShowLinkinfo(evt, mouseovertext) | ||
+ | { | ||
+ | var loc = cursorPoint(evt); | ||
+ | |||
+ | linkinfo.setAttributeNS(null,"x",loc.x+5); | ||
+ | linkinfo.setAttributeNS(null,"y",loc.y+18); | ||
+ | linkinfo.firstChild.data = mouseovertext; | ||
+ | linkinfo.setAttributeNS(null,"visibility","visible"); | ||
+ | |||
+ | length = linkinfo.getComputedTextLength(); | ||
+ | linkinfo_bg.setAttributeNS(null,"width",length+6); | ||
+ | linkinfo_bg.setAttributeNS(null,"x",loc.x+2); | ||
+ | linkinfo_bg.setAttributeNS(null,"y",loc.y+8); | ||
+ | linkinfo_bg.setAttributeNS(null,"visibility","visibile"); | ||
+ | } | ||
+ | |||
+ | function HideLinkinfo(evt) | ||
+ | { | ||
+ | linkinfo.setAttributeNS(null,"visibility","hidden"); | ||
+ | linkinfo_bg.setAttributeNS(null,"visibility","hidden"); | ||
+ | } | ||
+ | |||
+ | ]]> | ||
+ | </script> | ||
<defs> | <defs> | ||
<style> | <style> | ||
Line 11: | Line 62: | ||
circle:hover { | circle:hover { | ||
opacity:0; | opacity:0; | ||
+ | } | ||
+ | |||
+ | .linkinfo{ | ||
+ | font-family: OpenSans, sans-serif; | ||
+ | font-size: 8px; | ||
+ | } | ||
+ | .teaminfo_bg{ | ||
+ | fill: white; | ||
+ | stroke: var(--bright-logo-blue); | ||
+ | stroke-width: 1; | ||
+ | opacity: 0.85; | ||
} | } | ||
</style> | </style> | ||
</defs> | </defs> | ||
− | |||
<text | <text | ||
style="font-weight:bold;font-stretch:normal;font-size:95px;line-height:1.25;font-family:'Orbitron';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.28015012" | style="font-weight:bold;font-stretch:normal;font-size:95px;line-height:1.25;font-family:'Orbitron';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.28015012" | ||
Line 73: | Line 134: | ||
</a> | </a> | ||
<a xlink:href="https://2017.igem.org/Team:TU_Dresden/About_Us"> | <a xlink:href="https://2017.igem.org/Team:TU_Dresden/About_Us"> | ||
− | <circle cx="1840" cy="750" r="90"/> | + | <circle cx="1840" cy="750" r="90" |
+ | onmousemove="ShowLinkinfo(evt, 'About Us')" | ||
+ | onmouseout="HideLinkinfo(evt)" | ||
+ | /> | ||
</a> | </a> | ||
+ | |||
+ | |||
+ | <rect class="linkinfo_bg" id="linkinfo_bg" | ||
+ | x="0" y="0" rx="4" ry="4" | ||
+ | width="55" height="14" visibility="hidden"/> | ||
+ | <text class="linkinfo" id="linkinfo" | ||
+ | x="0" y="0" visibility="hidden">Tooltip</text> | ||
</svg> | </svg> | ||
</div> | </div> |
Revision as of 16:47, 1 November 2017