Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
13646fc
created new menu group
mandarini Dec 10, 2018
9bd484c
added courses pages
mandarini Dec 10, 2018
a334066
fixed routes
mandarini Dec 10, 2018
d8a6457
separate files and ui
mandarini Dec 10, 2018
f3da9a2
beginner images
mandarini Dec 10, 2018
4e62130
another section
mandarini Dec 10, 2018
03b476c
another section
mandarini Dec 10, 2018
f891693
two more sections
mandarini Dec 10, 2018
3d2ea66
appendix
mandarini Dec 10, 2018
2ff319c
typo
mandarini Dec 10, 2018
89b3287
added prev next buttons to link all together
mandarini Dec 10, 2018
ed8bfda
cleaned up
mandarini Dec 10, 2018
dc97cf3
typos
mandarini Dec 10, 2018
913af07
more typos
mandarini Dec 10, 2018
55e60e3
embedding a glitch
mandarini Dec 10, 2018
4d9d4a5
table
mandarini Dec 10, 2018
787e512
playing around with some styles
mandarini Dec 10, 2018
04a32fd
two level menu
mandarini Dec 10, 2018
603e87b
langing page
mandarini Feb 18, 2019
01ed3a3
changes
mandarini Feb 18, 2019
d6f5e63
created new menu group
mandarini Dec 10, 2018
a6f8f94
added courses pages
mandarini Dec 10, 2018
e692668
fixed routes
mandarini Dec 10, 2018
c5540c0
separate files and ui
mandarini Dec 10, 2018
9a834bd
beginner images
mandarini Dec 10, 2018
8c88a09
another section
mandarini Dec 10, 2018
a8ac81a
another section
mandarini Dec 10, 2018
088eccc
two more sections
mandarini Dec 10, 2018
356e49d
appendix
mandarini Dec 10, 2018
c33a8b0
typo
mandarini Dec 10, 2018
4156dab
added prev next buttons to link all together
mandarini Dec 10, 2018
85972c3
cleaned up
mandarini Dec 10, 2018
3584173
typos
mandarini Dec 10, 2018
e2a1ed2
more typos
mandarini Dec 10, 2018
3ec6fa2
embedding a glitch
mandarini Dec 10, 2018
778d7c8
table
mandarini Dec 10, 2018
a857d75
playing around with some styles
mandarini Dec 10, 2018
b9b7ab6
two level menu
mandarini Dec 10, 2018
67e4bbc
langing page
mandarini Feb 18, 2019
22e18ac
changes
mandarini Feb 18, 2019
01c8ecc
Merge branch 'katerina/drafts' of github.com:mandarini/docs into kate…
mandarini Feb 18, 2019
29ab196
package json
mandarini Feb 18, 2019
17f0f5f
new images
mandarini Feb 18, 2019
a70d53c
new images
mandarini Feb 18, 2019
6d76586
new docs finally
mandarini Feb 18, 2019
166b78d
finished two first parts
mandarini Feb 18, 2019
b04129c
more things
mandarini Feb 18, 2019
4dcb13e
first amp page page done
mandarini Feb 18, 2019
97202fd
thingking
mandarini Feb 18, 2019
bbe2ec9
even one more section
mandarini Feb 18, 2019
83e7dd4
appendix too
mandarini Feb 18, 2019
b1e5ad4
some corrections
mandarini Feb 18, 2019
c478087
deleted draft page
mandarini Feb 18, 2019
09163d9
Merge branch 'future' into katerina/drafts
mandarini Mar 7, 2019
5b7be99
added proper tutorial buttons
mandarini Mar 7, 2019
ae210c7
creating links
mandarini Mar 7, 2019
0c3cf89
new urls
mandarini Mar 7, 2019
e3a2327
more links changes
mandarini Mar 7, 2019
e29535a
removed exercises
mandarini Mar 7, 2019
97064f5
new changes
mandarini Mar 7, 2019
e0aafba
menus in intermediate and advanced
mandarini Mar 7, 2019
e58ca36
some more files
mandarini Mar 7, 2019
911ea4d
Merge branch 'future' into kat/draft
mandarini Mar 7, 2019
9be5ebc
Merge branch 'future' into kat/draft
mandarini Mar 14, 2019
5eea351
added intermediate course images
mandarini Mar 14, 2019
09c03a6
deleted unnecessary file
mandarini Mar 14, 2019
917254e
removed one more unnecessary file
mandarini Mar 14, 2019
0f5c255
removed more unnecessary files
mandarini Mar 14, 2019
037b8f1
second chapter of intermediate cours
mandarini Mar 14, 2019
30ffee1
scaffolding
mandarini Mar 14, 2019
0d2aa65
scaffold complete
mandarini Mar 14, 2019
a9e10b4
basic things added
mandarini Mar 14, 2019
a9b6c1d
added advanced course images
mandarini Mar 14, 2019
9f566af
Merge remote-tracking branch 'upstream/future' into future
mandarini Mar 15, 2019
81693fa
second chapter of intermediate cours
mandarini Mar 14, 2019
6c8172b
scaffolding
mandarini Mar 14, 2019
caff75a
scaffold complete
mandarini Mar 14, 2019
435cf02
basic things added
mandarini Mar 14, 2019
2bca353
added advanced course images
mandarini Mar 14, 2019
91b35f7
Merge branch 'katerina' of github.com:mandarini/docs into katerina
mandarini Mar 15, 2019
4d2477e
updating intermediate
mandarini Mar 15, 2019
6b16d14
save
mandarini Mar 15, 2019
a098e02
mustache causing problem
mandarini Mar 15, 2019
ffe3834
one more section of intermediate
mandarini Mar 15, 2019
48dd65c
intermediate training ok
mandarini Mar 15, 2019
3a52e50
new image
mandarini Mar 15, 2019
aa919e6
intro to advanced
mandarini Mar 15, 2019
97a363e
next section of advanced course
mandarini Mar 15, 2019
0d20f6d
restored deleted page
mandarini Mar 18, 2019
616a55f
removed unnecessary files
mandarini Mar 18, 2019
9b7eb95
removed file
mandarini Mar 19, 2019
4e78608
one extra section
mandarini Mar 19, 2019
236bef8
one more advanced section
mandarini Mar 19, 2019
7a0892a
advanced course done
mandarini Mar 19, 2019
c666ec1
images
mandarini Mar 20, 2019
1c01530
beginners images ok
mandarini Mar 20, 2019
da6e754
intermediate images
mandarini Mar 20, 2019
9b6ca5e
advanced course images
mandarini Mar 20, 2019
8c73da1
merge conflict
mandarini Mar 20, 2019
301be47
course titles
mandarini Mar 20, 2019
707e82a
Merge remote-tracking branch 'upstream/future' into future
morsssss Apr 2, 2019
d618e13
Removed table of contents for any coursework pages that have code sam…
morsssss Apr 2, 2019
b948bc4
Merge remote-tracking branch 'upstream/future' into future
mandarini Apr 5, 2019
ccf2412
Merge branch 'future' of github.com:mandarini/docs into future
mandarini Apr 5, 2019
f27c862
three pages for teachers
mandarini Apr 5, 2019
fdabcaa
all pages work correctly and removed toc to gain space
mandarini Apr 5, 2019
eb836e4
new additions for beginners
mandarini Apr 5, 2019
9b976d0
fixed the structure
mandarini Apr 5, 2019
a38ace1
adding the content
mandarini Apr 5, 2019
7140191
formatting the URLs correctly
mandarini Apr 5, 2019
5e9b060
Restructuring the course navigation
thisdot-robocel Apr 9, 2019
2c9bfb4
Moved courses under Documentation.
morsssss Apr 9, 2019
ae10d15
Updates to the beginner course
thisdot-robocel Apr 10, 2019
1da17aa
Updates to the intermediate course
thisdot-robocel Apr 11, 2019
091fd28
Updates to the advanced course
thisdot-robocel Apr 11, 2019
231acf6
More work on the Courses landing page
morsssss Apr 11, 2019
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
41 changes: 11 additions & 30 deletions package-lock.json

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

