uwp html5 vs template progress

This commit is contained in:
jared gholston
2017-08-23 15:20:52 -07:00
committed by Joshua Granick
parent 890b9cb527
commit 0bcd26099e
10 changed files with 96147 additions and 78 deletions

View File

@@ -1,55 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>::APP_TITLE:: FOR UWP</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 favicons::::foreach (favicons)::
<link rel="::__current__.rel::" type="::__current__.type::" href="::__current__.href::">::end::::end::
::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; }
#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::; }
::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::.woff') format('woff'),
url('::targetPath::.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}::end::::end::
</style>
</head>
<body>
::foreach assets::::if (type == "font")::
<span style="font-family: ::id::"> </span>::end::::end::
<div id="content"></div>
<script type="text/javascript">
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
</script>
</body>
</html>

View File

@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<title>::APP_TITLE::</title>
<title>::APP_TITLE:: - ::guid::</title>
<link href="css/default.css" rel="stylesheet" />
<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">
@@ -11,7 +11,9 @@
::if linkedLibraries::::foreach (linkedLibraries)::
<script type="text/javascript" src="::__current__::"></script>::end::::end::
<script type="text/javascript" src="./::APP_FILE::.js"></script>
<script type="text/javascript" src="./js/::APP_FILE::.js"></script>
<script src="lib/winjs-4.0.1/js/base.js"></script>
<script src="lib/winjs-4.0.1/js/ui.js"></script>
<script>
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, false);
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
@@ -38,7 +40,6 @@
</head>
<body>
<div>Content goes here!</div>
<script src="js/main.js"></script>
::foreach assets::::if (type == "font")::
@@ -46,8 +47,6 @@
<div id="content"></div>
<script type="text/javascript">
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
</script>
</body>
</html>

View File

@@ -1,2 +1,63 @@
// Your code here!
console.log('just a dumb test');
// For an introduction to the Blank template, see the following documentation:
// https://go.microsoft.com/fwlink/?LinkId=232509
(function () {
"use strict";
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
var isFirstActivation = true;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.voiceCommand) {
// TODO: Handle relevant ActivationKinds. For example, if your app can be started by voice commands,
// this is a good place to decide whether to populate an input field or choose a different initial view.
}
else if (args.detail.kind === activation.ActivationKind.launch) {
// A Launch activation happens when the user launches your app via the tile
// or invokes a toast notification by clicking or tapping on the body.
if (args.detail.arguments) {
// TODO: If the app supports toasts, use this value from the toast payload to determine where in the app
// to take the user in response to them invoking a toast notification.
}
else if (args.detail.previousExecutionState === activation.ApplicationExecutionState.terminated) {
// TODO: This application had been suspended and was then terminated to reclaim memory.
// To create a smooth user experience, restore application state here so that it looks like the app never stopped running.
// Note: You may want to record the time when the app was last suspended and only restore state if they've returned after a short period.
}
}
if (!args.detail.prelaunchActivated) {
// TODO: If prelaunchActivated were true, it would mean the app was prelaunched in the background as an optimization.
// In that case it would be suspended shortly thereafter.
// Any long-running operations (like expensive network or disk I/O) or changes to user state which occur at launch
// should be done here (to avoid doing them in the prelaunch case).
// Alternatively, this work can be done in a resume or visibilitychanged handler.
}
if (isFirstActivation) {
// TODO: The app was activated and had not been running. Do general startup initialization here.
Debug.writeln("app.onactivated isFirstActivation");
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
document.addEventListener("visibilitychange", onVisibilityChanged);
args.setPromise(WinJS.UI.processAll());
}
isFirstActivation = false;
};
function onVisibilityChanged(args) {
if (!document.hidden) {
// TODO: The app just became visible. This may be a good time to refresh the view.
}
}
app.oncheckpoint = function (args) {
// TODO: This application is about to be suspended. Save any state that needs to persist across suspensions here.
// You might use the WinJS.Application.sessionState object, which is automatically saved and restored across suspension.
// If you need to complete an asynchronous operation before your application is suspended, call args.setPromise().
};
app.start();
})();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -52,15 +52,19 @@
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>$(VersionNumberMajor).$(VersionNumberMinor)</MinimumVisualStudioVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>uwp-project_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="index.html" />
<Content Include="images\**\*.*" />
<Content Include="js\**\*.*" />
<Content Include="fonts\**\*.*" />
<Content Include="sounds\**\*.*" />
<Content Include="images\LockScreenLogo.scale-200.png" />
<Content Include="images\SplashScreen.scale-200.png" />
<Content Include="images\Square150x150Logo.scale-200.png" />
@@ -70,18 +74,27 @@
<Content Include="images\Wide310x150Logo.scale-200.png" />
<Content Include="js\main.js" />
<Content Include="css\default.css" />
<Content Include="lib\winjs-4.0.1\js\base.js" />
<Content Include="lib\winjs-4.0.1\js\ui.js" />
<Content Include="lib\winjs-4.0.1\css\ui-light.css" />
<Content Include="lib\winjs-4.0.1\css\ui-dark.css" />
<Content Include="lib\winjs-4.0.1\fonts\Symbols.ttf" />
<None Include="uwp-project_TemporaryKey.pfx" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<Target Name="HelloWorld">
<Message Text="Hello"></Message> <Message Text="World"></Message>
</Target>
<!-- To modify your build process, add your task inside one of the targets below then uncomment
that target and the DisableFastUpToDateCheck PropertyGroup.
that target and the DisableFastUpToDateCheck PropertyGroup.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>