Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new platform selection mechanism #87

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ defaults:
type: "posts"
values:
layout: "news"
-
scope:
path: "javascripts"
type: "pages"
values:
layout: "none"

kramdown:
toc_levels: "2,3"
53 changes: 53 additions & 0 deletions _data/platform-attributes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"client-platform": {
"values": {
"android": {
"title": "Android",
"uaPlatform": "Android"
},
"osx": {
"title": "OS X",
"uaPlatform": "Mac OS"
},
"ubuntu": {
"title": "Ubuntu",
"uaPlatform": "Ubuntu"
},
"windows": {
"title": "Windows",
"uaPlatform": "Windows"
}
},
"autodetectFunction": "autodetectClientPlatform"
},
"client-windows-version": {
"values": {
"win7": {
"title": "Windows 7",
"uaVersion": "7"
},
"win8": {
"title": "Windows 8",
"uaVersion": "8"
},
"win10": {
"title": "Windows 10",
"uaVersion": "10"
}
},
"autodetectFunction": "autodetectClientWindowsVersion"
},
"ev3dev-hardware-platform": {
"values": {
"ev3": {
"title": "EV3 Brick"
},
"brickpi": {
"title": "BrickPi"
},
"pistorms": {
"title": "PiStorms"
}
}
}
}
9 changes: 5 additions & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@
<!-- 3rd-party libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="/javascripts/bootstrap/bootstrap.min.js"></script>
<script src="/javascripts/jquery.getUrlParam.js"></script>
<script src="/javascripts/jquery.loadTemplate-1.4.4.min.js"></script>
<script src="/javascripts/respond.js"></script>
<script src="/javascripts/ua-parser.min.js"></script>
<script src="/javascripts/libs/jquery.getUrlParam.js"></script>
<script src="/javascripts/libs/jquery.loadTemplate-1.4.4.min.js"></script>
<script src="/javascripts/libs/respond.js"></script>
<script src="/javascripts/libs/ua-parser.min.js"></script>

<!-- Loads user-cards from GH API -->
<script src="/javascripts/cards.js"></script>
<!-- Responds to queries typed into the "Quick nav" box -->
<script src="/javascripts/search.js"></script>
<!-- Converts static descriptors of tab target content into live text and links -->
<script src="/javascripts/tabs.js"></script>
<script src="/javascripts/platform-select.js"></script>
<!-- Adds classes and other styles to pages where hard-coded css can't be used -->
<script src="/javascripts/style-helpers.js"></script>

Expand Down
5 changes: 5 additions & 0 deletions _layouts/none.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

---

{{ content }}
43 changes: 43 additions & 0 deletions docs/tutorials/platform-test-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Platform test page
subject: Website
---

This is a test page.

* {: data-platform-attribute-value-id="android"}
1. This is the first step for Android.

2. This is the second step for Android.

* {: data-platform-attribute-value-id="osx"}

1. Another step! This one's for Mac.

2. ...And another for Mac.

* {: data-platform-attribute-value-id="ubuntu"}

1. Even more steps! Now featuring 100% more Ubuntu.

2. Steps continued.

* {: data-platform-attribute-value-id="windows"}
* {: data-platform-attribute-value-id="win7"} This is for Windows 7!

* {: data-platform-attribute-value-id="win8"} This is for Windows 8!

* {: data-platform-attribute-value-id="win10"} This is for Windows 10!
{: data-platform-select-list-attribute="client-windows-version"}
{: data-platform-select-list-attribute="client-platform" }

* {: data-platform-attribute-value-id="ev3"}
On the EV3, do a thing in this specific way.

* {: data-platform-attribute-value-id="brickpi"}
The BrickPi is a little different. You actually need to do this other thing.

* {: data-platform-attribute-value-id="pistorms"}
The PiStorms doesn't support this portion of the functionality.
You need to take this into consideration.
{: data-platform-select-list-attribute="ev3dev-hardware-platform" }
File renamed without changes.
8 changes: 8 additions & 0 deletions javascripts/libs/ua-parser.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading