Skip to content

Commit

Permalink
HTML5 template + nokiafc22 webfonts (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 authored Aug 24, 2016
1 parent 61f708a commit dd34876
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 0 deletions.
108 changes: 108 additions & 0 deletions assets/fonts/nokiafc22.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fonts/nokiafc22.woff
Binary file not shown.
52 changes: 52 additions & 0 deletions assets/templates/html5/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<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 name="apple-mobile-web-app-capable" content="yes">

::if linkedLibraries::::foreach (linkedLibraries)::
<script type="text/javascript" src="::__current__::"></script>::end::::end::
<script type="text/javascript" src="./::APP_FILE::.js"></script>

<script>
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, false);
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
var meta = document.getElementById ("viewport");
meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
}
</script>

<style>
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: black; }
#openfl-content { margin: 0 auto; 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")::
@font-face {
font-family: '::fontName::';
src: url('::targetPath::.eot');
src: url('::targetPath::.eot?#iefix') format('embedded-opentype'),
url('::targetPath::.svg#my-font-family') format('svg'),
url('::targetPath::.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}::end::::end::
</style>

</head>
<body>

<noscript>This webpage makes extensive use of JavaScript. Please enable JavaScript in your web browser to view this page.</noscript>

<div id="openfl-content"></div>

<script type="text/javascript">
lime.embed ("openfl-content", ::WIN_WIDTH::, ::WIN_HEIGHT::, "::WIN_FLASHBACKGROUND::");
</script>

</body>
</html>
2 changes: 2 additions & 0 deletions include.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<haxedef name="HXCPP_QUIET" />
<haxeflag name="--macro" value="flixel.system.macros.FlxDefines.run()" />

<template path="assets/templates/html5/index.html" rename="index.html" />

<section if="setup">
<haxelib name="hscript" />
<haxelib name="systools" />
Expand Down

0 comments on commit dd34876

Please sign in to comment.