Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML5 template + nokiafc22 webfonts #1918

Merged
merged 3 commits into from
Aug 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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