discourse-legacysite-perl/site/articles/local/include_ad.html
2024-06-17 22:24:05 +10:00

29 lines
1.2 KiB
HTML

<%~if adsize eq '300x600'%>
<div class="ad">
<script type="text/javascript">
if (winWidth > 1024) { document.write('<div class="adwrapper">' + "<%escape_js ad_300x600%>" + '</div>'); }
else { document.write('<div class="adwrapper">' + "<%escape_js ad_300x250_1%>" + '</div>'); }
</script>
</div>
<%~elsif adsize eq '970x250'%>
<div class="ad">
<script type="text/javascript">
if (winWidth > 1024) { document.write('<div class="adwrapper">' + "<%escape_js ad_970x250%>" + '</div>'); } else { document.write('<div class="adwrapper">' + "<%escape_js ad_300x250_1%>" + '</div>'); }
</script>
</div>
<%~elsif adsize eq '728x90' and $ad_728x90%>
<div class="ad">
<script type="text/javascript">
if (winWidth >= 767) { document.write('<div class="adwrapper">' + "<%escape_js ad_728x90%>" + '</div>'); }
</script>
</div>
<%~elsif adsize eq '300x250_1'%>
<script type="text/javascript">
document.write('<div class="adwrapper">' + "<%escape_js ad_300x250_1%>" + '</div>');
</script>
<%~elsif adsize eq '300x250'%>
<script type="text/javascript">
document.write('<div class="adwrapper">' + "<%escape_js ad_300x250%>" + '</div>');
</script>
<%~endif%>