Mark can you ...

Monkey Archive Forums/Monkey Discussion/Mark can you ...

Paul - Taiphoz(Posted 2013) [#1]
At the moment the monkeygame.html data is populated and built from for example html5.monkey and trans.

I was wondering if you could move to a more user friendly solution and have a template system used where by you would have a template.html file and within that tags to specify where the given data would be inserted.

At the moment you build something like
<head>
<style type="text/css">
body{
	height: 100%;
	overflow: hidden; /* keeps scrollbar off IE */
	font-family: arial,sans-serif;
	font-size: 13px;
	color: #000;
	background-color: #fff;
	padding:0px;
	margin:0px;
}
canvas:focus{
	outline:none;
}

</style>
</head>


but instead we could have something like
<head>
{style}
</head>


And you would then just load the template, parse over it, find the appropriate tags and replace in this case {style} with all the style data.

I know I can hack the source and do this myself, I just would rather not mess with the core source files , would be nice if this was officially implemented.

just a thought.


Raz(Posted 2013) [#2]
someone mentioned before that it'd be great if you could have some sort of projectname.template directory (with target sub directories) where you could store an app specific copy of the various files (e.g. monkeygame.html)

If trans finds the required files in this directory it uses them, else it defaults to the standard ones.

I'd quite like that