First step moving toward a shared component template and stylesheet across multiple machines
This commit is contained in:
parent
060c6b36d1
commit
f390bdb76b
7 changed files with 12 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -18,6 +18,7 @@ node_modules
|
||||||
archive/
|
archive/
|
||||||
c64/
|
c64/
|
||||||
ecp/
|
ecp/
|
||||||
|
projects/
|
||||||
private/
|
private/
|
||||||
src/
|
src/
|
||||||
tmp/
|
tmp/
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ module.exports = function(grunt) {
|
||||||
"pcjs": {
|
"pcjs": {
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
cwd: "modules/pcjs/templates/",
|
cwd: "modules/shared/templates/",
|
||||||
src: ["components.*"],
|
src: ["components.*"],
|
||||||
dest: "versions/pcjs/<%= pkg.version %>/",
|
dest: "versions/pcjs/<%= pkg.version %>/",
|
||||||
expand: true
|
expand: true
|
||||||
|
|
|
||||||
|
|
@ -1205,7 +1205,11 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
||||||
*/
|
*/
|
||||||
if (!sMachineXSLFile || sMachineXSLFile.indexOf("components.xsl") >= 0) {
|
if (!sMachineXSLFile || sMachineXSLFile.indexOf("components.xsl") >= 0) {
|
||||||
if (this.fDebug) {
|
if (this.fDebug) {
|
||||||
sMachineXSLFile = "/modules/" + sMachineClass + "js/templates/components.xsl";
|
if (sMachineClass == "c1p") {
|
||||||
|
sMachineXSLFile = "/modules/c1pjs/templates/components.xsl";
|
||||||
|
} else {
|
||||||
|
sMachineXSLFile = "/modules/shared/templates/components.xsl";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
PCjs Templates
|
|
||||||
===
|
|
||||||
Template folders contain a variety of XML and HTML templates and supporting files, including:
|
|
||||||
|
|
||||||
- DTD files (Document Type Definitions)
|
|
||||||
- XSD files (XML schemas -- eventually)
|
|
||||||
- XSL files (XML stylesheets)
|
|
||||||
- CSS files (stylesheets that the XSL files rely upon)
|
|
||||||
- HTML files (HTML fragments used to generate part or all of a web page)
|
|
||||||
|
|
||||||
[*components.xsl*](components.xsl) transforms all the elements of a machine XML file into an HTML fragment
|
|
||||||
that includes a series of **DIV** tags with corresponding *id* and *data-value* attributes that allow our
|
|
||||||
JavaScript components to bind themselves to visual elements (eg, virtual screen, virtual keyboard, control
|
|
||||||
panel) on a web page.
|
|
||||||
|
|
@ -15,6 +15,11 @@ or none of the above.
|
||||||
[*common.xsl*](common.xsl) is a collection of XSL templates used by *machine.xsl* (and deprecated *outline.xsl*)
|
[*common.xsl*](common.xsl) is a collection of XSL templates used by *machine.xsl* (and deprecated *outline.xsl*)
|
||||||
files.
|
files.
|
||||||
|
|
||||||
|
[*components.xsl*](components.xsl) transforms all the elements of a machine XML file into an HTML fragment
|
||||||
|
that includes a series of **DIV** tags with corresponding *id* and *data-value* attributes that allow our
|
||||||
|
JavaScript components to bind themselves to visual elements (eg, virtual screen, virtual keyboard, control
|
||||||
|
panel) on a web page.
|
||||||
|
|
||||||
[*machine.xsl*](machine.xsl) is an XML stylesheet that takes things a step further and transforms a machine XML
|
[*machine.xsl*](machine.xsl) is an XML stylesheet that takes things a step further and transforms a machine XML
|
||||||
into a stand-alone HTML document, which also includes all necessary compiled scripts (eg, c1p.js, c1p-dbg.js,
|
into a stand-alone HTML document, which also includes all necessary compiled scripts (eg, c1p.js, c1p-dbg.js,
|
||||||
pc.js or pc-dbg.js). Most machine XML files explicitly link to this stylesheet, so that simply loading the XML
|
pc.js or pc-dbg.js). Most machine XML files explicitly link to this stylesheet, so that simply loading the XML
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue