Skip to content

Commit d396324

Browse files
C-D-LewisSorixelle
authored andcommitted
Remove CloudPebble vs SDK specific blocks in content
Signed-off-by: C-D-Lewis <[email protected]>
1 parent 395b21f commit d396324

File tree

30 files changed

+82
-610
lines changed

30 files changed

+82
-610
lines changed

docs/markdown.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,6 @@ release.
225225
{% endalert %}
226226
```
227227

228-
### SDK Platform Specific Paragraphs
229-
230-
On pages that have the SDK Platform choice system, you can tag paragraphs as
231-
being only relevant for CloudPebble or local SDK users. Text, code snippets,
232-
images, and other markdown are all supported.
233-
234-
First, add `platform_choice: true` to the page YAML metadata.
235-
236-
Specify platform-specific sections of markdown using the `platform` Liquid tag:
237-
238-
```
239-
{% platform local %}
240-
Add the resource to your project in `package.json`.
241-
{% endplatform %}
242-
243-
{% platform cloudpebble %}
244-
Add the resource to your project by clicking 'Add New' next to 'Resources' in
245-
the project sidebar.
246-
{% endplatform %}
247-
```
248-
249228
### Formatting
250229

251230
The following additional text formatting syntax is supported.

source/_guides/app-resources/animated-images.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ description: |
1919
display them in your app.
2020
guide_group: app-resources
2121
order: 0
22-
platform_choice: true
2322
---
2423

2524
The Pebble SDK allows animated images to be played inside an app using the
@@ -47,7 +46,6 @@ A `.gif` file can be converted to the APNG `.png` format with
4746

4847
## Adding an APNG
4948

50-
{% platform local %}
5149
Include the APNG file in the `resources` array in `package.json` as a `raw`
5250
resource:
5351

@@ -62,12 +60,6 @@ resource:
6260
]
6361
}
6462
```
65-
{% endplatform %}
66-
67-
{% platform cloudpebble %}
68-
To add the APNG file as a raw resource, click 'Add New' in the Resources section
69-
of the sidebar, and set the 'Resource Type' as 'raw binary blob'.
70-
{% endplatform %}
7163

7264
## Displaying APNG Frames
7365

source/_guides/app-resources/fonts.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ description: |
1818
How to use built-in system fonts, or add your own font resources to a project.
1919
guide_group: app-resources
2020
order: 3
21-
platform_choice: true
2221
---
2322

2423

@@ -77,7 +76,6 @@ graphics_draw_text(ctx, text, fonts_get_system_font(FONT_KEY_GOTHIC_24), bounds,
7776

7877
## Adding a Custom Font
7978

80-
{% platform local %}
8179
After placing the font file in the project's `resources` directory, the custom
8280
font can be added to a project as `font` `type` item in the `media` array in
8381
`package.json`. The `name` field's contents will be made available at compile
@@ -95,18 +93,6 @@ For example:
9593
]
9694
}
9795
```
98-
{% endplatform %}
99-
100-
{% platform cloudpebble %}
101-
To add a custom font file to your project, click 'Add New' in the Resources
102-
section of the sidebar. Set the 'Resource Type' to 'TrueType font', and upload
103-
the file using the 'Choose file' button. Choose an 'Identifier', which will be
104-
made available at compile time with `RESOURCE_ID_` at the front. This must end
105-
with the desired font size ("EXAMPLE_FONT_20", for example).
106-
107-
Configure the other options as appropriate, then hit 'Save' to save the
108-
resource.
109-
{% endplatform %}
11096

11197
{% alert important %}
11298
The maximum recommended font size is 48.
@@ -180,13 +166,6 @@ font character sets in common watchapp scenarios:
180166
| `[0-9:A-Za-z° ]` | Time, date, and degree symbol for temperature gauges. |
181167
| `[0-9°CF ]` | Numbers and degree symbol with 'C' and 'F' for temperature gauges. |
182168
183-
{% platform cloudpebble %}
184-
Open the font's configuration screen under 'Resources', then enter the desired
185-
regex in the 'Characters' field. Check the preview of the new set of characters,
186-
then choose 'Save'.
187-
{% endplatform %}
188-
189-
{% platform local %}
190169
Add the `characterRegex` key to any font objects in `package.json`'s
191170
`media` array.
192171
@@ -200,7 +179,6 @@ Add the `characterRegex` key to any font objects in `package.json`'s
200179
}
201180
]
202181
```
203-
{% endplatform %}
204182

