Skip to content

Commit 942844d

Browse files
authored
"Prettify" breadcrumbs and improve misc formatting (ev3dev#322)
1 parent 9a046ce commit 942844d

File tree

9 files changed

+95
-49
lines changed

9 files changed

+95
-49
lines changed

_data/breadcrumbs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
docs:
2+
name: "Documentation"
3+
devtools:
4+
name: Developer Tools
5+
drivers:
6+
name: Kernel Drivers
7+
kernel-hackers-notebook:
8+
name: Kernel Hacker's Notebook
9+
motors:
10+
name: Motors
11+
ports:
12+
name: Input and Output Ports
13+
sensors:
14+
name: Sensors
15+
tutorials:
16+
name: Tutorials

_includes/page-core/breadcrumbs.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,29 @@
22
{% assign link='/' %}
33
<ol class="breadcrumb" vocab="http://schema.org" typeof="BreadcrumbList">
44
{% assign position = 1 %}
5+
{% assign current_dir = site.data.breadcrumbs %}
6+
57
{% for dir in parent_dirs %}
68
{% assign link=link | append: dir | append: '/' %}
9+
10+
{% assign pretty_name = dir %}
711
{% if forloop.last %}
812
{% assign itemElem = 'span' %}
913
{% assign liClass = 'active' %}
14+
{% assign pretty_name = page.title %}
1015
{% else %}
1116
{% assign itemElem = 'a' %}
1217
{% assign hrefAttrib = 'href="' | append: link | append: '"' %}
18+
19+
{% assign current_dir = current_dir[dir] %}
20+
{% if current_dir.name %}
21+
{% assign pretty_name = current_dir.name %}
22+
{% endif %}
1323
{% endif %}
14-
24+
1525
<li property="itemListElement" typeof="ListItem" class="{{liClass}}">
1626
<{{itemElem}} {{ hrefAttrib }} property="item" typeof="WebPage">
17-
<span property="name">{{ dir }}</span>
27+
<span property="name">{{ pretty_name }}</span>
1828
</{{itemElem}}>
1929
<meta property="position" content="{{position}}">
2030
</li>

contribute.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ links works and the information is still relevant.
3838
As the hardware drivers are being finalized, development will be shifting to
3939
software that can interface with the hardware. There are many [packages on
4040
GitHub][ev3dev-github-org] that you can hack on. Additionally, there are some
41-
language bindings listed on the [home page](/) that are not part of the ev3dev
42-
GitHub organization (yet).
41+
language bindings listed on the [Programming Languages page](/docs/programming-languages)
42+
that would love some community support.
4343

44-
If you have never used GitHub before, it's super-easy. [Read about it][GitHub Help],
44+
If you have never used GitHub before, it's super easy. [Read about it][GitHub Help],
4545
then send a pull request.
4646

4747
## Write a driver

docs/tutorials/adding-new-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ well as provide videos, pictures, build instructions, code, and any other media
1010
that pertains to the project. This is where we explain how you can submit your
1111
project page to be hosted on the site.
1212

13-
##Overview
13+
## Overview
1414

1515
All the projects on the website are stored in the [projects folder].
1616
Each post is saved as a Markdown file, and is automagically converted to HTML

docs/tutorials/using-ps3-sixaxis.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
title: Bluetooth PS3 gamepad in Python
33
group: hardware-extras
4-
author: Anton Vanhoucke
4+
author: "@antonvh"
55
---
66

77
* Table of Contents
88
{:toc}
99

10-
The cool thing about the PS3 gamepad is that it's a normal Bluetooth device and connects directly to the Ev3. You can easily run programs in brickman and use the pad without another computer or laptop.
10+
The cool thing about the PS3 gamepad is that it's a normal Bluetooth device and
11+
connects directly to the EV3. You can easily run programs in brickman and use
12+
the pad without another computer or laptop.
1113

1214
# What you need
1315
- A PS3 gamepad (also known as Sixaxis controller or Dualshock 3)
@@ -16,23 +18,31 @@ The cool thing about the PS3 gamepad is that it's a normal Bluetooth device and
1618
- ev3-ev3dev-jessie-2015-12-30.img or later
1719

1820
# Connection
19-
The PS3 pairing process in Brickman is a little strange, but works fine. Stick exactly to these steps:
21+
The PS3 pairing process in Brickman is a little strange, but works fine. Stick
22+
exactly to these steps:
2023

2124
1. On the Ev3 brick go to 'Wireless and Networks' > 'Bluetooth'
2225
2. Make sure Bluetooth is Powered and the brick is Visible.
23-
3. Connect the gamepad via a mini usb cable to the Ev3. I used the large usb port next to the micro SD slot.
26+
3. Connect the gamepad via a mini usb cable to the Ev3. I used the large usb
27+
port next to the micro SD slot.
2428
4. Under Devices a 'PLAYSTATION(R) 3 controller' should show up. But don't pair!
2529
4. Remove the USB cable again.
2630
5. Press the PS3 button on the gamepad.
2731
6. The brick now asks "Authorize service HID?" Press "Accept"
2832

29-
You're done! Whenever you press the PS3 button on the gamepad now, it will try to connect to the ev3 brick. Nice!
33+
You're done! Whenever you press the PS3 button on the gamepad now, it will try
34+
to connect to the ev3 brick. Nice!
3035

31-
If brickman doesn't work or if you don't have a display, like on a BrickPi, `bluetoothctl` is the way to go. The gentoo linux guys wrote [a nice tutorial](https://wiki.gentoo.org/wiki/Sony_DualShock)
36+
If brickman doesn't work or if you don't have a display, like on a BrickPi,
37+
`bluetoothctl` is the way to go. The gentoo linux guys wrote [a nice tutorial](https://wiki.gentoo.org/wiki/Sony_DualShock)
3238

3339

3440
# Running motors with a PS3 sixaxis controller
35-
Now on to Python. In python we need the evdev (without a 3) to read gamepad events. Here's a quick program that will take the right stick Y axis and use it to set the speed of a motor in port A. Note that motor control is in a separate thread. That's because controlling the motors is much slower than reading the gamepad. Multithreading synchronizes both.
41+
Now on to Python. In python we need the evdev (without a 3) to read gamepad
42+
events. Here's a quick program that will take the right stick Y axis and use it
43+
to set the speed of a motor in port A. Note that motor control is in a separate
44+
thread. That's because controlling the motors is much slower than reading the
45+
gamepad. Multithreading synchronizes both.
3646

3747
{% highlight python %}
3848
#!/usr/bin/env python
@@ -98,7 +108,8 @@ for event in gamepad.read_loop(): #this loops infinitely
98108
break
99109
{% endhighlight %}
100110

101-
Copy this code into a file on the Ev3 brick to run it. If you do `sudo chmod +x your_file_name.py`, you can even run it from the brickman interface!
111+
Copy this code into a file on the Ev3 brick to run it. If you do
112+
`sudo chmod +x your_file_name.py`, you can even run it from the brickman interface!
102113

103114
# The complete event type and code mapping of the ps3 controller
104115
I mapped out all codes for you! Here they are:

projects/_posts/2014-08-20-EV3-simple-goodies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ but with some simple edits you can place them where **you** want them.
4040

4141

4242
### Have your EV3 report the IP-addresses by speach after boot
43-
##### Starting at ev3dev image ev3dev-jessie-2014-10-07
43+
**Starting at ev3dev image ev3dev-jessie-2014-10-07**
4444

4545
For this an update is needed to `/etc/rc.local`
4646

@@ -57,7 +57,7 @@ fi
5757
and place the script [`tellIP`](https://github.com/BertLindeman/bert-ev3dev-examples/blob/master/tellIP)
5858
in the directory: `/media/mmc_p1/`
5959

60-
##### OLDER ev3dev images (ev3dev-jessie-2014-10-07-12 and before)
60+
**OLDER ev3dev images (ev3dev-jessie-2014-10-07-12 and before)**
6161

6262
For this an update is needed to `/media/mmc_p1/ev3dev.rc.local`
6363

share.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
22
title: Share
33
excerpt: "We have a projects page where users can browse projects that have been built using ev3dev. You can add your own too! Each project gets a dedicated page for the author to explain what they have been working on, as well as provide videos, pictures, build instructions, code, and any other media that pertains to the project."
4+
extra-head-content: '<script async defer src="https://buttons.github.io/buttons.js"></script>'
45
---
6+
57
<div class="lead">
68
<center>
79
Do you like ev3dev? Show your support!
810
</center>
911
</div>
1012

11-
<div class="row">
12-
<div class="col-md-6" markdown="1">
13-
<h3><span class="glyphicon glyphicon-star heading-icon"></span>Give us a star on GitHub</h3>
14-
"Stars" are a great way to show support for a GitHub project. Visit [ours][] and star us!
15-
</div>
16-
<div class="col-md-6" markdown="1">
17-
<h3><span class="glyphicon glyphicon-check heading-icon"></span>Vote for ev3dev</h3>
18-
Vote for ev3dev in the [mindsensor.com][] poll (it's about half way down
19-
the page).
20-
</div>
21-
</div>
13+
## Give us a star on GitHub
14+
15+
<a class="github-button"
16+
aria-label="Star ev3dev/ev3dev on GitHub"
17+
href="https://github.com/ev3dev/ev3dev"
18+
data-text="Visit us and star"
19+
data-style="mega" data-icon="octicon-star"
20+
data-count-href="/ev3dev/ev3dev/stargazers"
21+
data-count-api="/repos/ev3dev/ev3dev#stargazers_count"
22+
data-count-aria-label="# stargazers on GitHub">Star</a>
2223

23-
<hr/>
24+
"Stars" are a great way to show support for a GitHub project. Visit [ours][ev3dev-repo] and star us!
2425

25-
Show us your ev3dev projects
26-
------------------------
26+
## Show us your ev3dev projects
2727

2828
We have a [projects page] where users can browse projects that have
2929
been built using ev3dev. You can add your own too! Each project gets a
@@ -38,4 +38,4 @@ check out [the tutorial][Adding a new project].
3838
[template project]: https://raw.githubusercontent.com/ev3dev/ev3dev.github.io/master/projects/_posts/2014-03-21-Example-Project.md
3939
[template page]: /projects/2014/03/21/Example-Project/
4040
[Adding a new project]: ../docs/tutorials/adding-new-project/
41-
[ours]: https://github.com/ev3dev/ev3dev
41+
[ev3dev-repo]: https://github.com/ev3dev/ev3dev

stylesheets/bootstrap.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,9 @@
6767

6868
.panel-danger {
6969
@include panel-variant($panel-danger-heading-bg);
70+
}
71+
72+
// Custom breadcrumb separator
73+
.breadcrumb > li + li::before {
74+
content: ">"
7075
}

support.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ redirect_from: /issues/index.html
44
excerpt: "Have a problem or question? We are here to help - but you have to help us help you. We keep track of problems, suggestions and questions about ev3dev using GitHub Issues. This lets us keep everything in one place."
55
---
66

7-
* Table of Contents
8-
{:toc}
7+
* Table of Contents
8+
{:toc}
99

1010
<center>
1111
<h3>Have a problem or question?
@@ -21,12 +21,11 @@ We keep track of problems, suggestions and questions about ev3dev using [GitHub
2121
Issues]. This lets us keep everything in one place. (So, please don't email the
2222
developers directly unless you have a personal question.)
2323

24-
First, before submitting an issue, search the existing issues (open and closed) to make sure someone else has
25-
not already reported the same problem or asked the same question. Please only
26-
comment on an existing **open** issue if you are fairly sure your problem/question is
27-
*exactly* the same. If the issue is closed or you are not sure your problem is the same,
28-
open a new issue instead. Be sure to mention any related issue by number and GitHub will
29-
magically create a link to it (e.g `#100`).
24+
First, before submitting an issue, search the existing issues (open and closed)
25+
to make sure someone else has not already reported the same problem or asked the
26+
same question. Please only comment on an existing **open** issue if you are
27+
fairly sure your problem/question is *exactly* the same. If the issue is closed
28+
or you are not sure your problem is the same, open a new issue instead.
3029

3130
<br/>
3231

@@ -40,8 +39,9 @@ magically create a link to it (e.g `#100`).
4039
</form>
4140

4241
<small>
43-
__Note:__ The [ev3dev-lang]{:target="_blank"} repository has its own
44-
[issues][ev3dev-lang-issues]{:target="_blank"} tracker.
42+
__Note:__ The [ev3dev-lang-python]{:target="_blank"} repository has its own
43+
[issues][ev3dev-lang-python-issues]{:target="_blank"} tracker for Python-related
44+
questions.
4545
</small>
4646

4747
<br/>
@@ -55,10 +55,11 @@ If you don't find anything helpful by searching, then create a [new issue]{:targ
5555
issue. If you are writing a program, post the code. If you are following
5656
a tutorial, which step failed? Be as detailed as possible.</strong>
5757

58-
In the description of your issue, be sure to also include:
58+
In the description of your issue, **make sure to fill in the information from the template**.
59+
In addition, include as much relevant information as possible:
5960

60-
* The image file that you used to flash your SD card (e.g. `ev3dev-jessie-2015-02-24.img`).
61-
* Your kernel version (output of `uname -rv`)
61+
* Be sure to mention any related issues by number, so we can refer to past
62+
discussion. GitHub will properly format a reference of the format `#100`.
6263
* If you are using a library (ev3dev-lang, python-ev3, ev3dev-c, etc.) please
6364
state which library. Most, if not all, of these have their own issues tracker.
6465
You may have better luck posting there instead.
@@ -69,15 +70,15 @@ In the description of your issue, be sure to also include:
6970
`systemctl status brickman.service -l`.
7071
* If a screenshot of the EV3 would be helpful, run `fbgrab <some-name>.png`
7172
on the EV3 and include the picture in your comments.
72-
<p />
73+
<br/>
7374

7475
We also expect you to clean up after yourself. Please close the issue when
7576
you feel that it is resolved.
7677

7778
Some additional things to take into consideration:
7879

7980
* If you are posting logs that are more than 5-10 lines long, please use
80-
<http://pastebin.com> or <https://gist.github.com> or something similar
81+
<http://pastebin.com>, <https://gist.github.com> or something similar
8182
instead of posting long logs in comments.
8283

8384
* If you are copying and pasting information from a terminal, use "code fences"
@@ -96,7 +97,10 @@ Learn more about [writing on GitHub]{:target="_blank"}.
9697
Gitter
9798
------
9899

99-
[gitter.im] is an online chat service that works in conjunction with GitHub.
100+
[gitter.im] is an online chat service that works in conjunction with GitHub. We
101+
monitor our Gitter room and are happy to provide support in live chat.
102+
103+
**This is the recommended means of live chat support for ev3dev.**
100104

101105
If you have a GitHub or Twitter account, come say hello at <https://gitter.im/ev3dev/chat>.
102106

@@ -124,8 +128,8 @@ browser. Just enter a nickname and click start below.
124128
<iframe src="https://kiwiirc.com/client/irc.freenode.net/?&theme=cli#ev3dev" class="button" style="width:100%; height:450px; border: none;" />
125129
126130
[GitHub Issues]: https://help.github.com/articles/about-issues/
127-
[ev3dev-lang]: https://github.com/ev3dev/ev3dev-lang
128-
[ev3dev-lang-issues]: https://github.com/ev3dev/ev3dev-lang/issues
131+
[ev3dev-lang-python]: https://github.com/rhempel/ev3dev-lang-python
132+
[ev3dev-lang-python-issues]: https://github.com/rhempel/ev3dev-lang-python/issues
129133
[new issue]: https://github.com/ev3dev/ev3dev/issues/new
130134
[writing on GitHub]: https://help.github.com/categories/writing-on-github/
131135
[Internet Relay Chat]: https://en.wikipedia.org/wiki/Internet_Relay_Chat

0 commit comments

Comments
 (0)