Skip to content

Commit c1e06d1

Browse files
authored
Merge pull request #11 from ember-learn/feature/fix-images
fix and flatten images
2 parents bbaf16d + b9e3cb4 commit c1e06d1

File tree

1,958 files changed

+1234
-20389
lines changed

Some content is hidden

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

1,958 files changed

+1234
-20389
lines changed

guides/v1.10.0/controllers/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ nothing about which (if any) controllers are decorating it, and
8080
controller does not know which views are presenting its properties.
8181

8282
<figure>
83-
<img src="../images/controller-guide/objects.png">
83+
<img src="/images/controller-guide/objects.png">
8484
</figure>
8585

8686
This also means that as far as a template is concerned, all of its

guides/v1.10.0/getting-started/planning-the-application.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TodoMVC, despite its small size, contains most of the behaviors typical in modern single page applications. Before continuing, take a moment to understand how TodoMVC works from the user's perspective.
22

33
TodoMVC has the following main features:
4-
<img src="../images/todo-mvc.png" width="680">
4+
<img src="/images/todo-mvc.png" width="680">
55

66
1. It displays a list of todos for a user to see. This list will grow and shrink as the user adds and removes todos.
77

guides/v1.10.0/models/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ adapter. Your adapter will go and retrieve the record from your
209209
persistence layer; typically, this will be a JSON representation of the
210210
record served from an HTTP server.
211211

212-
![Diagram showing process for finding an unloaded record](../images/guides/models/finding-unloaded-record-step1-diagram.png)
212+
![Diagram showing process for finding an unloaded record](/images/models/finding-unloaded-record-step1-diagram.png)
213213

214214
As illustrated in the diagram above, the adapter cannot always return the
215215
requested record immediately. In this case, the adapter must make an
@@ -228,12 +228,12 @@ The store then takes that JSON, initializes the record with the
228228
JSON data, and resolves the promise returned to your application
229229
with the newly-loaded record.
230230

231-
![Diagram showing process for finding an unloaded record after the payload has returned from the server](../images/guides/models/finding-unloaded-record-step2-diagram.png)
231+
![Diagram showing process for finding an unloaded record after the payload has returned from the server](/images/models/finding-unloaded-record-step2-diagram.png)
232232

233233
Let's look at what happens if you request a record that the store
234234
already has in its cache.
235235

236-
![Diagram showing process for finding an unloaded record after the payload has returned from the server](../images/guides/models/finding-loaded-record-diagram.png)
236+
![Diagram showing process for finding an unloaded record after the payload has returned from the server](/images/models/finding-loaded-record-diagram.png)
237237

238238
In this case, because the store already knew about the record, it
239239
returns a promise that it resolves with the record immediately. It does

