Make DIV transparent when no window background is set

This commit is contained in:
Joshua Granick
2018-11-12 11:03:59 -08:00
parent 9302116537
commit 734ed288ab

View File

@@ -1,21 +1,21 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>::APP_TITLE::</title> <title>::APP_TITLE::</title>
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
::if favicons::::foreach (favicons):: ::if favicons::::foreach (favicons)::
<link rel="::__current__.rel::" type="::__current__.type::" href="::__current__.href::">::end::::end:: <link rel="::__current__.rel::" type="::__current__.type::" href="::__current__.href::">::end::::end::
::if linkedLibraries::::foreach (linkedLibraries):: ::if linkedLibraries::::foreach (linkedLibraries)::
<script type="text/javascript" src="::__current__::"></script>::end::::end:: <script type="text/javascript" src="::__current__::"></script>::end::::end::
<script type="text/javascript" src="./::APP_FILE::.js"></script> <script type="text/javascript" src="./::APP_FILE::.js"></script>
<script> <script>
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, { capture: false, passive: false }); window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, { capture: false, passive: false });
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) { if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
@@ -23,23 +23,23 @@
meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no'); meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
} }
</script> </script>
<style> <style>
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; } html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
#content { background: #000000; width: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_WIDTH::px::else::100%::end::; height: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_HEIGHT::px::else::100%::end::; } #content { ::if (WIN_BACKGROUND)::background: #000000; ::end::width: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_WIDTH::px::else::100%::end::; height: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_HEIGHT::px::else::100%::end::; }
::foreach assets::::if (type == "font")::::if (cssFontFace)::::cssFontFace::::end::::end::::end:: ::foreach assets::::if (type == "font")::::if (cssFontFace)::::cssFontFace::::end::::end::::end::
</style> </style>
</head> </head>
<body> <body>
::foreach assets::::if (type == "font"):: ::foreach assets::::if (type == "font")::
<span style="font-family: ::id::"> </span>::end::::end:: <span style="font-family: ::id::"> </span>::end::::end::
<div id="content"></div> <div id="content"></div>
<script type="text/javascript"> <script type="text/javascript">
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::); lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
</script> </script>
</body> </body>
</html> </html>