205183
Check out
206184
[regular-expressions.info](http://www.regular-expressions.info/tutorial.html)

source/_guides/app-resources/images.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ description: |
1818
How to add image resources to a project and display them in your app.
1919
guide_group: app-resources
2020
order: 4
21-
platform_choice: true
2221
---
2322

2423
Images can be displayed in a Pebble app by adding them as a project resource.
@@ -57,13 +56,6 @@ are available below. Use these when creating color image resources:
5756

5857
## Import the Image
5958

60-
{% platform cloudpebble %}
61-
Add the `.png` file as a resource using the 'Add New' button next to
62-
'Resources'. Give the resource a suitable 'Identifier' such as 'EXAMPLE_IMAGE'
63-
and click 'Save'.
64-
{% endplatform %}
65-
66-
{% platform local %}
6759
After placing the image in the project's `resources` directory, add an entry to
6860
the `resources` item in `package.json`. Specify the `type` as `bitmap`, choose a
6961
`name` (to be used in code) and supply the path relative to the project's
@@ -80,7 +72,6 @@ the `resources` item in `package.json`. Specify the `type` as `bitmap`, choose a
8072
]
8173
},
8274
```
83-
{% endplatform %}
8475

8576

8677
## Specifying an Image Resource
@@ -96,13 +87,6 @@ Resources of this type can be optimized using additional attributes:
9687
| `storageFormat` | Optional. Determines the file format used for storage. Using `spaceOptimization` instead is preferred. | `pbi` or `png`. |
9788
| `spaceOptimization` | Optional. Determines whether the output resource is optimized for low runtime memory or low resource space usage. | `storage` or `memory`. |
9889

99-
{% platform cloudpebble %}
100-
These attributes can be selected in CloudPebble from the resource's page:
101-
102-
![](/images/guides/app-resources/cp-bitmap-attributes.png)
103-
{% endplatform %}
104-
105-
{% platform local %}
10690
An example usage of these attributes in `package.json` is shown below:
10791

10892
```js
@@ -114,7 +98,6 @@ An example usage of these attributes in `package.json` is shown below:
11498
"spaceOptimization": "memory"
11599
}
116100
```
117-
{% endplatform %}
118101

119102
On all platforms `memoryFormat` will default to `Smallest`. On Aplite
120103
`spaceOptimization` will default to `memory`, and `storage` on all other
@@ -159,15 +142,8 @@ stored in while the app is running:
159142
static GBitmap *s_bitmap;
160143
```
161144

162-
{% platform cloudpebble %}
163-
Create the ``GBitmap``, specifying the 'Identifier' chosen earlier, prefixed
164-
with `RESOURCE_ID_`. This will manage the image data:
165-
{% endplatform %}
166-
167-
{% platform local %}
168145
Create the ``GBitmap``, specifying the `name` chosen earlier, prefixed with
169146
`RESOURCE_ID_`. This will manage the image data:
170-
{% endplatform %}
171147

172148
```c
173149
s_bitmap = gbitmap_create_with_resource(RESOURCE_ID_EXAMPLE_IMAGE);

source/_guides/app-resources/index.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ menu: false
2121
permalink: /guides/app-resources/
2222
generate_toc: false
2323
hide_comments: true
24-
platform_choice: true
2524
---
2625

2726
The Pebble SDK allows apps to include extra files as app resources. These files
@@ -37,18 +36,10 @@ Aplite platform, and **256 kB** on the Basalt and Chalk platforms. These limits
3736
include resources used by included Pebble Packages.
3837
{% endalert %}
3938

40-
{% platform local %}
4139
App resources are included in a project by being listed in the `media` property
4240
of `package.json`, and are converted into suitable firmware-compatible formats
4341
at build time. Examples of this are shown in each type of resource's respective
4442
guide.
45-
{% endplatform %}
46-
47-
{% platform cloudpebble %}
48-
App resources are included in a project by clicking the 'Add New' button under
49-
'Resources' and specifying the 'Resource Type' as appropriate. These are then
50-
converted into suitable firmware-compatible formats at build time.
51-
{% endplatform %}
5243

5344

5445
## Contents

source/_guides/app-resources/raw-data-files.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ description: |
1818
How to add raw data resources to a project and read them in your app.
1919
guide_group: app-resources
2020
order: 7
21-
platform_choice: true
2221
---
2322

2423
Some kinds of apps will require extra data that is not a font or an image. In
@@ -34,7 +33,6 @@ dictionaries, CSV data files, etc.
3433

3534
## Adding Raw Data Files
3635

37-
{% platform local %}
3836
To add a file as a raw resource, specify its `type` as `raw` in `package.json`.
3937
An example is shown below:
4038

@@ -49,12 +47,6 @@ An example is shown below:
4947
]
5048
}
5149
```
52-
{% endplatform %}
53-
54-
{% platform cloudpebble %}
55-
To add a file as a raw resource, click 'Add New' in the Resources section of the
56-
sidebar, and set the 'Resource Type' as 'raw binary blob'.
57-
{% endplatform %}
5850

