Skip to content

Commit 4c8d45f

Browse files
Revert "Update html template"
This reverts commit 170b1f3.
1 parent 170b1f3 commit 4c8d45f

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

bridge/manifests/web/engine_template.html

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,101 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui, shrink-to-fit=no">
7+
<meta name="apple-mobile-web-app-capable" content="yes">
8+
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
9+
10+
<title>{{project.title}} {{project.version}}</title>
11+
<style type="text/css">
12+
/* Disable user selection to avoid strange bug in Chrome on Windows:
13+
* Selecting a text outside the canvas, then clicking+draging would
14+
* drag the selected text but block mouse down/up events to the engine.
15+
*/
16+
body {
17+
{{^DEFOLD_SCALE_MODE_IS_NO_SCALE}}
18+
position: fixed; /* Prevent overscroll */
19+
{{/DEFOLD_SCALE_MODE_IS_NO_SCALE}}
20+
margin:0;
21+
padding:0;
22+
}
23+
24+
.canvas-app-container {
25+
width: 100%;
26+
height: 100%;
27+
position: absolute;
28+
align-items: center;
29+
justify-content: center;
30+
overflow: hidden;
31+
}
32+
33+
.canvas-app-container:-webkit-full-screen {
34+
/* Auto width and height in Safari/Chrome fullscreen. */
35+
width: auto;
36+
height: auto;
37+
}
38+
39+
#canvas {
40+
outline: none;
41+
border: 0;
42+
width: 100%;
43+
vertical-align: bottom;
44+
}
45+
46+
#canvas-container {
47+
position: relative;
48+
}
49+
50+
canvas:focus, canvas:active {
51+
outline: none;
52+
border: 0;
53+
ie-dummy: expression(this.hideFocus=true);
54+
-moz-outline-style: none;
55+
}
56+
57+
body, div {
58+
-webkit-tap-highlight-color: rgba(0,0,0,0);
59+
-webkit-touch-callout: none;
60+
-webkit-user-select: none;
61+
-khtml-user-select: none;
62+
-moz-user-select: none;
63+
-ms-user-select: none;
64+
user-select: none;
65+
}
66+
67+
{{{DEFOLD_CUSTOM_CSS_INLINE}}}
68+
</style>
69+
</head>
370
<body>
71+
<div id="app-container" class="canvas-app-container">
72+
<div id="running-from-file-warning" style="display: none; margin: 3em;">
73+
<h1>Running from local file ⚠️</h1>
74+
<p>It seems like you have opened this file by double-clicking on it. In order to test your build in a browser <b>you need to load this file from a web server</b>. You can either upload this file and the rest of the files from a Defold HTML5 bundle to a web hosting service OR host them using a local web server on your home network.</p>
75+
<p><a href="https://defold.com/manuals/html5/#testing-html5-build" target="_blank">Learn more about running a local web server in the Defold HTML5 manual</a>.</p>
76+
</div>
77+
<div id="webgl-not-supported" style="display: none; margin: 3em;">
78+
<h1>WebGL not supported ⚠️</h1>
79+
<p>WebGL is not supported by your browser - visit <a href="https://get.webgl.org/">https://get.webgl.org/</a> to learn more.</p>
80+
</div>
81+
<div id="canvas-container" class="canvas-app-canvas-container">
82+
<canvas id="canvas" class="canvas-app-canvas" tabindex="1" width="{{display.width}}" height="{{display.height}}"></canvas>
83+
</div>
84+
<div class="buttons-background">
85+
{{#html5.show_fullscreen_button}}
86+
<div class="button" onclick="Module.toggleFullscreen();">Fullscreen</div>
87+
{{/html5.show_fullscreen_button}}
88+
{{#html5.show_made_with_defold}}
89+
<div class="link">Made with <a href="https://defold.com/" target="_blank">Defold</a></div>
90+
{{/html5.show_made_with_defold}}
91+
</div>
92+
</div>
93+
<!-- -->
94+
<script id="engine-loader" type="text/javascript" src="dmloader.js"></script>
95+
<script id="engine-setup" type="text/javascript">
96+
// From here you can configure game startup parameters via the CUSTOM_PARAMETERS object,
97+
// override ProgressView to create your own loader. See dmloader.js for more details.
98+
</script>
499
<script id="engine-start" type="text/javascript">
5100
var script = document.createElement("script");
6101
script.type = "text/javascript";

0 commit comments

Comments
 (0)