Skip to content

Commit ebd07b9

Browse files
committed
Add includes for bootstrap panels
Using it where possible. Some places (like the ssh tutorial) can't uses this because of issues with indenting.
1 parent fd2e821 commit ebd07b9

6 files changed

Lines changed: 43 additions & 36 deletions

File tree

‎_includes/begin-panel.html‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% comment %}
2+
3+
Used to begin a bootstrap panel.
4+
5+
Parameters:
6+
7+
type: Can be one of "success", "info", "warning" or "danger".
8+
heading: The heading text.
9+
10+
{% endcomment %}
11+
<div class="panel panel-{{ include.type }}">
12+
<div class="panel-heading">
13+
{% include icon.html %}{% comment %}
14+
Note: the `type` parameter is implicitly passed through to icon.html.{% endcomment %}
15+
{{ include.heading }}
16+
</div>
17+
<div class="panel-body" markdown="1">

‎_includes/end-panel.html‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% comment %}
2+
3+
Used to end a panel started with {% include begin-panel.html %}
4+
5+
{% endcomment %}
6+
</div>
7+
</div>

‎docs/getting-started.md‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,18 @@ data will be lost. Keep in mind, that it may take a much longer time from 8V to
184184
</div>
185185
</div>
186186

187-
<div class="panel panel-info">
188-
<div class="panel-heading">
189-
{% include icon.html type="info" %}
190-
Troubleshooting tips if your EV3 won't boot
191-
</div>
192-
<div class="panel-body" markdown="1">
187+
{% include begin-panel.html type="info" heading="Troubleshooting tips if your EV3 won't boot" %}
188+
193189
* Make sure nothing is plugged into the EV3 (USB/sensors/motors/etc.)
194190
* Try writing the image to the SD card again.
195191
* You may have a bad/incompatible SD card - try a different SD card.
196192
* Check the condition of the EV3 batteries.
197-
{% include end-section.html %}
193+
194+
{% include end-panel.html %}
198195

199196
{% include end-section.html %}
200197

198+
201199
{% include begin-section.html bg="dark" %}
202200

203201
## Step 5: Set up a network connection

‎docs/programming-languages.md‎

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,14 @@ Python [here](https://github.com/ev3dev/ev3devKit/tree/ev3dev-jessie/demo/python
105105

106106
# Out-of-date, abandoned and unfinished implementations
107107

108-
<div class="panel panel-danger">
109-
<div class="panel-heading">
110-
{% include icon.html type="danger" %}
111-
Listings below this point are for libraries that are not up-to-date, have
112-
been abandoned, or are unfinished.
113-
</div>
114-
<div class="panel-body">
115-
<p>
116-
Use them with caution, as some functionality will likely be broken. If you
117-
see a library below that you'd like to see in a better state, consider
118-
contributing to it to get it updated and ready to use.
119-
</p>
120-
</div>
121-
</div>
108+
{% include begin-panel.html type="danger"
109+
heading="Listings below this point are for libraries that are not up-to-date, have been abandoned, or are unfinished." %}
110+
111+
Use them with caution, as some functionality will likely be broken. If you
112+
see a library below that you'd like to see in a better state, consider
113+
contributing to it to get it updated and ready to use.
114+
115+
{% include end-panel.html %}
122116

123117
## C\#
124118
<https://github.com/pgrudzien12/ev3dev-lang-csharp>

‎docs/tutorials/using-docker-to-cross-compile.md‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@ Docker has excellent documentation, so we will just send you to their
3232
Docker installed for Windows, Mac or Linux.
3333
{: .well}
3434

35-
<div class="panel panel-info" markdown="1">
36-
{% include icon.html type="info" %}
37-
Linux
38-
{:.panel-heading}
35+
{% include begin-panel.html type="info" heading="Linux" %}
3936

40-
<div class="panel-body" markdown="1">
4137
Docker for Linux has quite a bit of information to read. This may help you sort
4238
through it. The most important parts are:
4339

@@ -47,9 +43,8 @@ through it. The most important parts are:
4743

4844
Also, you will need to install `qemu-user-static` on your host computer, otherwise
4945
you will get an error: `exec user process caused "exec format error"`.
50-
</div>
51-
</div>
5246

47+
{% include end-panel.html %}
5348

5449
## Download the ev3dev cross-compiler image
5550

‎support.md‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,8 @@ __Note:__ The [ev3dev-lang]{:target="_blank"} repository has its own
4949
If you don't find anything helpful by searching, then create a [new issue]{:target="_blank"}
5050
(only __one__ problem, question or suggestion per issue please).
5151

52-
<div class="panel panel-info">
53-
<div class="panel-heading">
54-
<h2 class="panel-title">Tips for Posting Issues</h2>
55-
</div>
56-
<div class="panel-body" markdown="1">
52+
{% include begin-panel.html type="info" heading="Tips for Posting Issues" %}
53+
5754
<strong>Most importantly for problems, we need to know the *exact* steps need to reproduce the
5855
issue. If you are writing a program, post the code. If you are following
5956
a tutorial, which step failed? Be as detailed as possible.</strong>
@@ -93,9 +90,8 @@ Some additional things to take into consideration:
9390
```
9491

9592
Learn more about [writing on GitHub]{:target="_blank"}.
96-
97-
</div>
98-
</div>
93+
94+
{% include end-panel.html %}
9995

10096
Gitter
10197
------

0 commit comments

Comments
 (0)