Skip to content

Commit 2e190ca

Browse files
committed
Moved chapters to folders, moving away from branches
1 parent b3e158b commit 2e190ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1138
-0
lines changed
File renamed without changes.
File renamed without changes.

chapter-1/MainView.ux

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<App>
2+
<ClientPanel>
3+
<JavaScript>
4+
var Observable = require("FuseJS/Observable");
5+
6+
var name = Observable("Tricky Trails");
7+
var location = Observable("Lakebed, Utah");
8+
var distance = Observable(10.4);
9+
var rating = Observable(4);
10+
var comments = Observable("This hike was nice and hike-like. Glad I didn't bring a bike.");
11+
12+
module.exports = {
13+
name: name,
14+
location: location,
15+
distance: distance,
16+
rating: rating,
17+
comments: comments
18+
};
19+
</JavaScript>
20+
21+
<ScrollView>
22+
<StackPanel>
23+
<Text Value="{name}" />
24+
25+
<Text>Name:</Text>
26+
<TextBox Value="{name}" />
27+
28+
<Text>Location:</Text>
29+
<TextBox Value="{location}" />
30+
31+
<Text>Distance (km):</Text>
32+
<TextBox Value="{distance}" InputHint="Decimal" />
33+
34+
<Text>Rating:</Text>
35+
<TextBox Value="{rating}" InputHint="Integer" />
36+
37+
<Text>Comments:</Text>
38+
<TextView Value="{comments}" TextWrapping="Wrap" />
39+
</StackPanel>
40+
</ScrollView>
41+
</ClientPanel>
42+
</App>
File renamed without changes.
File renamed without changes.

chapter-1/hikr.unoproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"RootNamespace":"",
3+
"Packages": [
4+
"Fuse",
5+
"FuseJS"
6+
],
7+
"Includes": [
8+
"*"
9+
]
10+
}

chapter-2/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
.uno/

chapter-2/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Fuse
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

chapter-2/MainView.ux

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<App>
2+
<ClientPanel>
3+
<JavaScript>
4+
var Observable = require("FuseJS/Observable");
5+
6+
var hikes = [
7+
{
8+
id: 0,
9+
name: "Tricky Trails",
10+
location: "Lakebed, Utah",
11+
distance: 10.4,
12+
rating: 4,
13+
comments: "This hike was nice and hike-like. Glad I didn't bring a bike."
14+
},
15+
{
16+
id: 1,
17+
name: "Mondo Mountains",
18+
location: "Black Hills, South Dakota",
19+
distance: 20.86,
20+
rating: 3,
21+
comments: "Not the best, but would probably do again. Note to self: don't forget the sandwiches next time."
22+
},
23+
{
24+
id: 2,
25+
name: "Pesky Peaks",
26+
location: "Bergenhagen, Norway",
27+
distance: 8.2,
28+
rating: 5,
29+
comments: "Short but SO sweet!!"
30+
},
31+
{
32+
id: 3,
33+
name: "Rad Rivers",
34+
location: "Moriyama, Japan",
35+
distance: 12.3,
36+
rating: 4,
37+
comments: "Took my time with this one. Great view!"
38+
},
39+
{
40+
id: 4,
41+
name: "Dangerous Dirt",
42+
location: "Cactus, Arizona",
43+
distance: 19.34,
44+
rating: 2,
45+
comments: "Too long, too hot. Also that snakebite wasn't very fun."
46+
}
47+
];
48+
49+
var hike = Observable();
50+
51+
var name = hike.map(function(x) { return x.name; });
52+
var location = hike.map(function(x) { return x.location; });
53+
var distance = hike.map(function(x) { return x.distance; });
54+
var rating = hike.map(function(x) { return x.rating; });
55+
var comments = hike.map(function(x) { return x.comments; });
56+
57+
function chooseHike(arg) {
58+
hike.value = arg.data;
59+
}
60+
61+
module.exports = {
62+
hikes: hikes,
63+
64+
name: name,
65+
location: location,
66+
distance: distance,
67+
rating: rating,
68+
comments: comments,
69+
70+
chooseHike: chooseHike
71+
};
72+
</JavaScript>
73+
74+
<ScrollView>
75+
<StackPanel>
76+
<Each Items="{hikes}">
77+
<Button Text="{name}" Clicked="{chooseHike}" />
78+
</Each>
79+
80+
<Text Value="{name}" />
81+
82+
<Text>Name:</Text>
83+
<TextBox Value="{name}" />
84+
85+
<Text>Location:</Text>
86+
<TextBox Value="{location}" />
87+
88+
<Text>Distance (km):</Text>
89+
<TextBox Value="{distance}" InputHint="Decimal" />
90+
91+
<Text>Rating:</Text>
92+
<TextBox Value="{rating}" InputHint="Integer" />
93+
94+
<Text>Comments:</Text>
95+
<TextView Value="{comments}" TextWrapping="Wrap" />
96+
</StackPanel>
97+
</ScrollView>
98+
</ClientPanel>
99+
</App>

chapter-2/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# hikr
2+
Pronounced "hiker" (/ˈhaɪkə(r)/), hikr is a basic hike-tracking app.
3+
4+
![Screen cap](https://github.com/fusetools/hikr/blob/master/hikr.gif)
5+
6+
## basic info
7+
hikr is an example app case to accompany Fuse's [end-to-end Fuse app tutorial](https://www.fusetools.com/docs/tutorial/tutorial).
8+
9+
_Note: there have been some force-pushes on this repo, so if you've cloned it before the series went live, it's probably a good idea to delete it and clone again._
10+
11+
## license
12+
This code is licensed under the MIT license (see LICENSE).
13+
14+
The provided video file (`Assets/nature.mp4`) is a modified version of [Graham Uhelski](https://vimeo.com/mankindfilms)'s ["The Valley"](http://mazwai.com/#/videos/220). It is licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/).

0 commit comments

Comments
 (0)