5951

6052
## Reading Bytes and Byte Ranges

source/_guides/communication/advanced-communication.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ related_examples:
3131
url: https://github.com/pebble-examples/png-download-example
3232
- title: Pebble Faces
3333
url: https://github.com/pebble-examples/pebble-faces
34-
platform_choice: true
3534
---
3635

3736
Many types of connected Pebble watchapps and watchfaces perform common tasks
@@ -52,8 +51,6 @@ code implements the `appmessage` event listsner, it is ready to receive data.
5251
> for such an event thanks to the `Intent` system. iOS companion apps must wait
5352
> for `-watchDidConnect:`.
5453
55-
<div class="platform-specific" data-sdk-platform="local">
56-
{% markdown %}
5754
A simple method is to define a key in `package.json` that will be interpreted by
5855
the watchapp to mean that the JS environment is ready for exchange data:
5956

@@ -62,17 +59,6 @@ the watchapp to mean that the JS environment is ready for exchange data:
6259
"JSReady"
6360
]
6461
```
65-
{% endmarkdown %}
66-
</div>
67-
68-
<div class="platform-specific" data-sdk-platform="cloudpebble">
69-
{% markdown %}
70-
A simple method is to define a key in Settings that will be interpreted by
71-
the watchapp to mean that the JS environment is ready for exchange data:
72-
73-
* JSReady
74-
{% endmarkdown %}
75-
</div>
7662

7763
The watchapp should implement a variable that describes if the `ready` event has
7864
occured. An example is shown below:
@@ -258,20 +244,9 @@ static int s_index = 0;
258244

259245
When a message has been sent, this index is used to construct the next message:
260246

261-
<div class="platform-specific" data-sdk-platform="local">
262-
{% markdown %}
263247
> Note: A useful key scheme is to use the item's array index as the key. For
264248
> PebbleKit JS that number of keys will have to be declared in `package.json`,
265249
> like so: `someArray[6]`
266-
{% endmarkdown %}
267-
</div>
268-
<div class="platform-specific" data-sdk-platform="cloudpebble">
269-
{% markdown %}
270-
> Note: A useful key scheme is to use the item's array index as the key. For
271-
> PebbleKit JS that number of keys will have to be declared in the project's
272-
> 'Settings' page, like so: `someArray[6]`
273-
{% endmarkdown %}
274-
</div>
275250
276251
```c
277252
static void outbox_sent_handler(DictionaryIterator *iter, void *context) {

source/_guides/communication/index.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ menu: false
2121
permalink: /guides/communication/
2222
generate_toc: false
2323
hide_comments: true
24-
platform_choice: true
2524
---
2625

2726
All Pebble watchapps and watchfaces have the ability to communicate with the
@@ -76,18 +75,8 @@ iOS.
7675
All messages sent from a Pebble watchapp or watchface will be delivered to the
7776
appropriate phone app depending on the layout of the developer's project:
7877

79-
<div class="platform-specific" data-sdk-platform="local">
80-
{% markdown %}
8178
* If at least an `index.js` file is present in `src/pkjs/`, the message will be
8279
handled by PebbleKit JS.
83-
{% endmarkdown %}
84-
</div>
85-
<div class="platform-specific" data-sdk-platform="cloudpebble">
86-
{% markdown %}
87-
* If the project contains at least one JavaScript file, the message will be
88-
handled by PebbleKit JS.
89-
{% endmarkdown %}
90-
</div>
9180

9281
* If there is no valid JS file present (at least an `index.js`) in the project,
9382
the message will be delivered to the official Pebble mobile app. If there is a

0 commit comments

Comments
 (0)