1 change: 1 addition & 0 deletions pages/content/amp-dev/documentation/_blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ flyout:
- /content/amp-dev/documentation/examples/index.html
- /content/amp-dev/documentation/templates/index.html
- /content/amp-dev/documentation/tools.html
- /content/amp-dev/documentation/courses/index.html
8 changes: 8 additions & 0 deletions pages/content/amp-dev/documentation/courses/_blueprint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$title@: Web Development With AMP
$path: /documentation/courses/{base}.html
$view: /views/detail/docs-detail.j2

$localization:
path: /{locale}/documentation/courses/{base}.html

$order: 4
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$path: /documentation/courses/advanced-course/{base}.html
$view: /views/detail/docs-detail.j2
$localization:
path: /{locale}/documentation/courses/advanced-course/{base}.html
$title@: Advanced Course
$order: 4

chaptered: true
tutorial: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
$title: Appendix
$order: 4
---

## What is JSON?

`<amp-list>`, `<amp-bind>` and `<amp-state>` can read JSON data. JSON is short for JavaScript Object Notation. It is a "lightweight data-interchange format." Even though it is based on a subset of JavaScript, it is language independent, which means that all languages can read and understand it. JSON data are represented, usually, in two ways: either as a collection of key (name) and value pairs, or as an ordered list of values (what we know as a list or array). The JSON syntax looks usually like this:

