⚠ This website is the beta version of the PCIbex documentation and is still under development. ⚠
Link Search Menu Expand Document

_includes/

Files that can be accessed by the include tag.


Folder structure

_includes/
|-- collapsible-block.html
|-- command-blurbs.html
|-- footer_custom.html
|-- head_custom.html
|-- include-example.html
|-- instructions.html
|-- label-note.html
|-- label-recommended.html
|-- label.html
|-- nav.html
|-- toc-collapsible.html
|-- toc-collection.html
|-- toc-element.html
`-- toc-same-page.html

Table of Contents


collapsible-blocks.html

description

Creates a expandable/collapsible block using the HTML tag <details> tag.

example

code


      
  {% capture content %}
  Surprise!
  {% endcapture %}
  {% include collapsible-block.html content=content
  summary="Click for more details" inner-border=true outer-border=true %}
  
    
  • Include inner-border=true argument to create a border inside the expanded block.
  • Include outer-border=true argument to create a border around the summary.
  • By default there are no borders.

result

Click for more details

Surprise!

Back to top


command-blurbs.html

description

Creates blurbs for a Collection or array of PennController commands. Ends with a Back to top link and a horizontal rule.

example

code


      
{% assign clear-command = site.special-commands | where_exp:"page", "page.title contains 'clear'" %}
{% include command-blurbs.html collection=clear-command %}

    

result

clear

syntax

clear()

description

Removes from the screen any element that was previously added during the trial.

example

click to expand
newText("helloworld", "Hello world!")
    .print()
,
newImage("smiley", "ya.png")
    .print()
,
newButton("erase", "Erase")
    .print()
    .wait()
,
clear()
,
newButton("void", "Enough with the emptiness")
    .print()
    .wait()
  1. Prints a line of Text, an Image and a Button with the text "erase" to the screen.
  2. Remove the three elements from the screen when the "erase" Button is clicked.
  3. Print a new Button that is waiting to be clicked to the screen.
↑ back to top

Back to top


Adds custom content to the original Just the Docs ./_layouts/default.html file.

As of October 27, 2020 footer_custom.html is the same as the original Just the Docs footer_custom.html file with the addition of the line <script src="/pcibex/assets/prism/prism.js"></script>, which is the source code for the Prism syntax highlighter.


head_custom.html

Adds custom content to the original Just the Docs ./_includes/head.html file.

As of September 3, 2020 head_custom.html only contains the line <link rel="stylesheet" href="/pcibex/assets/prism/prism.css">, which is used to style the Prism syntax highlighter.


include-example.html

Creates the description and example blocks used on this page. See the documentation for adding a new _includes file.


instructions.html

description

Creates a instructions block; used in the Basic Tutorial and Advanced Tutorial.

example

code


      
{% capture instructions %}
Click **main.js** to open `main.js` in the script editor:
```javascript
// This is the BasicTutorial experiment.
// Type code below this line.
```
{% endcapture %}
{% include instructions.html text=instructions %}

    

result

instructions

Click main.js to open main.js in the script editor:

// This is the BasicTutorial experiment.
// Type code below this line.

Back to top

label-note.html

description

Uses ./_includes/label.html as a base; creates a yellow label that says note.

example

code


      
{% capture label %}
This is a note.
{% endcapture %}
{% include label-note.html label-body=label %}

    

result

note

This is a note.

Back to top


label-recommended.html

description

Uses ./_includes/label.html as a base; creates a green label that says recommended.

example

code


      
{% capture label %}
It is recommended to...
{% endcapture %}
{% include label-recommended.html label-body=label %}

    

result

recommended

It is recommended to…

Back to top


label.html

description

Creates a label with some body text on a grey-lt-100 background.

example

code


      
{% capture label %}
This is a label.
{% endcapture %}
{% include label.html label-color="purple" label-title="new label"
label-body=label %}

    

result

new label

This is a label.

Back to top


description


toc-collapsible.html

description

Creates an expandable/collapsible Table of Contents for a Collection or array.

  • TOC entries are links to another page.

example

code


      
{% include toc-collapsible.html collection=site.special-commands
id=special-commands %}

    

result

Click to expand/collapse

Back to top


toc-collection.html

description

Creates a Table of Contents for a Collection or array.

  • TOC entries are links to another page.

example

code


      

{% include toc-collection.html collection=site.core-concepts ordered=true %}


    
  • TOC is an unordered list by default; include ordered=true argument for an ordered list.
  • TOC entries are text font by default; include code-font=true argument for code font.

result

Table of contents

Back to top


toc-element.html

description

Creates a right-floating Table of Contents for an element type’s element-specific commnds.

example

code


      
{% assign action-commands = site.action-commands | where_exp:"page", "page.title contains 'button'" %}
{% assign test-commands = site.test-commands | where_exp:"page", "page.title contains 'button'" %}
{% include toc-element.html actionCommands=action-commands
testCommands=test-commands %}

    

result

Action commands
Test commands

Back to top


toc-same-page.html

description

Creates a Table of Contents for a Collection or array.

  • TOC entries are links to sections on the same page.

example

code


      
{% include toc-same-page.html collection=site.special-commands code-font=true %}

    
  • TOC is an unordered list by default; include ordered=true argument for an ordered list.
  • TOC entries are text font by default; include code-font=true argument for code font.

result

Table of contents

Back to top