Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit 03675d1

Browse files
authored
Merge pull request #7 from nilslindemann/tutorial-fixes
Tutorial fixes
2 parents 0bf5d37 + 8beb8bd commit 03675d1

29 files changed

+97
-98
lines changed

source/Lessons/Components/01-Basics.mint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module Lessons {
2424
],
2525
contents:
2626
<<#MARKDOWN
27-
A **component** is a collection of UI elements which together a serve
27+
A **component** is a collection of UI elements which together serve a
2828
specific function. You can think of buttons, checkboxes, selects, images,
2929
etc... as components.
3030

source/Lessons/Components/03-Dynamic-Attributes.mint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ module Lessons {
4747
```
4848

4949
When building web apps, it's important to make sure that they're
50-
accessible to the broadest possible userbase, including people with
50+
accessible to the broadest possible user base, including people with
5151
(for example) impaired vision or motion, or people without powerful
5252
hardware or good internet connections.
5353

54-
To that end we should add the `alt` attribute that describes the image
55-
for people using screenreaders, or people with slow or flaky internet
54+
To that end, we should add the `alt` attribute that describes the image
55+
for people using screen readers, or people with slow or flaky internet
5656
connections that can't download the image. Let's add it:
5757

5858
```mint

source/Lessons/Components/04-Styling.mint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module Lessons {
4343
],
4444
contents:
4545
<<#MARKDOWN
46-
In HTML you normally put your styles into a `<style>` element. In Mint
46+
In HTML, you normally put your styles into a `<style>` element. In Mint
4747
you put it into `style` blocks.
4848

4949
```mint
@@ -57,7 +57,7 @@ module Lessons {
5757
Style blocks are like CSS classes, they have a name and can be added to
5858
any element in the component.
5959

60-
Styling is a topic so big that it has it's own chapter so stick around
60+
Styling is a topic so big that it has its own chapter, so stick around
6161
to learn everything about it!
6262
MARKDOWN
6363
}

source/Lessons/Components/05-Composition.mint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module Lessons {
6868
Instead, we can write components in other files and use them as we
6969
would other elements.
7070

71-
Once your component is ready all you need to do is add it as markup:
71+
Once your component is ready, all you need to do is add it as markup:
7272

7373
```mint
7474
<Nested/>
@@ -78,7 +78,7 @@ module Lessons {
7878
compiler finds all `.mint` files in your project and parses them
7979
automatically. Anything in them is available everywhere.
8080
81-
Also notice that the component name `Nested` is capitalised. This
81+
Also notice that the component name `Nested` is capitalized. This
8282
convention has been adopted to allow us to differentiate between
8383
user-defined components and regular HTML tags.
8484
MARKDOWN

source/Lessons/Components/06-Properties.mint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module Lessons {
6060
* Properties can be referenced by name within the component (in styles,
6161
functions, computed properties, etc...).
6262

63-
The type definition or default value can be omitted but not both:
63+
The type definition or default value can be omitted, but not both:
6464

6565
```mint
6666
// Type inferred from the default value
@@ -70,7 +70,7 @@ module Lessons {
7070
property name : String
7171
```
7272

73-
If the passed property doesn't match it's given type then you will get
73+
If the passed property doesn't match its given type, then you will get
7474
a compile error.
7575
MARKDOWN
7676
}

source/Lessons/Components/08-State.mint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module Lessons {
5353
Sometimes you need to have some data for a component to describe it's
5454
internal state.
5555

56-
For that you can use the `state` keyword:
56+
For that, you can use the `state` keyword:
5757

5858
```mint
5959
component Main {
@@ -73,7 +73,7 @@ module Lessons {
7373

7474
The state can be moved forward using the `next` keyword.
7575

76-
As an exercise you can add an other button to hide the text!
76+
As an exercise, you can add another button to hide the text!
7777
MARKDOWN
7878
}
7979
}

source/Lessons/Components/09-References.mint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module Lessons {
7171
contents:
7272
<<#MARKDOWN
7373
Sometimes it's necessary to access elements or components in a component
74-
for a number of reasons. To do that you can use the `as name` notation:
74+
for a number of reasons. To do that, you can use the `as name` notation:
7575

7676
```mint
7777
<input as input/>

source/Lessons/ControlExpressions/01-If.mint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module Lessons {
5959
],
6060
contents:
6161
<<#MARKDOWN
62-
As most other languages Mint has a structrue to return different
62+
As most other languages, Mint has a construct to return different
6363
values based on some condition.
6464

6565
It looks like this:
@@ -72,11 +72,11 @@ module Lessons {
7272
}
7373
```
7474

75-
Unlike in some languages `if` in Mint is an expression and not a
75+
Unlike in some languages, `if` in Mint is an expression and not a
7676
statement, and because of this both branches need to return something
7777
and those need to be of the same type.
7878

79-
With this information you should be able update the code to display the
79+
With this information, you should be able to update the code to display the
8080
correct button based on the `userLoggedIn` state.
8181
MARKDOWN
8282
}

source/Lessons/ControlExpressions/02-For.mint

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,22 @@ module Lessons {
7373
],
7474
contents:
7575
<<#MARKDOWN
76-
As most other languages Mint has a structrue to iterate over certain
76+
As most other languages, Mint has a construct to iterate over certain
7777
data structures.
7878

79-
It's the `for` block and it looks like this:
79+
It's the `for` block, and it looks like this:
8080

8181
```mint
8282
for (item of iterable) {
8383
expressions
8484
}
8585
```
8686

87-
Unlike in some languages `for` in Mint is an expression and not a
87+
Unlike in some languages, `for` in Mint is an expression and not a
8888
statement, and because of this it returns an `Array(item)` where
8989
`item` is the type of the last `expression`.
9090

91-
Currently it only can iterate through these types: `Array(item)`, `Set(item)`,
91+
Currently, it can iterate through these types: `Array(item)`, `Set(item)`,
9292
and `Map(key,value)`.
9393

9494
## Filtering using `when`
@@ -105,7 +105,7 @@ module Lessons {
105105
}
106106
```
107107

108-
Let's display the links of the cat videos usin a `for` expression.
108+
Let's display the links of the cat videos using a `for` expression.
109109
MARKDOWN
110110
}
111111
}

source/Lessons/ControlExpressions/03-Case.mint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ module Lessons {
8888
```
8989

9090
The `case` expression is more powerful than this simple example shows
91-
and will be covering it in other lessons.
91+
and we will be covering it in other lessons.
9292

93-
As an exercise you can add the branches for `3` and `4`.
93+
As an exercise, you can add the branches for `3` and `4`.
9494
MARKDOWN
9595
}
9696
}

0 commit comments

Comments
 (0)