index.html.tmpl 1.8 KB
Newer Older
1 2 3
<!DOCTYPE html>
<html>
<head>
4 5 6 7 8 9 10
  <!--
    If you are serving your web app in a path other than the root, change the
    href value below to reflect the base path you are serving from.

    The path provided below has to start and end with a slash "/" in order for
    it to work correctly.

11
    For more details:
12
    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
13 14 15

    This is a placeholder for base href that will be replaced by the value of
    the `--base-href` argument provided to `flutter build`.
16
  -->
17
  <base href="$FLUTTER_BASE_HREF">
18

19
  <meta charset="UTF-8">
20 21 22 23 24
  <meta content="IE=Edge" http-equiv="X-UA-Compatible">
  <meta name="description" content="{{description}}">

  <!-- iOS meta tags & icons -->
  <meta name="apple-mobile-web-app-capable" content="yes">
25
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
26
  <meta name="apple-mobile-web-app-title" content="{{projectName}}">
27
  <link rel="apple-touch-icon" href="icons/Icon-192.png">
28

29 30 31
  <!-- Favicon -->
  <link rel="icon" type="image/png" href="favicon.png"/>

32
  <title>{{projectName}}</title>
33
  <link rel="manifest" href="manifest.json">
34 35 36 37 38 39 40

  <script>
    // The value below is injected by flutter build, do not touch.
    var serviceWorkerVersion = null;
  </script>
  <!-- This script adds the flutter initialization JS code -->
  <script src="flutter.js" defer></script>
41 42
</head>
<body>
43
  <script>
44 45 46 47 48
    window.addEventListener('load', function(ev) {
      // Download main.dart.js
      _flutter.loader.loadEntrypoint({
        serviceWorker: {
          serviceWorkerVersion: serviceWorkerVersion,
49 50 51 52 53
        },
        onEntrypointLoaded: function(engineInitializer) {
          engineInitializer.initializeEngine().then(function(appRunner) {
            appRunner.runApp();
          });
54
        }
55
      });
56
    });
57
  </script>
58 59
</body>
</html>