Someone asked this long time ago(https://moodle.org/mod/forum/discuss.php?d=327867):
"I'm using Moodle 3.0.2 version.I have HTML template, Is it possible to convert HTML Template to Moodle Theme? If yes, please guide me. Thanks in Advance"
Here is my current solution(hack) that may be of help to someone(I can not seem to reply in that post that is why I started this thread).
1. We will modify an existing theme(boost). So make sure it is selected. (go to theme selector, etc)
2. Copy your html template(mysite) into your moodle folder(eg C:\xampp\htdocs\moodle\mysite)
3. Now prepare your template for moodle integration by including the following code on each one them.
3.1 change all extension to php
3.2 include the following code in each of the files
<?php
require_once( dir( __FILE__ ) . '/../config.php');
echo $OUTPUT->header();
?>
<!-- site content starts here -->
<h2->welcome to foobar land!</h2->
<!-- site content ends here -->
<?php
echo $OUTPUT->footer();
?>
4. Go to C:\xampp\htdocs\moodle\theme\boost\config.php and find the line $THEME->editor_sheets = []; and change it to $THEME->editor_sheets = ['mystyle1', 'mystyle2']; then put all your style sheets(eg mystyle1.css and mystyle2.css) of your theme inside C:\xampp\htdocs\moodle\theme\boost\style
5. Next test your pages by going to address localhost/moodle/mysite/index.php. If it is working nicely as expected, now is time to integrate it to moodle.
6. We need to go to boost theme folder and change some templates. Go to C:\xampp\htdocs\moodle\theme\boost\templates and make a copy colums2.mustache and name the copy to frontpage.mustache(a basic familarity with mustache syntax will be of help here). Copy content from your index.php to that frontpage.mustache. '
7. Go to layout folder, make a copy of columns.php and name it frontpage.php. Go inside and change last line from 'echo $OUTPUT->render_from_template('theme_boost/columns2', $templatecontext);' to 'echo $OUTPUT->render_from_template('theme_boost/frontpage', $templatecontext);' .
8. Go to C:\xampp\htdocs\moodle\theme\boost\config.php and change line that reads
'frontpage' => array(
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
'options' => array('nonavbar' => true)
to
'frontpage' => array(
'file' => 'frontpage.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
'options' => array('nonavbar' => true)
9. Now go to C:\xampp\htdocs\moodle\theme\boost\templates and open columns2.mustache and modify the header to look like your template. Do the same with footer.mustache.
10. Your page front page should now look like this
and dashboard like this
Templates for changing login page can be found at C:\xampp\htdocs\moodle\theme\boost\templates\login.mustache and a system template (not recommended but theme template wasn't enough and I find overriding core_renderer a headache: must-ache is better, lol ) one at C:\xampp\htdocs\moodle\lib\templates\loginform.mustache