[sourcecode:json]
{
"people": {
"number": 2,
"names": ["Alice", "Bob"]
}
}
[/sourcecode]

If you want a full specification, you can look at the [official documentation](https://www.json.org/).

## What is Deep Merge?

We explained that when `AMP.setState()` is called, `<amp-bind>` will "deep-merge the provided object literal with the current state." The deep-merge functionality will not overwrite anything, but will rather merge the two objects. [In the example]({{g.doc('/content/amp-dev/documentation/components/amp-bind.html', locale=doc.locale).url.path}}#deep-merge-with-ampsetstate) on the `<amp-bind>` documentation, we see that providing only an age for the employee will just update the value of the age of the employee in the state.

[sourcecode:html]
{% raw %}<button on="tap:AMP.setState({employee: {name: 'John Smith', age: 47, vehicle: 'Car'}})"...></button>
<button on="tap:AMP.setState({employee: {age: 64}})"...></button>
{% endraw %}[/sourcecode]

The result after the second button is pressed updates the age:

[sourcecode:json]
{
employee: {
name: 'John Smith',
age: 64,
vehicle: 'Car',
}
}
[/sourcecode]

If amp-bind was applying a shallow merge, the result after the second button was pressed would be the following:

[sourcecode:json]
{
employee: {
age: 64,
}
}
[/sourcecode]

A shallow copy would just update the whole structure. Deep merge takes care to add to the state new elements merging existing entries, rather than updating them completely.

## What is Glitch?

To complete the code examples included in these courses, we will be using [Glitch](https://glitch.com/). Glitch is an online code editor that allows you to create and view web sites and server APIs without having to install anything on your computer.

The Glitch code editor environment looks like this:

{{ image('/static/img/courses/intermediate/image12.png', 533, 344, caption='The online editor of Glitch') }}

The red box above is the online editor where you will be inputting HTML and CSS. The green box marks the button that will take you to the live version of the page you are creating. The yellow box is the button that lets you create a copy of this project and edit it. The blue box indicates the files that you have available. In the assets folder, you can find your images.

Throughout these courses, you will need various images to complete the exercises. All of the images you need to complete these courses have already been added to the Glitch projects. To view the images in your project, click on the assets entry in the list of files on the left-hand side of the Glitch editor. To get the link to any single image, select the image from the list of assets on the right-hand side and click the “copy” button next to the URL in the pop-up that appears. You can use that link anywhere an image is needed.

{{ image('/static/img/courses/intermediate/image10.png', 1686, 936, caption='The assets view in Glitch') }}

{{ image('/static/img/courses/intermediate/image9.png', 1484, 1416, caption='The details pop-up -including URL- for an image in the assets collection') }}

Open [this](https://glitch.com/edit/#!/enshrined-eyebrow) project. Click the “Remix This” button on the top right. This will create a new project that you can edit. You can continue to use this same editor for this and future trainings. Each future tutorial will give you the opportunity to start with a reference version of the solution up to that point.

It’s not necessary to use Glitch to complete these trainings. However, some of the code required to complete the exercises is not discussed in these courses, but is contained in the Glitch samples. If you’d like to use another editor, you may still need to go into the Glitch samples to copy the CSS and server code into your local solution.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
$title: Conclusion and What’s Next
$order: 3
---

Congratulations! You’ve completed our series of Web Development with AMP courses! You’ve built a feature-rich cheese bike shop site, an imitation video site, and a basic e-commerce page. You’ve learned how to build AMP pages, look for and use AMP components, handle user interactions with events and actions, build web forms, bind components to state variables, and dynamically display content from the server.

So where do you go from here? It’s time to get out there, keep learning, start creating, and participate in the AMP community!

Most importantly, stay curious. Think about how other popular websites work, and practice building them with AMP. As you build amazing web experiences for others, don’t forget to share what you’ve learned with the rest of the community. Open-source your work where possible, write blog posts, or tell us when you’ve built something you’re proud of. If you hit snags along the way, let us know, because the community will be happy to help you along. Don’t forget to reach back and help others along as well.

Of course, in these courses, we could only cover a portion of AMP’s powerful features. If you’re looking for more learning resources, there are more guides and tutorials available on the [official AMP website]({{g.doc('/content/amp-dev/documentation/guides-and-tutorials/index.html', locale=doc.locale).url.path}}). Additionally, the [AMP examples]({{g.doc('/content/amp-dev/documentation/examples/index.html', locale=doc.locale).url.path}}) section contains many examples of how to build modern websites and tackle common web development problems using AMP. Finally, the AMP library is constantly being developed and improved. Make sure to check back frequently for new features!

Good luck! We look forward to seeing what you build with AMP!

Loading