Added more demos and support for mixed-case properties (including a new 'debugger' property in Markdown files)
This commit is contained in:
parent
ef480867e9
commit
7ca64fcea5
162 changed files with 84341 additions and 345 deletions
|
|
@ -4,7 +4,8 @@ in the Front Matter of Markdown files, for compatibility with the Jekyll web ser
|
|||
|
||||
'id' (eg, "ibm5150")
|
||||
'name' (eg, "IBM PC (Model 5150) with Monochrome Display")
|
||||
'type' (eg, "pc" or "pc-dbg")
|
||||
'type' (eg, "pc" or "c1p")
|
||||
'debugger' (eg, true)
|
||||
'config' (eg, "machine.xml")
|
||||
'template' (eg, "machine.xsl")
|
||||
'uncompiled' (eg, true)
|
||||
|
|
@ -12,8 +13,8 @@ in the Front Matter of Markdown files, for compatibility with the Jekyll web ser
|
|||
|
||||
And the following properties (along with any property not listed above) will be added to the 'parms' property:
|
||||
|
||||
'autopower' (eg, "true")
|
||||
'automount' (eg, {"A":{"name":"OS/2 FOOTBALL Boot Disk (v7.68.17)","path":"/disks/pc/os2/misc/football/debugger/FOOTBALL-7.68.17.json"}})
|
||||
'autoPower' (eg, "true")
|
||||
'autoMount' (eg, {"A":{"name":"OS/2 FOOTBALL Boot Disk (v7.68.17)","path":"/disks/pc/os2/misc/football/debugger/FOOTBALL-7.68.17.json"}})
|
||||
'state' (eg, "state.json")
|
||||
'messages' (eg, "disk")
|
||||
|
||||
|
|
@ -22,11 +23,24 @@ here and in markout.js. Examples include 'autopower' ('autoPower') and 'automou
|
|||
|
||||
{% endcomment %}
|
||||
{% for machine in page.machines %}
|
||||
{% capture machine_embed %}embed{{ machine.type | remove:'-dbg' | upcase }}{% endcapture %}
|
||||
{% if machine.autopower == nil %}
|
||||
{% assign machine_autopower = "true" %}
|
||||
{% capture machine_type %}{{ machine.type | remove:'-dbg' }}{% endcapture %}
|
||||
{% if machine.debugger %}
|
||||
{% capture machine_file %}{{ machine_type }}-dbg{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_autopower %}{{ machine.autopower }}{% endcapture %}
|
||||
{% capture machine_file %}{{ machine.type }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% capture machine_embed %}embed{{ machine_type | upcase }}{% endcapture %}
|
||||
{% if machine.automount != nil %}
|
||||
{% capture machine_autoMount %}{{ machine.automount|jsonify }}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_autoMount %}{{ machine.autoMount|jsonify }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% if machine.autopower != nil %}
|
||||
{% capture machine_autoPower %}{{ machine.autopower }}{% endcapture %}
|
||||
{% elsif machine.autoPower != nil %}
|
||||
{% capture machine_autoPower %}{{ machine.autoPower }}{% endcapture %}
|
||||
{% else %}
|
||||
{% assign machine_autoPower = "true" %}
|
||||
{% endif %}
|
||||
{% unless machine.config %}
|
||||
{% assign machine_config = "machine.xml" %}
|
||||
|
|
@ -38,19 +52,19 @@ here and in markout.js. Examples include 'autopower' ('autoPower') and 'automou
|
|||
{% else %}
|
||||
{% assign machine_template = machine.template %}
|
||||
{% endunless %}
|
||||
{% capture machine_parms %}{{ site.left_brace }}autoPower:{{ machine_autopower }},state:"{{ machine.state }}",autoMount:{{ machine.automount|jsonify }},messages:"{{ machine.messages }}"{{ site.right_brace }}{% endcapture %}
|
||||
{% capture machine_parms %}{{ site.left_brace }}autoPower:{{ machine_autoPower }},state:"{{ machine.state }}",autoMount:{{ machine_autoMount }},messages:"{{ machine.messages }}"{{ 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.type | remove:'-dbg' }}js/{{ site.pcjs.version }}/{{ machine.type }}.js"></script>{% endcapture %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine_type }}js/{{ site.pcjs.version }}/{{ machine_file }}.js"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
{{ machine_script }}
|
||||
{% endunless %}
|
||||
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
|
||||
{% if machine_template == '' %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/versions/{{ machine.type | remove:'-dbg' }}js/{{ site.pcjs.version }}/components.xsl{% endcapture %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/versions/{{ machine_type }}js/{{ site.pcjs.version }}/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if machine.type == "pc" or machine.type == "pc-dbg" %}{% assign array_scripts = site.pcjs.pc_scripts %}{% endif %}
|
||||
{% if machine.type == "c1p" or machine.type == "c1p-dbg" %}{% assign array_scripts = site.pcjs.c1p_scripts %}{% endif %}
|
||||
{% if machine_type == "pc" %}{% assign array_scripts = site.pcjs.pc_scripts %}{% endif %}
|
||||
{% if machine_type == "c1p" %}{% assign array_scripts = site.pcjs.c1p_scripts %}{% endif %}
|
||||
{% for script in array_scripts %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}{{ script }}"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
|
|
@ -59,7 +73,7 @@ here and in markout.js. Examples include 'autopower' ('autoPower') and 'automou
|
|||
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
|
||||
{% endfor %}
|
||||
{% if machine_template == '' %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine.type | remove:'-dbg' }}js/templates/components.xsl{% endcapture %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine_type }}js/templates/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<script type="text/javascript">{{ machine_embed }}('{{ machine.id }}','{{ machine_config }}','{{ machine_template }}','{{ machine_parms }}');</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue