_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
- Table of Contents
collapsible-blocks.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
collapsible-blocks.html
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
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()
- Prints a line of
Text
, anImage
and aButton
with the text"erase"
to the screen. - Remove the three elements from the screen when the
"erase"
Button
is clicked. - Print a new
Button
that is waiting to be clicked to the screen.
Back to top
footer_custom.html
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
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
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
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
This is a note.
Back to top
label-recommended.html
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
It is recommended to…
Back to top
label.html
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
This is a label.
Back to top
nav.html
description
- Overrides the original Just the Docs
./_includes/nav.html
file: - Implements the custom navigation YAML tags.
- Adds a horizontal rule below the Announcements, Advanced Tutorial, and Commands pages.
toc-collapsible.html
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
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
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
Back to top
toc-same-page.html
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