guides/v1.10.0/routing/link-to-router-flow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ App.Router.map(function() {
2323
This would mean there are currently three nested active routes in this
2424
application. The `ApplicationRoute`, `AboutRoute` and the `AboutFaqRoute`.
2525

26-
<img src="../images/guides/routing/active-route.png" alt="Active route" class="highlight">
26+
<img src="/images/guides/routing/active-route.png" alt="Active route" class="highlight">
2727

2828
Lets assume a user clicks on a `link-to` for the `UserProfileRoute` like
2929
the one below.
@@ -48,7 +48,7 @@ Next Ember will trigger a `willTransition` action on the currently
4848
active routes starting with the leaf-most route (in this example the
4949
`AboutFaqRoute`).
5050

51-
<img src="../images/guides/routing/willtransition-event.png" alt="Active route" class="highlight">
51+
<img src="/images/guides/routing/willtransition-event.png" alt="Active route" class="highlight">
5252

5353
The argument for the `willTransition` action is the transition
5454
object. This gives each active route, the opportunity to decide
@@ -89,7 +89,7 @@ as well as allow for any of the
8989
hooks to reject elsewhere. If any of these hooks return a promise, the
9090
transition will pause until the promise resolves/rejects.
9191

92-
<img src="../images/guides/routing/route-model-validation.png" alt="Active route" class="highlight">
92+
<img src="/images/guides/routing/route-model-validation.png" alt="Active route" class="highlight">
9393

9494
If the promise rejects, and `error` action is triggered from the
9595
erroring route and upwards with the rejected/thrown error. Calling
@@ -107,7 +107,7 @@ routes and
107107
[setup](http://emberjs.com/api/classes/Ember.Route.html#method_setup)
108108
on the newly entered routes.
109109

110-
<img src="../images/guides/routing/sync-phase.png" alt="Active route" class="highlight">
110+
<img src="/images/guides/routing/sync-phase.png" alt="Active route" class="highlight">
111111

112112
If any errors are thrown, the transition promise will be rejected and
113113
the `error` action will be triggered from the erroring route and

guides/v1.10.0/templates/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ When an action is triggered, but no matching action handler is
117117
implemented on the controller, the current route, or any of the
118118
current route's ancestors, an error will be thrown.
119119

120-
![Action Bubbling](../images/template-guide/action-bubbling.png)
120+
![Action Bubbling](/images/template-guide/action-bubbling.png)
121121

122122
This allows you to create a button that has different behavior based on
123123
where you are in the application. For example, you might want to have a

guides/v1.10.0/understanding-ember-data/record-lifecycle.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@ When you request a record using `Person.find(1)`, Ember Data will ask
2929
the store to find the record (`store.find(Person, 1)`).
3030

3131
<figure>
32-
<img src="../images/ember-data-guide/step1.png">
32+
<img src="/images/ember-data-guide/step1.png">
3333
</figure>
3434

3535
If the adapter has not already loaded the record into the store, the
3636
store will ask the adapter to fetch it.
3737

3838
<figure>
39-
<img src="../images/ember-data-guide/step2.png">
39+
<img src="/images/ember-data-guide/step2.png">
4040
</figure>
4141

4242
Since the adapter's request is asynchronous, the store will return a new
4343
`Person` instance immediately. At this point, the record has no backing
4444
data.
4545

4646
<figure>
47-
<img src="../images/ember-data-guide/step3.png">
47+
<img src="/images/ember-data-guide/step3.png">
4848
</figure>
4949

5050
## Step 2: Adapter Loads Data Into the Store
5151

5252
At some point later, the server will return some data to the adapter.
5353

5454
<figure>
55-
<img src="../images/ember-data-guide/step5.png">
55+
<img src="/images/ember-data-guide/step5.png">
5656
</figure>
5757

5858
Once the adapter receives the data hash, it loads it into the store.
@@ -63,7 +63,7 @@ This will, in turn, notify all attributes (`DS.attr`) and relationships
6363
(`DS.hasMany` and `DS.belongsTo`).
6464

6565
<figure>
66-
<img src="../images/ember-data-guide/step6.png">
66+
<img src="/images/ember-data-guide/step6.png">
6767
</figure>
6868

6969
## Step 3: Getting an Attribute
@@ -83,7 +83,7 @@ data hash loads in from the server, the registered observer will call
8383
`person.get('firstName')`.
8484

8585
<figure>
86-
<img src="../images/ember-data-guide/step7.png">
86+
<img src="/images/ember-data-guide/step7.png">
8787
</figure>
8888

8989
## Step 4: Materialization
@@ -92,15 +92,15 @@ Because this is the first time the record needs its backend-provided
9292
data, it will ask the store to load it in using `materializeData`.
9393

9494
<figure>
95-
<img src="../images/ember-data-guide/step8.png">
95+
<img src="/images/ember-data-guide/step8.png">
9696
</figure>
9797

9898
The store will, in turn, ask the adapter to materialize the data. This
9999
allows the adapter to apply adapter-specific mappings to the
100100
backend-provided data hash.
101101

102102
<figure>
103-
<img src="../images/ember-data-guide/step9.png">
103+
<img src="/images/ember-data-guide/step9.png">
104104
</figure>
105105

106106
Finally, the adapter asks its serializer object to perform the
@@ -110,27 +110,27 @@ backend-provided data hashes into records, and serializing records into
110110
JSON hashes for the backend.
111111

112112
<figure>
113-
<img src="../images/ember-data-guide/step10.png">
113+
<img src="/images/ember-data-guide/step10.png">
114114
</figure>
115115

116116
The serializer is now responsible for extracting the information from
117117
the backend-provided data hash and hydrating the record object. First,
118118
it populates the record's `id`.
119119

120120
<figure>
121-
<img src="../images/ember-data-guide/step11.png">
121+
<img src="/images/ember-data-guide/step11.png">
122122
</figure>
123123

124124
Next, it populates the record's attributes.
125125

126126
<figure>
127-
<img src="../images/ember-data-guide/step12.png">
127+
<img src="/images/ember-data-guide/step12.png">
128128
</figure>
129129

130130
Finally, it populates the `belongsTo` association.
131131

132132
<figure>
133-
<img src="../images/ember-data-guide/step13.png">
133+
<img src="/images/ember-data-guide/step13.png">
134134
</figure>
135135

136136
Once the adapter finishes materializing the record, it returns the
@@ -164,7 +164,7 @@ template would look something like this:
164164
{{#if isLoaded}}
165165
<p>{{name}}</p>
166166
{{else}}
167-
<img src="../images/spinner.gif">
167+
<img src="/images/spinner.gif">
168168
{{/if}}
169169
```
170170

guides/v1.10.0/understanding-ember/the-view-layer.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In a typical client-side application, views may represent elements nested inside
2121
Here is a simple example, representing one main app view, a collection nested inside of it, and individual items nested inside of the collection.
2222

2323
<figure>
24-
<img src="../../images/view-guide/view-hierarchy-simple.png">
24+
<img src="/images/view-guide/view-hierarchy-simple.png">
2525
</figure>
2626

2727
This system works well at first glance, but imagine that we want to open Joe's Lamprey Shack at 8am instead of 9am. In this situation, we will want to re-render the App View. Because the developer needed to build up the references to the children on an ad-hoc basis, this re-rendering process has several problems.
@@ -31,7 +31,7 @@ In order to re-render the App View, the App View must also manually re-render th
3131
In order to avoid these problems, Ember's view hierarchy has the concept of child views baked in.
3232

3333
<figure>
34-
<img src="../../images/view-guide/view-hierarchy-ember.png">
34+
<img src="/images/view-guide/view-hierarchy-ember.png">
3535
</figure>
3636

3737
When the App View re-renders, Ember is responsible for re-rendering and inserting the child views, not application code. This also means that Ember can perform any memory management for you, such as cleaning up observers and bindings.
@@ -45,13 +45,13 @@ In the past, web developers have added event listeners to individual elements in
4545
However, this approach often does not scale when dealing with large numbers of interactive elements. For example, imagine a `<ul>` with 100 `<li>`s in it, with a delete button next to each item. Since the behavior is the same for all of these items, it would be inefficient to create 100 event listeners, one for each delete button.
4646

4747
<figure>
48-
<img src="../../images/view-guide/undelegated.png">
48+
<img src="/images/view-guide/undelegated.png">
4949
</figure>
5050

5151
To solve this problem, developers discovered a technique called "event delegation". Instead of registering a listener on each element in question, you can register a single listener for the containing element and use `event.target` to identify which element the user clicked on.
5252

5353
<figure>
54-
<img src="../../images/view-guide/delegated.png">
54+
<img src="/images/view-guide/delegated.png">
5555
</figure>
5656

5757
Implementing this is a bit tricky, because some events (like `focus`, `blur` and `change`) don't bubble. Fortunately, jQuery has solved this problem thoroughly; using jQuery's `on` method reliably works for all native browser events.
@@ -75,7 +75,7 @@ While the process of displaying a template is automatic for developers, under th
7575
This is the approximate lifecycle of an Ember view:
7676

7777
<figure>
78-
<img src="../../images/view-guide/view-lifecycle-ember.png">
78+
<img src="/images/view-guide/view-lifecycle-ember.png">
7979
</figure>
8080

8181
##### 1. Template Compilation
@@ -99,7 +99,7 @@ Once the main view has finished rendering, the render process has created a tree
9999
Here is a simple example:
100100

101101
<figure>
102-
<img src="../../images/view-guide/render-buffer.png">
102+
<img src="/images/view-guide/render-buffer.png">
103103
</figure>
104104

105105
In addition to children (Strings and other `RenderBuffer`s), a `RenderBuffer` also encapsulates the element's tag name, id, classes, style, and other attributes. This makes it possible for the render process to modify one of these properties (style, for example), even after its child Strings have rendered. Because many of these properties are controlled via bindings (e.g. using `bind-attr`), this makes the process robust and transparent.
@@ -130,7 +130,7 @@ In addition to these cases, the application may sometimes want to explicitly re-
130130
The process looks something like:
131131

132132
<figure>
133-
<img src="../../images/view-guide/re-render.png">
133+
<img src="/images/view-guide/re-render.png">
134134
</figure>
135135

136136
### The View Hierarchy
@@ -156,7 +156,7 @@ var view = Ember.View.create({
156156
This will create a small view hierarchy that looks like this:
157157

158158
<figure>
159-
<img src="../../images/view-guide/simple-view-hierarchy.png">
159+
<img src="/images/view-guide/simple-view-hierarchy.png">
160160
</figure>
161161

162162
You can move around in the view hierarchy using the `parentView` and `childViews` properties.
@@ -227,14 +227,14 @@ please use the form below to submit a complaint to the FDA.
227227
Rendering this template would create a hierarchy like this:
228228

229229
<figure>
230-
<img src="../../images/view-guide/public-view-hierarchy.png">
230+
<img src="/images/view-guide/public-view-hierarchy.png">
231231
</figure>
232232

233233
Behind the scenes, Ember tracks additional virtual views for the
234234
Handlebars expressions:
235235

236236
<figure>
237-
<img src="../../images/view-guide/virtual-view-hierarchy.png">
237+
<img src="/images/view-guide/virtual-view-hierarchy.png">
238238
</figure>
239239

240240
From inside of the `TextArea`, the `parentView` would point to the
@@ -445,7 +445,7 @@ Calling `appendChild` does two things:
445445
buffer.
446446

447447
<figure>
448-
<img src="../../images/view-guide/template-appendChild-interaction.png">
448+
<img src="/images/view-guide/template-appendChild-interaction.png">
449449
</figure>
450450

451451
You may not call `appendChild` on a view after it has left the rendering
@@ -534,7 +534,7 @@ is automatically instantiated, if necessary, and added to the
534534
`childViews` array.
535535

536536
<figure>
537-
<img src="../../images/view-guide/container-view-shorthand.png">
537+
<img src="/images/view-guide/container-view-shorthand.png">
538538
</figure>
539539

540540
### Template Scopes

guides/v1.10.0/views/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ application.
1919
For example, imagine you have a list of todo items. Next to each todo is
2020
a button to delete that item:
2121

22-
![Todo List](./images/todo-list.png)
22+
![Todo List](/images/views/todo-list.png)
2323

2424
The view is responsible for turning a _primitive event_ (a click) into a
2525
_semantic event_: delete this todo! These semantic events are first sent
@@ -28,4 +28,4 @@ router, which is responsible for reacting to the event based on the
2828
current state of the application.
2929

3030

31-
![Todo List](./images/primitive-to-semantic-event.png)
31+
![Todo List](/images/views/primitive-to-semantic-event.png)

guides/v1.11.0/controllers/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ nothing about which (if any) controllers are decorating it, and
8080
controller does not know which views are presenting its properties.
8181

8282
<figure>
83-
<img src="../images/controller-guide/objects.png">
83+
<img src="/images/controller-guide/objects.png">
8484
</figure>
8585

8686
This also means that as far as a template is concerned, all of its

guides/v1.11.0/models/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ adapter. Your adapter will go and retrieve the record from your
206206
persistence layer; typically, this will be a JSON representation of the
207207
record served from an HTTP server.
208208

209-
![Diagram showing process for finding an unloaded record](../images/guides/models/finding-unloaded-record-step1-diagram.png)
209+
![Diagram showing process for finding an unloaded record](/images/models/finding-unloaded-record-step1-diagram.png)
210210

211211
As illustrated in the diagram above, the adapter cannot always return the
212212
requested record immediately. In this case, the adapter must make an
@@ -225,12 +225,12 @@ The store then takes that JSON, initializes the record with the
225225
JSON data, and resolves the promise returned to your application
226226
with the newly-loaded record.
227227

228-
![Diagram showing process for finding an unloaded record after the payload has returned from the server](../images/guides/models/finding-unloaded-record-step2-diagram.png)
228+
![Diagram showing process for finding an unloaded record after the payload has returned from the server](/images/models/finding-unloaded-record-step2-diagram.png)
229229

230230
Let's look at what happens if you request a record that the store
231231
already has in its cache.
232232

233-
![Diagram showing process for finding an unloaded record after the payload has returned from the server](../images/guides/models/finding-loaded-record-diagram.png)
233+
![Diagram showing process for finding an unloaded record after the payload has returned from the server](/images/models/finding-loaded-record-diagram.png)
234234

235235
In this case, because the store already knew about the record, it
236236
returns a promise that it resolves with the record immediately. It does

0 commit comments

Comments
 (0)