Fixed machine includes

This commit is contained in:
Jeff Parsons 2015-12-08 23:20:03 -08:00
commit d6bc490fe6
6 changed files with 32 additions and 10 deletions

View file

@ -3,6 +3,13 @@ layout: page
title: PCjs
permalink: /
developer: false
machines:
- type: pc
id: ibm5150
config: /devices/pc/machine/5150/mda/64kb/machine.xml
- type: c1p
id: demoC1P
config: /devices/c1p/machine/8kb/large/machine.xml
---
Welcome to [PCjs](/docs/about/pcjs/), the first IBM PC simulation to run in your web browser without any plugins.
@ -16,7 +23,7 @@ All the simulations are written entirely in JavaScript. No Flash, Java or other
Supported browsers include modern versions of Chrome, Safari, Firefox, Internet Explorer (v9.0 and up), Edge,
and assorted mobile browsers.
[Embedded IBM PC](/devices/pc/machine/5150/mda/64kb/ "PCjs:ibm5150")
{% include machine.html id="ibm5150" %}
The [simulation](/devices/pc/machine/5150/mda/64kb/) above features an Intel 8088 running at 4.77Mhz,
with 64Kb of RAM and an IBM Monochrome Display Adapter. For more control, there are also
@ -52,7 +59,7 @@ Below is the [OSI Challenger C1P](/docs/c1pjs/), another simulation in the JavaS
It simulates Ohio Scientific's 6502-based microcomputer, released in 1978. More details about this simulation
and the original machine are available in the [C1Pjs Documentation](/docs/c1pjs/).
[Embedded OSI Challenger C1P](/devices/c1p/machine/8kb/large/ "C1Pjs:demoC1P")
{% include machine.html id="demoC1P" %}
{% if page.developer %}

View file

@ -17,4 +17,6 @@ kramdown:
input: GFM
hard_wrap: false
# Custom site settings
pcjs_sitename: pcjs.net
pcjs_version: 1.20.1

View file

@ -2,8 +2,6 @@
<div class="wrapper">
<h2 class="footer-heading">{{ site.title }}</h2>
<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<ul class="contact-list">
@ -46,7 +44,10 @@
</div>
<div class="footer-col footer-col-3">
<p class="text">{{ site.description }}</p>
<p class="text">
<span style="float:right"><a href="http://pcjs.net">pcjs.net</a> website © 2012-2015 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
<span style="float:right">PCjs and C1Pjs released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
</p>
</div>
</div>

View file

@ -18,7 +18,5 @@
<link rel="apple-touch-icon" href="{{ site.baseurl }}/versions/icons/current/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="{{ site.baseurl }}/versions/icons/current/pc-icon-192.png">
<link rel="shortcut icon" type="image/x-icon" href="{{ site.baseurl }}/versions/icons/current/favicon.ico">
{% if page.machines %}
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/versions/pcjs/{{ site.pcjs_version }}/components.css">
{% endif %}
{% include machine-styles.html %}
</head>

View file

@ -1,4 +1,11 @@
{% for machine in page.machines %}
<script type="text/javascript" src="/versions/{{ machine.type }}js/{{ site.pcjs_version }}/{{ machine.type }}.js"></script>
<script type="text/javascript">window.embed{{ machine.type | upcase }}("{{ machine.id }}","machine.xml","/versions/{{ machine.type }}js/{{ site.pcjs_version }}/components.xsl");</script>
{% capture machine_embed %}window.embed{{ machine.type | upcase }}{% endcapture %}
{% if machine.config %}{% capture machine_config %}{{ machine.config }}{% endcapture %}{% else %}{% assign machine_config = "machine.xml" %}{% endif %}
{% capture machine_template %}{{ site.baseurl }}/versions/{{ machine.type }}js/{{ site.pcjs_version }}/components.xsl{% endcapture %}
{% capture machine_script %}/{{ machine.type }}.js{% endcapture %}
{% unless machine_scripts contains machine_script %}
<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine.type }}js/{{ site.pcjs_version }}{{ machine_script }}"></script>
{% endunless %}
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
<script type="text/javascript">{{ machine_embed }}("{{ machine.id }}","{{ machine_config }}","{{ machine_template }}");</script>
{% endfor %}

View file

@ -0,0 +1,7 @@
{% for machine in page.machines %}
{% capture machine_style %}{{ site.baseurl }}/versions/{{ machine.type }}js/{{ site.pcjs_version }}/components.css{% endcapture %}
{% unless machine_styles contains machine_style %}
<link rel="stylesheet" type="text/css" href="{{ machine_style }}">
{% endunless %}
{% capture machine_styles %}{{ machine_styles }}{{ machine_style }}{% endcapture %}
{% endfor %}