Working through Jekyll build issues with uncompiled ES6 code
This commit is contained in:
parent
a927d9ca4f
commit
61e44fbf1f
52 changed files with 385 additions and 285 deletions
|
|
@ -26,7 +26,7 @@ The following optional machine properties will be added to the 'parms' property:
|
|||
'drives' (eg, '[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]')
|
||||
'state' (eg, "state.json")
|
||||
'messages' (eg, "fault")
|
||||
'connection' (eg, "serialPort=vt100a.serialPort")
|
||||
'connection' (eg, "serialPort->vt100a.serialPort")
|
||||
|
||||
Finally, all our JavaScript components expect multi-word property names to use camelCase, so we automatically convert
|
||||
any lower-case forms to camelCase, both here and in markout.js and components.xsl, in case we've gotten sloppy in any
|
||||
|
|
@ -102,7 +102,8 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% endunless %}
|
||||
{% capture machine_parms %}{{ site.left_brace }}autoMount:{{ machine_autoMount }}{{ machine_autoPower }}{{ machine_autoStart }}{{ machine_drives }},state:"{{ machine.state }}",messages:"{{ machine.messages }}",connection:"{{ machine.connection }}"{{ site.right_brace }}{% endcapture %}
|
||||
{% if site.pcjs.compiled == true and machine.uncompiled != true %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine_app }}/{{ site.pcjs.version }}/{{ machine_file }}.js"></script>{% endcapture %}
|
||||
{% capture machine_script %}<!--suppress BadExpressionStatementJS -->
|
||||
<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine_app }}/{{ site.pcjs.version }}/{{ machine_file }}.js"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
{{ machine_script }}
|
||||
{% endunless %}
|
||||
|
|
@ -143,6 +144,37 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
<script type="text/javascript">{{ machine_embed }}('{{ machine.id }}','{{ machine_config }}','{{ machine_template }}','{{ machine_parms }}');</script>
|
||||
{% if machine.cling == "top" }
|
||||
<script type="text/javascript">
|
||||
var startMachinePos=-1;
|
||||
window.onscroll=function(){
|
||||
var machine = document.getElementById('{{ machine.id }}');
|
||||
if (startMachinePos < 0) {
|
||||
startMachinePos = findTop(machine);
|
||||
}
|
||||
if (window.pageYOffset > startMachinePos) {
|
||||
machine.style.position = 'fixed';
|
||||
machine.style.top = 0;
|
||||
} else {
|
||||
machine.style.position = 'relative';
|
||||
}
|
||||
};
|
||||
function findTop(obj) {
|
||||
var curTop = 0;
|
||||
if (typeof (obj.offsetParent) != 'undefined' && obj.offsetParent) {
|
||||
while (obj.offsetParent) {
|
||||
curTop += obj.offsetTop;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
curTop += obj.offsetTop;
|
||||
}
|
||||
else if (obj.y) {
|
||||
curTop += obj.y;
|
||||
}
|
||||
return curTop;
|
||||
}
|
||||
</script>
|
||||
{% endif }
|
||||
{% if page.build %}
|
||||
<script type="text/javascript" src="{{ site.baseurl }}/modules/build/lib/build.js"></script>
|
||||
<script type="text/javascript">buildPC("{{ page.build }}");</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue