Skip to content

Instantly share code, notes, and snippets.

@gpassarelli
Last active December 1, 2017 14:54
Show Gist options
  • Save gpassarelli/0c361c4f6dc7495b8f297da7ecf6279f to your computer and use it in GitHub Desktop.
Save gpassarelli/0c361c4f6dc7495b8f297da7ecf6279f to your computer and use it in GitHub Desktop.
Best practices for DMI WL
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>White Label DMI</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Minimal CSS to make DMI White Label looks nice on desktop websites. We strongly reccomend to have a full width page for the WL -->
<style>
#dmiWhiteLabel{min-width: 1130px; width:100%; height: 900px;}
</style>
<!-- As this page will be hosted on a different domain than our WL, you should include this JS, so we can rezise the iframe height properly -->
<script src="http://wl.descubraomundo.com/build/js/iframeResizer.min.js"></script>
</head>
<body>
<!-- We recommend this properties for the iframe tag -->
<iframe id="dmiWhiteLabel" src="<<INSIRA A URL DO SEU WHITE LABEL AQUI>>" scrolling="no" frameborder=no framespacing=0 border=0></iframe>
<!-- This is where the magic for the crossdomain iframe communication happens. Keep as it is. -->
<script type="text/javascript">
var isOldIE = (navigator.userAgent.indexOf("MSIE") !== -1); // Detect IE10 and below
iFrameResize({checkOrigin: false, enablePublicMethods : true, inPageLinks : true, heightCalculationMethod: isOldIE ? 'max' : 'lowestElement',});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment