123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <!DOCTYPE html>
- <!--
- * Copyright (c) 2021, 2024, 5 Mode and other contributors
- * Released under the MIT license
- *
- * This file is part of SqueeJS.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
- * and associated documentation files (the "Software"), to deal in the Software
- * without restriction, including without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all copies or
- * substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * banner.html
- *
- * SqueeJS Doc and examples for the Banner functionalities.
- *
- * @author Daniele Bonini <my25mb@aol.com>
- * @copyrights (c) 2016, 2024, 5 Mode
- * @license https://opensource.org/licenses/BSD-3-Clause
- * -->
- <html>
- <head>
-
- <title>Banners: doc and examples.</title>
-
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <link rel="shortcut icon" href="favicon.ico" />
-
- <meta name="description" content="Welcome to Squeejs! Let everyone squeez its javascript code."/>
- <meta name="author" content="5 Mode"/>
- <meta name="robots" content="index,follow"/>
- <meta name="keywords" content="Squeejs,javascript,framework,squeejs.com,MIT,license,5 Mode"/>
-
- <script src="/js/common.js" type="text/javascript"></script>
- <script src="/js/squeejs.js?r=3445566" type="text/javascript"></script>
-
- <link href="/css/style.css?v=1631827555" type="text/css" rel="stylesheet">
- <link href="/css/squeejs.css?v=1631827556" type="text/css" rel="stylesheet">
- </head>
- <body style="border:0px solid lightgray; padding:20px; margin-right:20px;">
- <div id="content" style="max-width:2400px;">
-
- <a href="/"><img src="/res/logo.png" style="width:300px;background:#FFFFFF;border:1px solid gray;"></a><br>
- <br><br><br>
- <h2>BANNERS</h2>
- Here the Javascript code available to be inserted in your web page to implement <i>banners</i>.<br>
- <br>
- Please check the <b>context</b> of implementation for each of the functions.<br>
- <br><br>
- <h2>Code:</h2>
- <pre>
- /**
- * SQJS.createBanner
- *
- * Create a new Banner
- *
- * Context:
- * - Call in the body of your webpage
- *
- * @param {string} img, the banner img (471px width)
- * @param {string} url, the banner target url
- * @param {string} align, the banner horizontal alignment [left|middle|right]
- * @param {string} display, the banner display [fixed|absolute|relative|none]
- * @param {int} minScreenWidth, min screen width to display the banner
- * @returns {string} the id of the resulting banner
- *
- * This function is part of SqueeJS.
- */
- <b>function SQJS.createBanner(img, url, align, display, minScreenWidth){};</b>
- </pre>
- <br><br>
- <h2>Usage example:</h2>
-
- <pre style="background:lightyellow;width:100%;white-space: pre-wrap;">
- <script>
- var myNewBanner1 = SQJS.createBanner("/res/banner1.png","http://squeejs.com","left","relative", 500);
- </script>
- </pre>
- <br><br>
- <h2>How it looks like:</h2>
- <script>
- var myNewBanner1 = SQJS.createBanner("/res/banner1.png","http://squeejs.com","left","relative", 600);
- </script>
- <div style="clear:both; margin:auto;">
- <br><br><br><br><br><br><br><br><br>
- </div>
- <div class="footer" style="float:right">
- <div id="footerCont"> </div>
- <div id="footer"><span style="background:#FFFFFF;color:black;opacity:1.0;margin-right:10px;"> <a href="https://5mode.com/dd.html">Disclaimer</a> A <a href="http://5mode.com">5 Mode</a> project and <a href="http://demo.5mode.com">WYSIWYG</a> system. MIT License.</span></div>
- </div>
- </div>
- <script>
-
- function setFooterPos() {
- if (document.getElementById("footerCont")) {
- tollerance = 12;
- footerContHeight = 35;
- footerHeight = 32;
- document.getElementById("footerCont").style.top = parseInt( getDocHeight2() - footerContHeight - tollerance ) + "px";
- document.getElementById("footer").style.top = parseInt( getDocHeight2() - footerHeight - tollerance) + "px";
- }
- }
- setFooterPos();
- </script>
- <!-- Yandex.Metrika counter -->
- <script type="text/javascript" >
- (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
- m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
- (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
- ym(90317440, "init", {
- clickmap:true,
- trackLinks:true,
- accurateTrackBounce:true
- });
- </script>
- <noscript><div><img src="https://mc.yandex.ru/watch/90317440" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
- <!-- /Yandex.Metrika counter -->
- </body>
- </html>
|