1
.gitignore
vendored
1
.gitignore
vendored
@ -47,6 +47,7 @@ public/js/iFrameScripts*
|
||||
public/js/plugin*
|
||||
public/js/vendor*
|
||||
public/js/faux*
|
||||
public/js/frame-runner*
|
||||
public/css/main*
|
||||
|
||||
server/rev-manifest.json
|
||||
|
8
.snyk
8
.snyk
@ -31,6 +31,14 @@ patch:
|
||||
patched: '2016-07-20T15:33:26.680Z'
|
||||
- gulp-nodemon > gulp > vinyl-fs > glob-watcher > gaze > globule > glob > minimatch:
|
||||
patched: '2016-07-20T15:33:26.680Z'
|
||||
- gulp-nodemon > gulp > vinyl-fs > glob-stream > minimatch:
|
||||
patched: '2016-07-24T17:05:18.332Z'
|
||||
- gulp-nodemon > gulp > vinyl-fs > glob-stream > glob > minimatch:
|
||||
patched: '2016-07-24T17:05:18.332Z'
|
||||
- gulp-nodemon > gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch:
|
||||
patched: '2016-07-24T17:05:18.332Z'
|
||||
- gulp-nodemon > gulp > vinyl-fs > glob-watcher > gaze > globule > glob > minimatch:
|
||||
patched: '2016-07-24T17:05:18.332Z'
|
||||
'npm:uglify-js:20151024':
|
||||
- jade > transformers > uglify-js:
|
||||
patched: '2016-07-09T00:55:04.882Z'
|
||||
|
279
CONTRIBUTING.md
279
CONTRIBUTING.md
@ -12,39 +12,66 @@
|
||||
- [Common Steps](#common-steps)
|
||||
- [Next Steps](#next-steps)
|
||||
|
||||
## I want to help!
|
||||
### I want to help!
|
||||
|
||||
We welcome pull requests from Free Code Camp campers (our students) and seasoned JavaScript developers alike! Follow these steps to contribute:
|
||||
We welcome pull requests from Free Code Camp campers (our students) and seasoned
|
||||
JavaScript developers alike! Follow these steps to contribute:
|
||||
|
||||
1. Find an issue that needs assistance by searching for the [Help Wanted](https://github.com/FreeCodeCamp/FreeCodeCamp/labels/help%20wanted) tag.
|
||||
|
||||
2. Let us know you are working on it by posting a comment on the issue.
|
||||
3. Feel free to ask for help in our [Help Contributors](https://gitter.im/FreeCodeCamp/HelpContributors) Gitter room.
|
||||
|
||||
3. Feel free to ask for help in our [Help
|
||||
Contributors](https://gitter.im/FreeCodeCamp/HelpContributors) Gitter room.
|
||||
|
||||
If you've found a bug that is not on the board, [follow these steps](#found-a-bug).
|
||||
|
||||
## Contribution Guidelines
|
||||
### Contribution Guidelines
|
||||
|
||||
1. Fork the project: [How To Fork And Maintain a Local Instance of Free Code
|
||||
Camp](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Fork-Local)
|
||||
|
||||
2. Create a branch specific to the issue or feature you are working on. Push
|
||||
your work to that branch. ([Need help with
|
||||
branching?](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches))
|
||||
|
||||
3. Name the branch something like `fix/xxx` or `feature/xxx` where `xxx` is a
|
||||
short description of the changes or feature you are attempting to add. For
|
||||
example `fix/email-login` would be a branch where I fix something specific
|
||||
to email login.
|
||||
|
||||
1. Fork the project: [How To Fork And Maintain a Local Instance of Free Code Camp](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Fork-Local)
|
||||
2. Create a branch specific to the issue or feature you are working on. Push your work to that branch. ([Need help with branching?](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches))
|
||||
3. Name the branch something like `fix/xxx` or `feature/xxx` where `xxx` is a short description of the changes or feature you are attempting to add. For example `fix/email-login` would be a branch where I fix something specific to email login.
|
||||
4. [Set up Linting](#linting-setup) to run as you make changes.
|
||||
5. When you are ready to share your code, run the test suite `npm test` and ensure all tests pass. For Windows contributors, skip the jsonlint pretest run by using `npm run test-challenges`, as jsonlint will always fail on Windows, given the wildcard parameters.
|
||||
5. Squash your Commits. Ref: [rebasing](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/git-rebase)
|
||||
6. Submit a [pull request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute) from your branch to Free Code Camp's `staging` branch. [Travis CI](https://travis-ci.org/FreeCodeCamp/FreeCodeCamp) will then take your code and run `npm test`. Make sure this passes, then we'll do a quick code review and give you feedback, then iterate from there.
|
||||
|
||||
## Prerequisites
|
||||
5. When you are ready to share your code, run the test suite `npm test` and
|
||||
ensure all tests pass. For Windows contributors, skip the jsonlint pretest
|
||||
run by using `npm run test-challenges`, as jsonlint will always fail on
|
||||
Windows, given the wildcard parameters.
|
||||
|
||||
6. Squash your Commits. Ref: [rebasing](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/git-rebase)
|
||||
|
||||
7. Submit a [pull
|
||||
request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute)
|
||||
from your branch to Free Code Camp's `staging` branch. [Travis
|
||||
CI](https://travis-ci.org/FreeCodeCamp/FreeCodeCamp) will then take your
|
||||
code and run `npm test`. Make sure this passes, then we'll do a quick code
|
||||
review and give you feedback, then iterate from there.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
| Prerequisite | Version |
|
||||
|--------------|---------|
|
||||
| ------------------------------------------- | ------- |
|
||||
| [MongoDB](http://www.mongodb.org/downloads) | `~ ^3` |
|
||||
| [Node.js](http://nodejs.org) | `~ ^4` |
|
||||
| npm | `~ ^2` |
|
||||
| npm (comes with Node) | `~ ^2` |
|
||||
|
||||
> _Updating to the latest releases is recomended_.
|
||||
> _Updating to the latest releases is recommended_.
|
||||
|
||||
## Getting Started
|
||||
### Getting Started
|
||||
|
||||
Note: If this is your first time working with a node-gyp dependent module, please follow the [node-gyp installation guide](https://github.com/nodejs/node-gyp#installation) to ensure a working npm build.
|
||||
Note: If this is your first time working with a node-gyp dependent module,
|
||||
please follow the [node-gyp installation
|
||||
guide](https://github.com/nodejs/node-gyp#installation) to ensure a working npm
|
||||
build.
|
||||
|
||||
The easiest way to get started is to clone the repository:
|
||||
|
||||
@ -67,20 +94,30 @@ npm install -g bower
|
||||
# Install Bower dependencies
|
||||
bower install
|
||||
```
|
||||
*Private Environment Variables (API Keys)*
|
||||
|
||||
_Private Environment Variables (API Keys)_
|
||||
|
||||
```bash
|
||||
# Create a copy of the "sample.env" and name it as ".env".
|
||||
# Populate it with the necessary API keys and secrets:
|
||||
cp sample.env .env
|
||||
```
|
||||
|
||||
Edit your `.env` file and modify the API keys only for services that you will use.
|
||||
Edit your `.env` file and modify the API keys only for services that you will
|
||||
use.
|
||||
|
||||
Note : Not all keys are required, to run the app locally, however `MONGOHQ_URL` is the most important one.
|
||||
Note : Not all keys are required, to run the app locally, however `MONGOHQ_URL`
|
||||
is the most important one.
|
||||
|
||||
If you only use email login, in addition to `MONGOHQ_URL`, `SESSION_SECRET`, add the `MANDRILL_USER` and `MANDRILL_PASSWORD` API Keys. Not setting these keys will throw an exception when you sign up which you can ignore, you will still be able to login, however you may get these keys [here](https://www.mandrill.com/signup/). Sign up and create a new pair of keys.
|
||||
If you only use email login, in addition to `MONGOHQ_URL`, `SESSION_SECRET`, add
|
||||
the `MANDRILL_USER` and `MANDRILL_PASSWORD` API Keys. Not setting these keys
|
||||
will throw an exception when you sign up which you can ignore, you will still be
|
||||
able to login, however you may get these keys
|
||||
[here](https://www.mandrill.com/signup/). Sign up and create a new pair of keys.
|
||||
|
||||
You can leave the other keys as they are. Keep in mind if you want to use more services you'll have to get your own API keys for those services and edit those entries accordingly in the `.env` file.
|
||||
You can leave the other keys as they are. Keep in mind if you want to use more
|
||||
services you'll have to get your own API keys for those services and edit those
|
||||
entries accordingly in the `.env` file.
|
||||
|
||||
```bash
|
||||
# Start the mongo server in a separate terminal
|
||||
@ -94,41 +131,72 @@ npm run only-once
|
||||
# start the application
|
||||
gulp
|
||||
```
|
||||
Now navigate to your browser and open http://localhost:3001
|
||||
If the app loads, congratulations - you're all set. Otherwise, let us know by opening a GitHub issue and with your error.
|
||||
|
||||
## Linting Setup
|
||||
Now navigate to your browser and open
|
||||
<http://localhost:3001>. If the app loads,
|
||||
congratulations – you're all set. Otherwise, let us know by opening a GitHub
|
||||
issue and with your error.
|
||||
|
||||
You should have [ESLint running in your editor](http://eslint.org/docs/user-guide/integrations.html), and it will highlight anything doesn't conform to [Free Code Camp's JavaScript Style Guide](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Free-Code-Camp-JavaScript-Style-Guide) (you can find a summary of those rules [here](https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/.eslintrc). Please do not ignore any linting errors, as they are meant to **help** you and to ensure a clean and simple code base. Make sure none of your JavaScript is longer than 80 characters per line. The reason we enforce this is because one of our dependent NPM modules, [jsonlint](https://github.com/zaach/jsonlint), does not fully support wildcard paths in Windows.
|
||||
### Linting Setup
|
||||
|
||||
You should have [ESLint running in your
|
||||
editor](http://eslint.org/docs/user-guide/integrations.html), and it will
|
||||
highlight anything doesn't conform to [Free Code Camp's JavaScript Style
|
||||
Guide](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Free-Code-Camp-JavaScript-Style-Guide)
|
||||
(you can find a summary of those rules
|
||||
[here](https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/.eslintrc).
|
||||
Please do not ignore any linting errors, as they are meant to **help** you and
|
||||
to ensure a clean and simple code base. Make sure none of your JavaScript is
|
||||
longer than 80 characters per line. The reason we enforce this is because one
|
||||
of our dependent NPM modules, [jsonlint](https://github.com/zaach/jsonlint),
|
||||
does not fully support wildcard paths in Windows.
|
||||
|
||||
### Found a bug?
|
||||
|
||||
## Found a bug?
|
||||
Do not file an issue until you have followed these steps:
|
||||
|
||||
1. Read [Help I've Found a Bug](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Report-Bugs) wiki page and follow the instructions there.
|
||||
1. Read [Help I've Found a
|
||||
Bug](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Report-Bugs)
|
||||
wiki page and follow the instructions there.
|
||||
|
||||
2. Asked for confirmation in the appropriate [Help Room](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-Rooms)
|
||||
3. Please *do not* open an issue without a 3rd party confirmation of your problem.
|
||||
|
||||
## Creating Pull Requests
|
||||
**What is a Pull Request?**
|
||||
3. Please _do not_ open an issue without a 3rd party confirmation of your
|
||||
problem.
|
||||
|
||||
A pull request (PR) is a method of submitting proposed changes to the Free Code Camp Repo (or any Repo, for that matter). You will make changes to copies of the files which make up Free Code Camp in a personal fork, then apply to have them accepted by Free Code Camp proper.
|
||||
### Creating Pull Requests
|
||||
|
||||
**Need Help?**
|
||||
#### What is a Pull Request?
|
||||
|
||||
Free Code Camp Issue Mods and staff are on hand to assist with Pull Request related issues on our Help Contributors Chat Room
|
||||
A pull request (PR) is a method of submitting proposed changes to the Free Code
|
||||
Camp Repo (or any Repo, for that matter). You will make changes to copies of the
|
||||
files which make up Free Code Camp in a personal fork, then apply to have them
|
||||
accepted by Free Code Camp proper.
|
||||
|
||||
**Methods**
|
||||
#### Need Help?
|
||||
|
||||
Free Code Camp Issue Mods and staff are on hand to assist with Pull Request
|
||||
related issues on our Help Contributors Chat Room
|
||||
|
||||
#### Methods
|
||||
|
||||
There are two methods of creating a Pull for Free Code Camp:
|
||||
|
||||
- Editing files via the GitHub Interface
|
||||
- Editing files on a local clone
|
||||
|
||||
**Important: ALWAYS EDIT ON A BRANCH**
|
||||
Take away only one thing from this document, it should be this: Never, **EVER** make edits to the `staging` branch. ALWAYS make a new branch BEFORE you edit files. This is critical, because if your PR is not accepted, your copy of staging will be forever sullied and the only way to fix it is to delete your fork and re-fork.
|
||||
#### Important: ALWAYS EDIT ON A BRANCH
|
||||
|
||||
_**Method 1: Editing via your Local Fork (Recommended)**_
|
||||
This is the recommended method. Read about How to Setup and Maintain a Local Instance of Free Code Camp.
|
||||
Take away only one thing from this document, it should be this: Never, **EVER**
|
||||
make edits to the `staging` branch. ALWAYS make a new branch BEFORE you edit
|
||||
files. This is critical, because if your PR is not accepted, your copy of
|
||||
staging will be forever sullied and the only way to fix it is to delete your
|
||||
fork and re-fork.
|
||||
|
||||
##### Method 1: Editing via your Local Fork _(Recommended)_
|
||||
|
||||
This is the recommended method. Read about How to Setup and Maintain a Local
|
||||
Instance of Free Code Camp.
|
||||
|
||||
1. Perform the maintenance step of rebasing `staging`.
|
||||
2. Ensure you are on the `staging` branch using `git status`:
|
||||
@ -141,59 +209,116 @@ Your branch is up-to-date with 'origin/staging'.
|
||||
nothing to commit, working directory clean
|
||||
```
|
||||
|
||||
3. If you are not on staging or your working directory is not clean, resolve any outstanding files/commits and checkout staging `git checkout staging`
|
||||
4. Create a branch off of `staging` with git: `git checkout -B branch/name-here`
|
||||
**Note:** Branch naming is important. Use a name like `fix/short-fix-description` or `feature/short-feature-description`. Review the [Contribution Guidelines](#contribution-guidelines) for more detail.
|
||||
5. Edit your file(s) locally with the editor of your choice
|
||||
6. Check your `git status` to see unstaged files.
|
||||
7. Add your edited files: `git add path/to/filename.ext` You can also do: `git add .` to add all unstaged files. Take care, though, because you can accidentally add files you don't want added. Review your `git status` first.
|
||||
8. Commit your edits: `git commit -m "Brief Description of Commit"`
|
||||
9. Squash your commits, if there are more than one.
|
||||
10. Push your commits to your GitHub Fork: `git push -u origin branch/name-here`
|
||||
11. Go to [Common Steps](#common-steps)
|
||||
1. If you are not on staging or your working directory is not clean, resolve
|
||||
any outstanding files/commits and checkout staging `git checkout staging`
|
||||
|
||||
_**Method 2: Editing via the GitHub Interface**_
|
||||
2. Create a branch off of `staging` with git: `git checkout -B
|
||||
branch/name-here` **Note:** Branch naming is important. Use a name like
|
||||
`fix/short-fix-description` or `feature/short-feature-description`. Review
|
||||
the [Contribution Guidelines](#contribution-guidelines) for more detail.
|
||||
|
||||
Note: Editing via the GitHub Interface is not recommended, since it is not possible to update your fork via GitHub's interface without deleting and recreating your fork.
|
||||
3. Edit your file(s) locally with the editor of your choice
|
||||
|
||||
Read the [Wiki article](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-To-Create-A-Pull-Request-for-Free-Code-Camp#editing-via-the-github-interface) for further information
|
||||
4. Check your `git status` to see unstaged files.
|
||||
|
||||
5. Add your edited files: `git add path/to/filename.ext` You can also do: `git
|
||||
add .` to add all unstaged files. Take care, though, because you can
|
||||
accidentally add files you don't want added. Review your `git status` first.
|
||||
|
||||
6. Commit your edits: `git commit -m "Brief Description of Commit"`
|
||||
|
||||
7. Squash your commits, if there are more than one.
|
||||
|
||||
8. Push your commits to your GitHub Fork: `git push -u origin branch/name-here`
|
||||
|
||||
9. Go to [Common Steps](#common-steps)
|
||||
|
||||
##### Method 2: Editing via the GitHub Interface
|
||||
|
||||
Note: Editing via the GitHub Interface is not recommended, since it is not
|
||||
possible to update your fork via GitHub's interface without deleting and
|
||||
recreating your fork.
|
||||
|
||||
Read the [Wiki
|
||||
article](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-To-Create-A-Pull-Request-for-Free-Code-Camp#editing-via-the-github-interface)
|
||||
for further information
|
||||
|
||||
### Common Steps
|
||||
|
||||
1. Once the edits have been committed, you will be prompted to create a pull
|
||||
request on your fork's GitHub Page.
|
||||
|
||||
2. By default, all pull requests should be against the FCC main repo, `staging`
|
||||
branch.
|
||||
|
||||
3. Submit a [pull
|
||||
request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute)
|
||||
from your branch to Free Code Camp's `staging` branch.
|
||||
|
||||
4. The title (also called the subject) of your PR should be descriptive of your
|
||||
changes and succinctly indicates what is being fixed.
|
||||
|
||||
## Common Steps
|
||||
1. Once the edits have been committed, you will be prompted to create a pull request on your fork's GitHub Page.
|
||||
2. By default, all pull requests should be against the FCC main repo, `staging` branch.
|
||||
3. Submit a [pull request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute) from your branch to Free Code Camp's `staging` branch.
|
||||
3. The title (also called the subject) of your PR should be descriptive of your changes and succinctly indicates what is being fixed.
|
||||
- **Do not add the issue number in the PR title**.
|
||||
- Examples: `Add Test Cases to Bonfire Drop It` `Correct typo in Waypoint Size Your Images`
|
||||
4. In the body of your PR include a more detailed summary of the changes you made and why.
|
||||
- If the PR is meant to fix an existing bug/issue, then, at the end of your PR's description, append the keyword `closes` and #xxxx (where xxxx is the issue number). Example: `closes #1337`.
|
||||
This tells GitHub to close the existing issue, if the PR is merged.
|
||||
5. Indicate if you have tested on a local copy of the site or not.
|
||||
|
||||
## Next Steps
|
||||
- Examples: `Add Test Cases to Bonfire Drop It` `Correct typo in Waypoint
|
||||
Size Your Images`
|
||||
|
||||
**If your PR is accepted**
|
||||
5. In the body of your PR include a more detailed summary of the changes you
|
||||
made and why.
|
||||
|
||||
Once your PR is accepted, you may delete the branch you created to submit it. This keeps your working fork clean.
|
||||
- If the PR is meant to fix an existing bug/issue, then, at the end of
|
||||
your PR's description, append the keyword `closes` and #xxxx (where xxxx
|
||||
is the issue number). Example: `closes #1337`. This tells GitHub to
|
||||
close the existing issue, if the PR is merged.
|
||||
|
||||
You can do this with a press of a button on the GitHub PR interface. You can delete the local copy of the branch with: `git branch -D branch/to-delete-name`
|
||||
6. Indicate if you have tested on a local copy of the site or not.
|
||||
|
||||
**If your PR is rejected**
|
||||
### Next Steps
|
||||
|
||||
Don't despair! You should receive solid feedback from the Issue Moderators as to why it was rejected and what changes are needed.
|
||||
#### If your PR is accepted
|
||||
|
||||
Many Pull Requests, especially first Pull Requests, require correction or updating. If you have used the GitHub interface to create your PR, you will need to close your PR, create a new branch, and re-submit. This is because you cannot squash your commits via the GitHub interface.
|
||||
Once your PR is accepted, you may delete the branch you created to submit it.
|
||||
This keeps your working fork clean.
|
||||
|
||||
If you have a local copy of the repo, you can make the requested changes and amend your commit with: `git commit --amend` This will update your existing commit. When you push it to your fork you will need to do a force push to overwrite your old commit: `git push --force`
|
||||
You can do this with a press of a button on the GitHub PR interface. You can
|
||||
delete the local copy of the branch with: `git branch -D branch/to-delete-name`
|
||||
|
||||
#### If your PR is rejected
|
||||
|
||||
Don't despair! You should receive solid feedback from the Issue Moderators as to
|
||||
why it was rejected and what changes are needed.
|
||||
|
||||
Many Pull Requests, especially first Pull Requests, require correction or
|
||||
updating. If you have used the GitHub interface to create your PR, you will need
|
||||
to close your PR, create a new branch, and re-submit. This is because you cannot
|
||||
squash your commits via the GitHub interface.
|
||||
|
||||
If you have a local copy of the repo, you can make the requested changes and
|
||||
amend your commit with: `git commit --amend` This will update your existing
|
||||
commit. When you push it to your fork you will need to do a force push to
|
||||
overwrite your old commit: `git push --force`
|
||||
|
||||
Be sure to post in the PR conversation that you have made the requested changes.
|
||||
|
||||
## Other resources
|
||||
### Other resources
|
||||
|
||||
- [Searching for Your Issue on GitHub](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Search-Existing-Issues)
|
||||
- [Creating a New GitHub Issue](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Creating-a-New-GitHub-Issue)
|
||||
- [Select Issues for Contributing Using Labels](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Issue-Labels)
|
||||
- [How to clone the FreeCodeCamp website on a Windows pc](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Fork-Windows)
|
||||
- [How to log in to your local FCC site - using GitHub](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Log-In-To-Local-Instance)
|
||||
- [Writing great git commit message](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Git-Commit-Message)
|
||||
- [Contributor Chat Support - For the FCC Repositories, and running a local instance] (https://gitter.im/FreeCodeCamp/HelpContributors)
|
||||
- [Searching for Your Issue on
|
||||
GitHub](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Search-Existing-Issues)
|
||||
|
||||
- [Creating a New GitHub
|
||||
Issue](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Creating-a-New-GitHub-Issue)
|
||||
|
||||
- [Select Issues for Contributing Using
|
||||
Labels](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Issue-Labels)
|
||||
|
||||
- [How to clone the FreeCodeCamp website on a Windows
|
||||
pc](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Fork-Windows)
|
||||
|
||||
- [How to log in to your local FCC site - using
|
||||
GitHub](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/FreeCodeCamp-Log-In-To-Local-Instance)
|
||||
|
||||
- [Writing great git commit
|
||||
message](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Git-Commit-Message)
|
||||
|
||||
- [Contributor Chat Support - For the FCC Repositories, and running a local
|
||||
instance](https://gitter.im/FreeCodeCamp/HelpContributors)
|
||||
|
@ -151,7 +151,7 @@ window.common = (function(global) {
|
||||
}
|
||||
|
||||
$('.modal').on('show.bs.modal', function() {
|
||||
$('.gitter-chat-embed, .wiki-aside, .map-aside')
|
||||
$('.gitter-chat-embed, .map-aside')
|
||||
.addClass('is-collapsed');
|
||||
});
|
||||
|
||||
@ -183,11 +183,10 @@ window.common = (function(global) {
|
||||
|
||||
$('#show-solution').on('click', function() {
|
||||
$('#complete-courseware-dialog').modal('hide');
|
||||
$('#nav-wiki-btn').click();
|
||||
});
|
||||
|
||||
$('#challenge-help-btn').on('click', function() {
|
||||
$('.wiki-aside, .map-aside, #chat-embed-main').addClass('is-collapsed');
|
||||
$('.map-aside, #chat-embed-main').addClass('is-collapsed');
|
||||
});
|
||||
|
||||
$('#help-ive-found-a-bug-wiki-article').on('click', function() {
|
||||
|
@ -68,6 +68,12 @@ window.common = (function(global) {
|
||||
'Cmd-Enter': function() {
|
||||
common.editorExecute$.onNext();
|
||||
return false;
|
||||
},
|
||||
'Ctrl-/': function(cm) {
|
||||
cm.toggleComment();
|
||||
},
|
||||
'Cmd-/': function(cm) {
|
||||
cm.toggleComment();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,7 @@ window.common = (function(global) {
|
||||
* Any console.log() -type
|
||||
* statements will appear in
|
||||
* your browser\'s DevTools
|
||||
* JavaScript console.
|
||||
* JavaScript console as well.
|
||||
*/`);
|
||||
|
||||
codeOutput.setSize('100%', '100%');
|
||||
|
@ -1180,4 +1180,3 @@ and (max-width : 400px) {
|
||||
@import "challenge.less";
|
||||
@import "toastr.less";
|
||||
@import "map.less";
|
||||
@import "wiki.less";
|
||||
|
@ -1,177 +0,0 @@
|
||||
/*
|
||||
* based off of https://github.com/gitterHQ/sidecar
|
||||
* license: MIT
|
||||
*/
|
||||
|
||||
#wikiFrame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wiki-aside {
|
||||
width:500px;
|
||||
|
||||
z-index: 20000;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
flex-direction: row;
|
||||
|
||||
background-color: @body-bg;
|
||||
border-left: 1px solid #ddd;
|
||||
box-shadow: -12px 0 18px 0 rgba(50, 50, 50, 0.1);
|
||||
|
||||
transition: transform 0.3s cubic-bezier(0.16, 0.22, 0.22, 1.7);
|
||||
|
||||
&.is-collapsed:not(.is-loading) {
|
||||
-webkit-transform: translateX(110%);
|
||||
transform: translateX(110%);
|
||||
}
|
||||
|
||||
/* Add some "extension" so that there isn't a gap
|
||||
* when we translate(via animation) more than 100% */
|
||||
&:after {
|
||||
content: '';
|
||||
|
||||
z-index: -1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
bottom: 0;
|
||||
right: -100%;
|
||||
|
||||
background-color: @body-bg;
|
||||
}
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top:0;
|
||||
bottom:0;
|
||||
position:absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.wiki-aside .wiki-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wiki-aside .wiki-container {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.wiki-aside .wikiSelector {
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
.wiki-aside-action-bar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 15px;
|
||||
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
padding-bottom: 5px;
|
||||
padding-right:0px;
|
||||
padding-top:5px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.wiki-fixed-header {
|
||||
background: linear-gradient(180deg,#fff 0,#fff 70%,hsla(0,0%,100%,0));
|
||||
padding: 5px 0 18px 0;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@media (max-width: 720px) {
|
||||
padding-top:30px;
|
||||
}
|
||||
p {
|
||||
margin: 5px 0 20px;
|
||||
@media (max-width: 720px) {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
}
|
||||
hr {
|
||||
margin:30px 0;
|
||||
@media (max-width: 720px) {
|
||||
margin:25px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wiki-buttons {
|
||||
margin-top: -10px;
|
||||
& button,
|
||||
& .input-group{
|
||||
width:300px;
|
||||
}
|
||||
.input-group{
|
||||
margin-top: 15px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
#wiki-filter {
|
||||
background:#fff;
|
||||
border-color: darkgreen;
|
||||
}
|
||||
|
||||
.wiki-aside-action-item {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
/* main axis */
|
||||
justify-content: center;
|
||||
/* cross axis */
|
||||
align-items: center;
|
||||
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
|
||||
opacity: 0.65;
|
||||
background: none;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 22px 22px;
|
||||
border: 0;
|
||||
outline: none;
|
||||
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:active {
|
||||
filter: hue-rotate(80deg) saturate(150);
|
||||
}
|
||||
}
|
||||
|
||||
.wiki-aside-action-pop-out {
|
||||
margin-right: -4px;
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMTcxLjQyOSIgZmlsbD0iIzNhMzEzMyI+PHBhdGggZD0iTTE1Ny4xNDMsMTAzLjU3MXYzNS43MTRjMCw4Ljg1NC0zLjE0NCwxNi40MjYtOS40MzEsMjIuNzEzcy0xMy44NTgsOS40MzEtMjIuNzEyLDkuNDMxSDMyLjE0MyBjLTguODU0LDAtMTYuNDI1LTMuMTQ0LTIyLjcxMi05LjQzMVMwLDE0OC4xNCwwLDEzOS4yODVWNDYuNDI5YzAtOC44NTQsMy4xNDQtMTYuNDI1LDkuNDMxLTIyLjcxMiBjNi4yODctNi4yODcsMTMuODU4LTkuNDMxLDIyLjcxMi05LjQzMWg3OC41NzJjMS4wNDEsMCwxLjg5NiwwLjMzNSwyLjU2NiwxLjAwNGMwLjY3LDAuNjcsMS4wMDQsMS41MjUsMS4wMDQsMi41NjdWMjUgYzAsMS4wNDItMC4zMzQsMS44OTctMS4wMDQsMi41NjdjLTAuNjcsMC42Ny0xLjUyNSwxLjAwNC0yLjU2NiwxLjAwNEgzMi4xNDNjLTQuOTExLDAtOS4xMTUsMS43NDktMTIuNjEyLDUuMjQ2IHMtNS4yNDYsNy43MDEtNS4yNDYsMTIuNjEydjkyLjg1NmMwLDQuOTExLDEuNzQ5LDkuMTE1LDUuMjQ2LDEyLjYxMnM3LjcwMSw1LjI0NSwxMi42MTIsNS4yNDVIMTI1YzQuOTEsMCw5LjExNS0xLjc0OCwxMi42MTEtNS4yNDUgYzMuNDk3LTMuNDk3LDUuMjQ2LTcuNzAxLDUuMjQ2LTEyLjYxMnYtMzUuNzE0YzAtMS4wNDIsMC4zMzQtMS44OTcsMS4wMDQtMi41NjdjMC42Ny0wLjY2OSwxLjUyNS0xLjAwNCwyLjU2Ny0xLjAwNGg3LjE0MyBjMS4wNDIsMCwxLjg5NywwLjMzNSwyLjU2NywxLjAwNEMxNTYuODA5LDEwMS42NzQsMTU3LjE0MywxMDIuNTI5LDE1Ny4xNDMsMTAzLjU3MXogTTIwMCw3LjE0M3Y1Ny4xNDMgYzAsMS45MzUtMC43MDcsMy42MDktMi4xMjEsNS4wMjJjLTEuNDEzLDEuNDE0LTMuMDg4LDIuMTIxLTUuMDIxLDIuMTIxYy0xLjkzNSwwLTMuNjA5LTAuNzA3LTUuMDIyLTIuMTIxbC0xOS42NDQtMTkuNjQzIGwtNzIuNzY3LDcyLjc2OWMtMC43NDQsMC43NDQtMS42LDEuMTE1LTIuNTY3LDEuMTE1cy0xLjgyMy0wLjM3MS0yLjU2Ny0xLjExNUw3Ny41NjcsMTA5LjcxYy0wLjc0NC0wLjc0NC0xLjExNi0xLjYtMS4xMTYtMi41NjcgYzAtMC45NjcsMC4zNzItMS44MjIsMS4xMTYtMi41NjZsNzIuNzY4LTcyLjc2OGwtMTkuNjQ0LTE5LjY0M2MtMS40MTMtMS40MTQtMi4xMi0zLjA4OC0yLjEyLTUuMDIyYzAtMS45MzUsMC43MDctMy42MDksMi4xMi01LjAyMiBDMTMyLjEwNSwwLjcwNywxMzMuNzc5LDAsMTM1LjcxNSwwaDU3LjE0M2MxLjkzNCwwLDMuNjA4LDAuNzA3LDUuMDIxLDIuMTIxQzE5OS4yOTMsMy41MzQsMjAwLDUuMjA4LDIwMCw3LjE0M3oiLz48L3N2Zz4=)
|
||||
}
|
||||
|
||||
.wiki-aside-action-collapse {
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNzEuNDI5IDE3MS40MjkiIGZpbGw9IiMzYTMxMzMiPjxwYXRoIGQ9Ik0xMjIuNDMzLDEwNi4xMzhsLTE2LjI5NSwxNi4yOTVjLTAuNzQ0LDAuNzQ0LTEuNiwxLjExNi0yLjU2NiwxLjExNmMtMC45NjgsMC0xLjgyMy0wLjM3Mi0yLjU2Ny0xLjExNmwtMTUuMjktMTUuMjkgbC0xNS4yOSwxNS4yOWMtMC43NDQsMC43NDQtMS42LDEuMTE2LTIuNTY3LDEuMTE2cy0xLjgyMy0wLjM3Mi0yLjU2Ny0xLjExNmwtMTYuMjk0LTE2LjI5NWMtMC43NDQtMC43NDQtMS4xMTYtMS42LTEuMTE2LTIuNTY2IGMwLTAuOTY4LDAuMzcyLTEuODIzLDEuMTE2LTIuNTY3bDE1LjI5LTE1LjI5bC0xNS4yOS0xNS4yOWMtMC43NDQtMC43NDQtMS4xMTYtMS42LTEuMTE2LTIuNTY3czAuMzcyLTEuODIzLDEuMTE2LTIuNTY3IEw2NS4yOSw0OC45OTZjMC43NDQtMC43NDQsMS42LTEuMTE2LDIuNTY3LTEuMTE2czEuODIzLDAuMzcyLDIuNTY3LDEuMTE2bDE1LjI5LDE1LjI5bDE1LjI5LTE1LjI5IGMwLjc0NC0wLjc0NCwxLjYtMS4xMTYsMi41NjctMS4xMTZjMC45NjcsMCwxLjgyMiwwLjM3MiwyLjU2NiwxLjExNmwxNi4yOTUsMTYuMjk0YzAuNzQ0LDAuNzQ0LDEuMTE2LDEuNiwxLjExNiwyLjU2NyBzLTAuMzcyLDEuODIzLTEuMTE2LDIuNTY3bC0xNS4yOSwxNS4yOWwxNS4yOSwxNS4yOWMwLjc0NCwwLjc0NCwxLjExNiwxLjYsMS4xMTYsMi41NjcgQzEyMy41NDksMTA0LjUzOSwxMjMuMTc3LDEwNS4zOTQsMTIyLjQzMywxMDYuMTM4eiBNMTQ2LjQyOSw4NS43MTRjMC0xMS4wMTItMi43MTctMjEuMTY4LTguMTQ4LTMwLjQ2OSBzLTEyLjc5Ny0xNi42NjctMjIuMDk4LTIyLjA5OFM5Ni43MjYsMjUsODUuNzE0LDI1cy0yMS4xNjgsMi43MTYtMzAuNDY5LDguMTQ3UzM4LjU3OSw0NS45NDUsMzMuMTQ3LDU1LjI0NlMyNSw3NC43MDMsMjUsODUuNzE0IHMyLjcxNiwyMS4xNjgsOC4xNDcsMzAuNDY5czEyLjc5NywxNi42NjYsMjIuMDk4LDIyLjA5OHMxOS40NTcsOC4xNDgsMzAuNDY5LDguMTQ4czIxLjE2OC0yLjcxNywzMC40NjktOC4xNDggczE2LjY2Ni0xMi43OTcsMjIuMDk4LTIyLjA5OFMxNDYuNDI5LDk2LjcyNiwxNDYuNDI5LDg1LjcxNHogTTE3MS40MjksODUuNzE0YzAsMTUuNTUxLTMuODMyLDI5Ljg5My0xMS40OTYsNDMuMDI0IGMtNy42NjQsMTMuMTMzLTE4LjA2MiwyMy41My0zMS4xOTQsMzEuMTk0Yy0xMy4xMzIsNy42NjQtMjcuNDc0LDExLjQ5Ni00My4wMjQsMTEuNDk2cy0yOS44OTItMy44MzItNDMuMDI0LTExLjQ5NiBjLTEzLjEzMy03LjY2NC0yMy41MzEtMTguMDYyLTMxLjE5NC0zMS4xOTRDMy44MzIsMTE1LjYwNywwLDEwMS4yNjUsMCw4NS43MTRTMy44MzIsNTUuODIyLDExLjQ5Niw0Mi42OSBjNy42NjQtMTMuMTMzLDE4LjA2Mi0yMy41MzEsMzEuMTk0LTMxLjE5NEM1NS44MjIsMy44MzIsNzAuMTY0LDAsODUuNzE0LDBzMjkuODkzLDMuODMyLDQzLjAyNCwxMS40OTYgYzEzLjEzMyw3LjY2NCwyMy41MywxOC4wNjIsMzEuMTk0LDMxLjE5NEMxNjcuNTk3LDU1LjgyMiwxNzEuNDI5LDcwLjE2NCwxNzEuNDI5LDg1LjcxNHoiLz48L3N2Zz4=)
|
||||
}
|
@ -327,89 +327,6 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
$('#nav-wiki-btn').on('click', function(event) {
|
||||
if (!(event.ctrlKey || event.metaKey)) {
|
||||
toggleWiki();
|
||||
}
|
||||
});
|
||||
|
||||
$('.wiki-aside-action-collapse').on('click', collapseWiki);
|
||||
|
||||
function getWikiPath() {
|
||||
if (!window.common) {
|
||||
return false;
|
||||
}
|
||||
var challengeType = window.common.challengeType;
|
||||
var dashedName = window.common.dashedName;
|
||||
var prefix = '';
|
||||
// Get wiki prefix depending on type of challenge
|
||||
// Type 0, 1 typically have solutions on the wiki prefixed with 'challenge-'
|
||||
// Type 5 typically has a solution on the wiki prefixed with algorithm-'
|
||||
if (challengeType === '0' || challengeType === '1') {
|
||||
prefix = 'challenge-';
|
||||
return prefix + dashedName;
|
||||
}
|
||||
if (challengeType === '5') {
|
||||
prefix = 'algorithm-';
|
||||
return prefix + dashedName;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function showWiki() {
|
||||
if (!main.isWikiAsideLoad) {
|
||||
var wikiURL = '//freecodecamp.github.io/wiki/en/';
|
||||
var lang = window.location.toString().match(/\/\w{2}\//);
|
||||
lang = (lang) ? lang[0] : '/en/';
|
||||
var wikiPath = getWikiPath();
|
||||
if (wikiPath) {
|
||||
wikiURL = wikiURL + wikiPath + '/';
|
||||
} else if (lang !== '/en/') {
|
||||
// Strip default '/en/' language ending and add the user's language
|
||||
wikiURL = wikiURL.substr(0, wikiURL.length - 4) + lang;
|
||||
}
|
||||
var wikiAside = $('<iframe>');
|
||||
wikiAside.attr({
|
||||
src: wikiURL,
|
||||
frameBorder: '0'
|
||||
});
|
||||
$('.wiki-aside').append(wikiAside);
|
||||
main.isWikiAsideLoad = true;
|
||||
if ($('body').hasClass('night')) {
|
||||
wikiAside.addClass('night');
|
||||
}
|
||||
}
|
||||
$('.wiki-aside').removeClass('is-collapsed');
|
||||
}
|
||||
|
||||
function collapseWiki() {
|
||||
$('.wiki-aside').addClass('is-collapsed');
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
function toggleWiki() {
|
||||
var isCollapsed = $('.wiki-aside').hasClass('is-collapsed');
|
||||
if (isCollapsed) {
|
||||
showWiki();
|
||||
} else {
|
||||
collapseWiki();
|
||||
}
|
||||
}
|
||||
|
||||
$('#accordion').on('show.bs.collapse', function(e) {
|
||||
expandCaret(e.target);
|
||||
if ($('a[data-toggle=collapse]').length === $('.fa-caret-down').length) {
|
||||
mapShowAll.text('Collapse all challenges');
|
||||
mapShowAll.addClass('active');
|
||||
}
|
||||
}).on('hide.bs.collapse', function(e) {
|
||||
collapseCaret(e.target);
|
||||
if ($('a[data-toggle=collapse]').length === $('.fa-caret-right').length) {
|
||||
mapShowAll.text('Expand all challenges');
|
||||
mapShowAll.removeClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
mapShowAll.on('click', () => {
|
||||
var mapExpanded = mapShowAll.hasClass('active');
|
||||
if (!mapExpanded) {
|
||||
@ -591,10 +508,6 @@ $(document).ready(function() {
|
||||
// Map
|
||||
window.location = '/map';
|
||||
});
|
||||
window.Mousetrap.bind('g n w', () => {
|
||||
// Wiki
|
||||
window.location = '/wiki';
|
||||
});
|
||||
window.Mousetrap.bind('g n a', () => {
|
||||
// About
|
||||
window.location = '/about';
|
||||
|
@ -81,6 +81,7 @@ var paths = {
|
||||
'public/bower_components/jshint/dist/jshint.js',
|
||||
'public/bower_components/chai/chai.js',
|
||||
'public/bower_components/CodeMirror/lib/codemirror.js',
|
||||
'public/bower_components/CodeMirror/addon/comment/comment.js',
|
||||
'public/bower_components/CodeMirror/addon/edit/closebrackets.js',
|
||||
'public/bower_components/CodeMirror/addon/edit/matchbrackets.js',
|
||||
'public/bower_components/CodeMirror/addon/lint/lint.js',
|
||||
|
@ -32,7 +32,7 @@
|
||||
"async": "^1.5.0",
|
||||
"babel-cli": "^6.3.17",
|
||||
"babel-core": "^6.3.26",
|
||||
"babel-eslint": "6.1.2",
|
||||
"babel-eslint": "^6.1.2",
|
||||
"babel-loader": "^6.2.1",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-preset-es2015": "^6.3.13",
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"id": 0,
|
||||
"imageLink": "https://s3.amazonaws.com/freecodecamp/funny-cat.jpg",
|
||||
"altText": "A white cat wearing a green helmet shaped melon on it's head. ",
|
||||
"codeNames": [
|
||||
"Juggernaut",
|
||||
"Mrs. Wallace",
|
||||
@ -11,6 +12,7 @@
|
||||
{
|
||||
"id": 1,
|
||||
"imageLink": "https://s3.amazonaws.com/freecodecamp/grumpy-cat.jpg",
|
||||
"altText": "A white cat with blue eys, looking very grumpy. ",
|
||||
"codeNames": [
|
||||
"Oscar",
|
||||
"Scrooge",
|
||||
@ -20,6 +22,7 @@
|
||||
{
|
||||
"id": 2,
|
||||
"imageLink": "https://s3.amazonaws.com/freecodecamp/mischievous-cat.jpg",
|
||||
"altText": "A ginger cat with one eye closed and mouth in a grin-like expression. Looking very mischievous. ",
|
||||
"codeNames": [
|
||||
"The Doctor",
|
||||
"Loki",
|
||||
|
@ -343,8 +343,8 @@
|
||||
"assert(confirmEnding(\"Connor\", \"n\") === false, 'message: <code>confirmEnding(\"Connor\", \"n\")</code> should return false.');",
|
||||
"assert(confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\") === false, 'message: <code>confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\")</code> should return false.');",
|
||||
"assert(confirmEnding(\"He has to give me a new name\", \"name\") === true, 'message: <code>confirmEnding(\"He has to give me a new name\", \"name\")</code> should return true.');",
|
||||
"assert(confirmEnding(\"He has to give me a new name\", \"me\") === true, 'message: <code>confirmEnding(\"He has to give me a new name\", \"me\")</code> should return true.');",
|
||||
"assert(confirmEnding(\"He has to give me a new name\", \"na\") === false, 'message: <code>confirmEnding(\"He has to give me a new name\", \"na\")</code> should return false.');",
|
||||
"assert(confirmEnding(\"Open sesame\", \"same\") === true, 'message: <code>confirmEnding(\"Open sesame\", \"same\")</code> should return true.');",
|
||||
"assert(confirmEnding(\"Open sesame\", \"pen\") === false, 'message: <code>confirmEnding(\"Open sesame\", \"pen\")</code> should return false.');",
|
||||
"assert(confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, 'message: <code>confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\")</code> should return false.');",
|
||||
"assert(!/\\.endsWith\\(.*?\\)\\s*?;/.test(code), 'message: Do not use the built-in method <code>.endsWith()</code> to solve the challenge.');"
|
||||
],
|
||||
|
@ -40,6 +40,19 @@
|
||||
"El comentario de barra-estrella-estrella-barra, comentará todo lo que haya entre los caracteres <code>/*</code> y <code>*/</code>:",
|
||||
"<code>/* Este es también un comentario */</code>",
|
||||
"Trata de crear uno de cada uno."
|
||||
],
|
||||
"titleFr" : "Commentez votre code JavaScript",
|
||||
"descriptionFr" : [
|
||||
"Les commentaires sont des lignes de code que Javascript va intentionnellement ignorer. Les commentaires sont un bon moyen de laisser des notes à votre intention ou pour d'autres personnes qui devront comprendre ce que fait votre code.",
|
||||
"Il y a deux façons d'écrire des commentaires en JavaScript.",
|
||||
"Utiliser <code>//</code> indiquera à JavaScript d'ignorer le reste du texte sur cette même ligne:",
|
||||
"<code>// Voici un commentaire sur une ligne.</code>",
|
||||
"Vous pouvez commenter plusieurs lignes en commençant par <code>/*</code> et en finissant par <code>*/</code>:",
|
||||
"<code>/*Voici un commentaire <br> sur plusieurs lignes */</code>",
|
||||
"<strong>Conseils</strong>",
|
||||
"Lorsque vous écrivez votre code, vous devriez ajouter régulièrement des commentaires pour clarifier l'objectif de certaines parties de votre code. De bons commentaires peuvent aider les autres <em>et</em> vous-même à mieux comprendre votre code.",
|
||||
"<h4>Instructions</h4>",
|
||||
"Essayez de créer un commentaire de chaque type."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -83,6 +96,20 @@
|
||||
"Te darás cuenta que en <code>myName</code>, no usamos un espacio, y que la \" N\"se escribe con mayúscula. Las variables en JavaScript se escriben con <code>capitalización camello (camel case)</code>. Un ejemplo de capitalización camello: capitalizacionCamello.",
|
||||
"Ahora, utiliza la palabra clave <code>var</code> para crear una variable llamada <code>myName</code>. Establecele como valor tu nombre, entre comillas dobles. ",
|
||||
"Mira el ejemplo con <code>ourName</code> si te quedas atascado."
|
||||
],
|
||||
"titleFr" : "Déclarer des variables en JavaScript",
|
||||
"descriptionFr" : [
|
||||
"En informatique, une <dfn>donnée</dfn> comporte tout ce qui peut avoir du sens pour l'ordinateur. Javascript dispose de sept <code>types de données</code> différents qui sont <code>undefined</code>, <code>null</code>, <code>boolean</code>, <code>string</code>, <code>symbol</code>, <code>number</code> et <code>object</code>.",
|
||||
"Par exemple, les ordinateurs font la différence entre les nombres tel que <code>12</code> et les <code>strings</code>, tels que <code>\"12\"</code>, <code>\"dog\"</code>, ou <code>\"123 cats\"</code>, qui sont des collections de caractères. Les ordinateurs peuvent faire des opérations mathématiques sur un nombre, mais pas sur une chaîne de caractères.",
|
||||
"Les <dfn>variables</dfn> permettent aux ordinateurs de stocker et manipuler les données de façon dynamique. Ils font cela en utilisant un <blockquote>label</blockquote> qui réfère à la donnée plutôt que d'utiliser la donnée elle-même. Les sept types de données peuvent être stockés dans une variable.",
|
||||
"Les <code>variables</code> sont similaires aux x et y que vous utilisez en mathématiques, ce qui veut dire que ce sont des noms simples qui représentent les données que l'on veut utiliser. Les <code>variables</code> de l'ordinateur diffèrent de celles des mathématiques car elles peuvent stocker différentes valeurs à différents moments.",
|
||||
"On peut dire à JavaScript de créer ou <code>déclarer</code> une variable en la précédant du mot-clé <code>var</code>, comme ceci:",
|
||||
"<code>var notreNom</code>;",
|
||||
"crée une <code>variable</code> appelée <code>notreNom</code>.On termine nos expressions avec un point virgule en JavaScript.",
|
||||
"Le nom d'une <code>variable</code> peut être composé de nombres, lettres et <code>$</code> ou <code>_</code>, mais ne peut contenir d'espaces ou commencer par un nombre.",
|
||||
"<h4>Instructions</h4>",
|
||||
"Utilisez le mot-clé <code>var</code> pour créer une variable appelée <code>monNom</code>",
|
||||
"<strong>Conseil</strong><br>Regardez à l'exemple de <code>notreNom</code> si vous vous êtes bloqué."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1833,7 +1860,7 @@
|
||||
"var myArray = [[\"John\", 23], [\"cat\", 2]];\nmyArray.push([\"dog\",3]);"
|
||||
],
|
||||
"tests": [
|
||||
"assert((function(d){if(d[2] != undefined && d[0][0] == 'John' && d[0][1] == 23 && d[2][0] == 'dog' && d[2][1] == 3 && d[2].length == 2){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should now equal <code>[[\"John\", 23], [\"cat\", 2], [\"dog\", 3]]</code>.');"
|
||||
"assert((function(d){if(d[2] != undefined && d[0][0] == 'John' && d[0][1] === 23 && d[2][0] == 'dog' && d[2][1] === 3 && d[2].length == 2){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should now equal <code>[[\"John\", 23], [\"cat\", 2], [\"dog\", 3]]</code>.');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"challengeType": 1,
|
||||
@ -1876,9 +1903,9 @@
|
||||
"var myArray = [[\"John\", 23], [\"cat\", 2]];\nvar removedFromMyArray = myArray.pop();"
|
||||
],
|
||||
"tests": [
|
||||
"assert((function(d){if(d[0][0] == 'John' && d[0][1] == 23 && d[1] == undefined){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should only contain <code>[[\"John\", 23]]</code>.');",
|
||||
"assert((function(d){if(d[0][0] == 'John' && d[0][1] === 23 && d[1] == undefined){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should only contain <code>[[\"John\", 23]]</code>.');",
|
||||
"assert(/removedFromMyArray\\s*=\\s*myArray\\s*.\\s*pop\\s*(\\s*)/.test(code), 'message: Use <code>pop()</code> on <code>myArray</code>');",
|
||||
"assert((function(d){if(d[0] == 'cat' && d[1] == 2 && d[2] == undefined){return true;}else{return false;}})(removedFromMyArray), 'message: <code>removedFromMyArray</code> should only contain <code>[\"cat\", 2]</code>.');"
|
||||
"assert((function(d){if(d[0] == 'cat' && d[1] === 2 && d[2] == undefined){return true;}else{return false;}})(removedFromMyArray), 'message: <code>removedFromMyArray</code> should only contain <code>[\"cat\", 2]</code>.');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"challengeType": 1,
|
||||
@ -1921,8 +1948,8 @@
|
||||
"var myArray = [[\"John\", 23], [\"dog\", 3]];\n\n// Only change code below this line.\nvar removedFromMyArray = myArray.shift();"
|
||||
],
|
||||
"tests": [
|
||||
"assert((function(d){if(d[0][0] == 'dog' && d[0][1] == 3 && d[1] == undefined){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should now equal <code>[[\"dog\", 3]]</code>.');",
|
||||
"assert((function(d){if(d[0] === 'John' && d[1] === 23 && typeof removedFromMyArray === 'object'){return true;}else{return false;}})(removedFromMyArray), 'message: <code>removedFromMyArray</code> should contain <code>[\"John\", 23]</code>.');"
|
||||
"assert((function(d){if(d[0][0] == 'dog' && d[0][1] === 3 && d[1] == undefined){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should now equal <code>[[\"dog\", 3]]</code>.');",
|
||||
"assert((function(d){if(d[0] == 'John' && d[1] === 23 && typeof removedFromMyArray === 'object'){return true;}else{return false;}})(removedFromMyArray), 'message: <code>removedFromMyArray</code> should contain <code>[\"John\", 23]</code>.');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"challengeType": 1,
|
||||
@ -1965,7 +1992,7 @@
|
||||
"var myArray = [[\"John\", 23], [\"dog\", 3]];\nmyArray.shift();\nmyArray.unshift([\"Paul\", 35]);"
|
||||
],
|
||||
"tests": [
|
||||
"assert((function(d){if(typeof d[0] === \"object\" && d[0][0].toLowerCase() == 'paul' && d[0][1] == 35 && d[1][0] != undefined && d[1][0] == 'dog' && d[1][1] != undefined && d[1][1] == 3){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should now have [[\"Paul\", 35], [\"dog\", 3]].');"
|
||||
"assert((function(d){if(typeof d[0] === \"object\" && d[0][0] == 'Paul' && d[0][1] === 35 && d[1][0] != undefined && d[1][0] == 'dog' && d[1][1] != undefined && d[1][1] == 3){return true;}else{return false;}})(myArray), 'message: <code>myArray</code> should now have [[\"Paul\", 35], [\"dog\", 3]].');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"challengeType": 1,
|
||||
|
@ -48,7 +48,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -141,7 +141,7 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <p>Things cats love:</p>",
|
||||
" <ul>",
|
||||
@ -231,9 +231,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <p>Things cats love:</p>",
|
||||
" <ul>",
|
||||
" <li>cat nip</li>",
|
||||
@ -316,9 +316,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
"",
|
||||
" <p>Things cats love:</p>",
|
||||
" <ul>",
|
||||
@ -409,9 +409,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <button class=\"btn\">Like</button>",
|
||||
" <p>Things cats love:</p>",
|
||||
" <ul>",
|
||||
@ -511,9 +511,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <button class=\"btn btn-block\">Like</button>",
|
||||
" <p>Things cats love:</p>",
|
||||
" <ul>",
|
||||
@ -599,9 +599,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
" <p>Things cats love:</p>",
|
||||
" <ul>",
|
||||
@ -688,9 +688,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
" <button class=\"btn btn-block btn-info\">Info</button>",
|
||||
" <p>Things cats love:</p>",
|
||||
@ -783,9 +783,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
" <button class=\"btn btn-block btn-info\">Info</button>",
|
||||
" <button class=\"btn btn-block btn-danger\">Delete</button>",
|
||||
@ -884,9 +884,9 @@
|
||||
"",
|
||||
" <p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
@ -979,9 +979,9 @@
|
||||
"<div class=\"container-fluid\">",
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
@ -1077,9 +1077,9 @@
|
||||
"<div class=\"container-fluid\">",
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
"",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
@ -1178,10 +1178,10 @@
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\">Like</button>",
|
||||
@ -1273,10 +1273,10 @@
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\"><i class=\"fa fa-thumbs-up\"></i> Like</button>",
|
||||
@ -1357,10 +1357,10 @@
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\"><i class=\"fa fa-thumbs-up\"></i> Like</button>",
|
||||
@ -1442,10 +1442,10 @@
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\"><i class=\"fa fa-thumbs-up\"></i> Like</button>",
|
||||
@ -1534,10 +1534,10 @@
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\"><i class=\"fa fa-thumbs-up\"></i> Like</button>",
|
||||
@ -1635,10 +1635,10 @@
|
||||
" <h2 class=\"text-primary text-center\">CatPhotoApp</h2>",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
" <a href=\"#\"><img class=\"img-responsive thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\">",
|
||||
" <img src=\"https://bit.ly/fcc-running-cats\" class=\"img-responsive\" alt=\"Three kittens running towards the camera. \">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-4\">",
|
||||
" <button class=\"btn btn-block btn-primary\"><i class=\"fa fa-thumbs-up\"></i> Like</button>",
|
||||
|
@ -643,6 +643,18 @@
|
||||
"Внутри вашего элемента <code>style</code>, замените селектор <code>h2</code> на <code>.red-text</code> и измените значение цвета с <code>blue</code> на <code>red</code>.",
|
||||
"Присвойте вашему элементу <code>h2</code> атрибут <code>class</code> со значением <code>'red-text'</code>."
|
||||
],
|
||||
"titleFR": "Utiliser les classes CSS pour styler un élément",
|
||||
"descriptionFR": [
|
||||
"Les classes sont des styles réutilisables qui peuvent être ajoutées à des éléments HTML.",
|
||||
"Voici un exemple de déclaration de classe CSS :",
|
||||
"<blockquote><style><br> .blue-text {<br> color: blue;<br> }<br></style></blockquote>",
|
||||
"Remarquez que nous avons créer une classe CSS nommée <code>blue-text</code> à l'intérieur de notre balise <code><style></code>.",
|
||||
"Vous pouvez appliquer une classe à un élément HTML comme ceci :",
|
||||
"<code><h2 class=\"blue-text\">CatPhotoApp</h2></code>",
|
||||
"Prenez note que que dans votre élément CSS <code>style</code>, les classes doivent débuter par un point. Dans les déclarations de classes à l'intérieur des éléments HTML, on doit omettre le point du début.",
|
||||
"À l'intérieur de votre élément <code>style</code>, changez le sélecteur du <code>h2</code> pour <code>.red-text</code> et changez la couleur, passant de <code>blue</code> à <code>red</code>.",
|
||||
"Donnez à votre élément <code>h2</code> l'attribut de classe la valeur de <code>red-text</code>."
|
||||
],
|
||||
"title": "Use a CSS Class to Style an Element",
|
||||
"description": [
|
||||
"Classes are reusable styles that can be added to HTML elements.",
|
||||
@ -718,6 +730,15 @@
|
||||
"<code><h2 class=\"blue-text\">CatPhotoApp</h2></code>",
|
||||
"Примените класс <code>red-text</code> к вашим элементам <code>h2</code> и <code>p</code>."
|
||||
],
|
||||
"titleFR": "Stylez plusieurs éléments avec une classe CSS",
|
||||
"descriptionFR": [
|
||||
"Souvenez-vous que vous pouvez ajouter des classes aux éléments HTML en utilisant <code>class=\"votre-classe-ici\"</code> à l'intérieur de la balise ouvrante correspondante.",
|
||||
"Souvenez-vous que les sélecteurs CSS nécessitent un point au début comme ceci :",
|
||||
"<blockquote>.blue-text {<br> color: blue;<br>}</blockquote>",
|
||||
"Rappelez-vous également que les déclarations de classes n'ont pas de point, comme ceci :",
|
||||
"<code><h2 class=\"blue-text\">CatPhotoApp</h2></code>",
|
||||
"Appliquez la classe <code>red-text</code> à vos éléments <code>h2</code> et <code>p</code>."
|
||||
],
|
||||
"title": "Style Multiple Elements with a CSS Class",
|
||||
"description": [
|
||||
"Remember that you can attach classes to HTML elements by using <code>class=\"your-class-here\"</code> within the relevant element's opening tag.",
|
||||
@ -785,6 +806,15 @@
|
||||
"<strong>Внимание</strong><br>По причине разницы в реализации браузеров, вам может понадобиться установить 100% масштаб окна браузера для прохождения этого испытания.",
|
||||
"Также, пожалуйста, не добавляйте атрибут класс к вашему новому элементу <code>p</code>."
|
||||
],
|
||||
"titleFR": "Changez la taille de police d'un élément",
|
||||
"descriptionFR": [
|
||||
"La taille de police est contrôlée par la propriété CSS <code>font-size</code>, comme ceci :",
|
||||
"<blockquote>h1 {<br> font-size: 30px;<br>}</blockquote>",
|
||||
"Créez un second élément <code>p</code> après l'élément <code>p</code> existant avec le texte kitty ipsum suivant : <code>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</code>",
|
||||
"À l'intérieur de la même balise <code><style></code> qui contiens votre classe <code>.red-text</code>, créez une nouvelle entrée pour les éléments <code>p</code> et paramétrer le <code>font-size</code> à 16 pixels (<code>16px</code>).",
|
||||
"<strong>Prenez note</strong><br>Dû aux différences entre les navigateurs Web, votre niveau de zoom devrait être à 100% pour passer les tests de ce défi.",
|
||||
"Également, veuillez ne pas ajouter d'attributs de classe à votre nouvel élément <code>p</code>."
|
||||
],
|
||||
"title": "Change the Font Size of an Element",
|
||||
"description": [
|
||||
"Font size is controlled by the <code>font-size</code> CSS property, like this:",
|
||||
@ -850,6 +880,13 @@
|
||||
"<blockquote>h2 {<br> font-family: Sans-serif;<br>}</blockquote>",
|
||||
"Присвойте шрифт <code>Monospace</code> всем вашим элементам <code>p</code>."
|
||||
],
|
||||
"titleFR": "Paramétrer la famille de police d'un élément",
|
||||
"descriptionFR": [
|
||||
"Vous pouvez paramétrer la police d'un élément en utilisant la propriété <code>font-family</code>.",
|
||||
"Par exemple, si vous voulez paramétrer la police de votre élément <code>h2</code> à <code>Sans-serif</code>, vous devez utiliser le CSS suivant :",
|
||||
"<blockquote>h2 {<br> font-family: Sans-serif;<br>}</blockquote>",
|
||||
"Faites en sorte que tous vos éléments <code>p</code> aient la police <code>Monospace</code>."
|
||||
],
|
||||
"title": "Set the Font Family of an Element",
|
||||
"description": [
|
||||
"You can set an element's font by using the <code>font-family</code> property.",
|
||||
@ -914,6 +951,14 @@
|
||||
"Теперь вы можете установить шрифт <code>Lobster</code> в качестве значения семейства шрифтов для вашего <code>h2</code>.",
|
||||
"Примените свойство <code>font-family</code> со значением <code>Lobster</code> к вашему элементу <code>h2</code>."
|
||||
],
|
||||
"titleFR": "Importer une police de Google",
|
||||
"descriptionFR": [
|
||||
"Maintenant, importons et appliquons une police de Google (prenez note que si Google est interdit d'accès dans votre pays, vous devrez omettre ce défi).",
|
||||
"Premièrement, vous devrez faire un <code>appel</code> vers Google pour prendre la police <code>Lobster</code> et la charger dans votre HTML.",
|
||||
"Copier l'extrait de code suivant et coller le dans le haut de votre éditeur de code :",
|
||||
"Maintenant vous pouvez paramétrer <code>Lobster</code> comme valeur de police de votre élément <code>h2</code>.",
|
||||
"Appliquer la valeur <code>Lobster</code> à la <code>font-family</code> de votre élément <code>h2</code>."
|
||||
],
|
||||
"title": "Import a Google Font",
|
||||
"description": [
|
||||
"Now, let's import and apply a Google font (note that if Google is blocked in your country, you will need to skip this challenge).",
|
||||
@ -985,6 +1030,14 @@
|
||||
"<blockquote>p {<br> font-family: Helvetica, Sans-Serif;<br>}</blockquote>",
|
||||
"Теперь закомментируйте ваш запрос к Google Fonts, таким образом шрифт <code>Lobster</code> становится недоступен. Обратите внимание как происходит деградация до шрифта <code>Monospace</code>."
|
||||
],
|
||||
"titleFR": "Spécifier comment vos polices devraient dégrader",
|
||||
"descriptionFR": [
|
||||
"Il y a plusieurs polices par défaut qui sont disponible dans tous les navigateurs Web. Ceci comprend <code>Monospace</code>, <code>Serif</code> et <code>Sans-Serif</code>.",
|
||||
"Quand une police n'est pas disponible, vous pouvez demander au navigateur de \"dégrader\" vers une autre police.",
|
||||
"Par exemple, si vous voulez qu'un élément utilise la police <code>Helvetica</code>, mais également dégrader vers <code>Sans-Serif</code> lorsque la police <code>Helvetica</code> n'est pas disponible, vous pouvez utiliser le style CSS suivant :",
|
||||
"<blockquote>p {<br> font-family: Helvetica, Sans-Serif;<br>}</blockquote>",
|
||||
"Maintenant, commenter votre appel vers les polices de Google, pour que la police <code>Lobster</code> ne soit pas disponible. Regardez comment la police se dégrade vers <code>Monospace</code>."
|
||||
],
|
||||
"title": "Specify How Fonts Should Degrade",
|
||||
"description": [
|
||||
"There are several default fonts that are available in all browsers. These include <code>Monospace</code>, <code>Serif</code> and <code>Sans-Serif</code>",
|
||||
@ -1061,11 +1114,24 @@
|
||||
"Попробуйте добавить изображение используя следующую ссылку:",
|
||||
"<code>https://bit.ly/fcc-relaxing-cat</code>"
|
||||
],
|
||||
"titleFR": "Ajouter des images à votre site Web",
|
||||
"descriptionFR": [
|
||||
"Vous pouvez ajouter des images à votre site Web en utilisant l'élément <code>img</code> et pointer vers une URL d'image spécifique en utilisant l'attribut <code>src</code>.",
|
||||
"Un exemple de cette procédure serait :",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\"></code>",
|
||||
"Note that in most cases, <code>img</code> elements are self-closing.",
|
||||
"Prenez note que dans la plupart des cas, les éléments <code>img</code> sont auto-fermants.",
|
||||
"Essayez avec cette image :",
|
||||
"<code>https://bit.ly/fcc-relaxing-cat</code>"
|
||||
],
|
||||
"title": "Add Images to your Website",
|
||||
"description": [
|
||||
"You can add images to your website by using the <code>img</code> element, and point to a specific image's URL using the <code>src</code> attribute.",
|
||||
"An example of this would be:",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\"></code>",
|
||||
"All <code>img</code> elements <strong>must</strong> have an <code>alt</code> attribute. The text inside an <code>alt</code> attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.",
|
||||
"Lets add an <code>alt</code> attribute to our <code>img</code> example above:",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up. \"></code>",
|
||||
"Note that in most cases, <code>img</code> elements are self-closing.",
|
||||
"Try it with this image:",
|
||||
"<code>https://bit.ly/fcc-relaxing-cat</code>"
|
||||
@ -1094,7 +1160,8 @@
|
||||
],
|
||||
"tests": [
|
||||
"assert($(\"img\").length > 0, 'message: Your page should have an image element.');",
|
||||
"assert(new RegExp(\"\\/\\/bit.ly\\/fcc-relaxing-cat\", \"gi\").test($(\"img\").attr(\"src\")), 'message: Your image should have a <code>src</code> attribute that points to the kitten image.');"
|
||||
"assert(new RegExp(\"\\/\\/bit.ly\\/fcc-relaxing-cat\", \"gi\").test($(\"img\").attr(\"src\")), 'message: Your image should have a <code>src</code> attribute that points to the kitten image.');",
|
||||
"assert(code.match(/alt\\s*?=\\s*?(\\\"|\\')[\\s\\w\\.\\,\\!]+?(\\\"|\\')/), 'message: Your image element <strong>must</strong> have an <code>alt</code> attribute.');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"titleEs": "Añade imágenes a tu sitio web",
|
||||
@ -1137,6 +1204,14 @@
|
||||
"Создайте класс <code>smaller-image</code> и используйте его для изменения размера изображений до 100 пикселей в ширину.",
|
||||
"<strong>Внимание</strong><br>По причине разницы в реализации браузеров, вам может понадобиться установить 100% масштаб окна браузера для прохождения этого испытания."
|
||||
],
|
||||
"titleFR": "Redimensionner vos images",
|
||||
"descriptionFR": [
|
||||
"Le CSS a une propriété nommé <code>width</code> qui contrôle la largeur d'un élément. Comme pour les polices, nous utiliserons <code>px</code> (pixels) pour déterminer la largeur d'une image.",
|
||||
"Par exemple, si nous voulons créer une classe CSS nommée <code>larger-image</code> qui donnne aux éléments une largeur de 500 pixels, nous utilisons :",
|
||||
"<blockquote><style><br> .larger-image {<br> width: 500px;<br> }<br></style></blockquote>",
|
||||
"Créez une classe nommée <code>smaller-image</code> et utilisez la pour redimensionner l'image pour qu'elle ai 100 pixels de large.",
|
||||
"<strong>Prenez note</strong><br>Dû aux différences entre les navigateurs Web, votre niveau de zoom devrait être à 100% pour passer les tests de ce défi."
|
||||
],
|
||||
"title": "Size your Images",
|
||||
"description": [
|
||||
"CSS has a property called <code>width</code> that controls an element's width. Just like with fonts, we'll use <code>px</code> (pixels) to specify the image's width.",
|
||||
@ -1164,7 +1239,7 @@
|
||||
"",
|
||||
"<h2 class=\"red-text\">CatPhotoApp</h2>",
|
||||
"",
|
||||
"<img src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1219,6 +1294,15 @@
|
||||
"Помните, что вы можете может применить множество классов к одному элементу путём разделения их с помощью пробела внутри атрибута <code>class</code>. Например:",
|
||||
"<code><img class=\"class1 class2\"></code>"
|
||||
],
|
||||
"titleFR": "Ajouter des bordures autour de vos éléments",
|
||||
"descriptionFR": [
|
||||
"Les bordures CSS ont des propriétés comme <code>style</code>, <code>color</code> et <code>width</code>",
|
||||
"Par exemple, si nous voulons créer une bordure de 5 pixel rouge autour d'un élément HTML, nous pouvons utiliser cette classe :",
|
||||
"<blockquote><style><br> .thin-red-border {<br> border-color: red;<br> border-width: 5px;<br> border-style: solid;<br> }<br></style></blockquote>",
|
||||
"Créer une classe nommée <code>thick-green-border</code> qui ajoute une bordure verte de 10 pixel avec un style <code>solid</code> autour d'un élément HTML. Appliquez ensuite cette classe sur votre photo de chat.",
|
||||
"Souvenez-vous que vous pouvez appliquer plus d'une classe sur un élément en les séparant par un espace, le tout dans l'attribut <code>class</code> de l'élément. Par exemple :",
|
||||
"<code><img class=\"class1 class2\"></code>"
|
||||
],
|
||||
"title": "Add Borders Around your Elements",
|
||||
"description": [
|
||||
"CSS borders have properties like <code>style</code>, <code>color</code> and <code>width</code>",
|
||||
@ -1251,7 +1335,7 @@
|
||||
"",
|
||||
"<h2 class=\"red-text\">CatPhotoApp</h2>",
|
||||
"",
|
||||
"<img class=\"smaller-image\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1330,7 +1414,7 @@
|
||||
"",
|
||||
"<h2 class=\"red-text\">CatPhotoApp</h2>",
|
||||
"",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1400,7 +1484,7 @@
|
||||
"",
|
||||
"<h2 class=\"red-text\">CatPhotoApp</h2>",
|
||||
"",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1485,7 +1569,7 @@
|
||||
"",
|
||||
"<h2 class=\"red-text\">CatPhotoApp</h2>",
|
||||
"",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1577,7 +1661,7 @@
|
||||
"",
|
||||
"<a href=\"http://www.freecatphotoapp.com\">cat photos</a>",
|
||||
"",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1662,7 +1746,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"http://www.freecatphotoapp.com\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1708,7 +1792,7 @@
|
||||
"description": [
|
||||
"You can make elements into links by nesting them within an <code>a</code> element.",
|
||||
"Nest your image within an <code>a</code> element. Here's an example:",
|
||||
"<code><a href=\"#\"><img src=\"https://bit.ly/fcc-running-cats\"></a></code>",
|
||||
"<code><a href=\"#\"><img src=\"https://bit.ly/fcc-running-cats\" alt=\"Three kittens running towards the camera. \"></a></code>",
|
||||
"Remember to use <code>#</code> as your <code>a</code> element's <code>href</code> property in order to turn it into a dead link.",
|
||||
"Place the existing image element within an anchor element.",
|
||||
"Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link."
|
||||
@ -1745,7 +1829,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\">",
|
||||
"<img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \">",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -1767,91 +1851,6 @@
|
||||
"titleDe": "Verlinke ein Bild",
|
||||
"challengeType": 0
|
||||
},
|
||||
{
|
||||
"id": "bad87fee1348bd9aedf08818",
|
||||
"descriptionPtBR": [
|
||||
"Os atributos <code>alt</code>, também conhecidos como <code>texto alternativo</code>, serão apresentados caso se por qualquer motivo o navegador não possa mostrar a imagem. Os atributos <code>alt</code> também são importantes para que usuários cegos ou com alguma deficiência visual possam entender o que uma imagem retrata. Além disso, os motores de busca também examinam os atributos <code>alt</code>.",
|
||||
"Em resumo: Todas as imagem devem ter um atributo <code>alt</code>!",
|
||||
"Você pode adicionar um atributo <code>alt</code> já no elemento <code>img</code> assim:",
|
||||
"<code><img src=\"www.your-image-source.com/your-image.jpg\" alt=\"seu texto alternativo\"></code>",
|
||||
"Adicione um atributo <code>alt</code> com o texto <code>A cute orange cat lying on its back</code> para a nossa foto com o gato."
|
||||
],
|
||||
"namePtBR": "Dê Acessibilidade a uma Imagem com Texto Alternativo",
|
||||
"descriptionDe": [
|
||||
"<code>alt</code> Attribute – auch <code>alt text</code> genannt – werden von Browsern angezeigt, wenn sie ein Bild nicht laden können. Für blinde oder visuell eingeschränkte Menschen sind sie ebenfalls wichtig um zu verstehen, was ein Bild darstellt. Zudem werden diese Texte von Suchmaschinen genutzt.",
|
||||
"Kurz gesagt: Jedes Bild sollte ein <code>alt</code> Attribut beinhalten!",
|
||||
"Du kannst das <code>alt</code> Attribut direkt in das Img Element einfügen:",
|
||||
"<code><img src=\"www.deine-bild-quelle.com/dein-bild.jpg\" alt=\"dein alt Text\"></code>",
|
||||
"Füge zu unserem Katzen-Bild ein <code>alt</code> Attribut mit dem Text \"A cute orange cat lying on its back\" hinzu."
|
||||
],
|
||||
"titleRU": "Добавьте альтернативный текст к изображению для улучшения доступа",
|
||||
"descriptionRU": [
|
||||
"Атрибуты <code>alt</code>, также известные как <code>alt text</code>, являются тем, что браузеры отобразят, если изображение загрузить не получится. Атрибуты <code>alt</code> важны для незрячих или пользователей с ограниченными возможностями в области зрения для понимания того, что отображает изображение. Также поисковые системы используют атрибуты <code>alt</code>.",
|
||||
"Вкратце, каждое изображение должно иметь атрибут <code>alt</code>!",
|
||||
"Вы можете добавить атрибут <code>alt</code> прямо в элемент <conde>img</code> следующим образом:",
|
||||
"<code><img src=\"www.your-image-source.com/your-image.jpg\" alt=\"ваш альтернативный текст\"></code>",
|
||||
"Добавьте атрибут <code>alt</code> с текстом <code>A cute orange cat lying on its back</code> к нашему фото кота."
|
||||
],
|
||||
"title": "Add Alt Text to an Image for Accessibility",
|
||||
"description": [
|
||||
"<code>alt</code> attributes, also known as <code>alt text</code>, are what browsers will display if they fail to load the image. <code>alt</code> attributes are also important for blind or visually impaired users to understand what an image portrays. And search engines also look at <code>alt</code> attributes.",
|
||||
"In short, every image should have an <code>alt</code> attribute!",
|
||||
"You can add an <code>alt</code> attribute right in the img element like this:",
|
||||
"<code><img src=\"www.your-image-source.com/your-image.jpg\" alt=\"your alt text\"></code>",
|
||||
"Add an <code>alt</code> attribute with the text <code>A cute orange cat lying on its back</code> to our cat photo."
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<link href=\"https://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">",
|
||||
"<style>",
|
||||
" .red-text {",
|
||||
" color: red;",
|
||||
" }",
|
||||
"",
|
||||
" h2 {",
|
||||
" font-family: Lobster, Monospace;",
|
||||
" }",
|
||||
"",
|
||||
" p {",
|
||||
" font-size: 16px;",
|
||||
" font-family: Monospace;",
|
||||
" }",
|
||||
"",
|
||||
" .thick-green-border {",
|
||||
" border-color: green;",
|
||||
" border-width: 10px;",
|
||||
" border-style: solid;",
|
||||
" border-radius: 50%;",
|
||||
" }",
|
||||
"",
|
||||
" .smaller-image {",
|
||||
" width: 100px;",
|
||||
" }",
|
||||
"</style>",
|
||||
"",
|
||||
"<h2 class=\"red-text\">CatPhotoApp</h2>",
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
],
|
||||
"tests": [
|
||||
"assert($(\"img\").filter(function(){ return /cat/gi.test(this.alt) }).length > 0, 'message: Your image element should have an <code>alt</code> attribute set to <code>A cute orange cat lying on its back</code>');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"titleEs": "Agrega texto alternativo a una imagen para dar Accesibilidad",
|
||||
"descriptionEs": [
|
||||
"Los atributos <code>alt</code> también conocidos como <code>texto alternativo</code>, son lo que se presentarán en caso que el navegador no pueda mostrar la imagen. Los atributos <code>alt</code> también son importantes para los usuarios ciegos o con deficiencia visual para entender lo que una imagen retrata. Los motores de búsqueda también examinan los atributos <code>alt</code>. ",
|
||||
"En resumen, ¡cada imagen debe tener un atributo <code>alt</code>!",
|
||||
"Puedes agregar un atributo <code>alt</code> justo en el elemento <code>img</code> así:",
|
||||
"<code><img src=\"www.fuente-de-tu-imagen.com/tu-imagen.jpg\" alt=\"tu texto alternativo\"></code>",
|
||||
"Añade un atributo <code>alt</code> con el texto <code>A cute orange cat lying on its back</code> a nuestra foto del gato."
|
||||
],
|
||||
"titleDe": "Füge Alt Text für mehr Barrierefreiheit hinzu",
|
||||
"challengeType": 0
|
||||
},
|
||||
{
|
||||
"id": "bad87fee1348bd9aedf08827",
|
||||
"descriptionPtBR": [
|
||||
@ -1924,7 +1923,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" src=\"https://bit.ly/fcc-relaxing-cat\" alt=\"A cute orange cat lying on its back. \"></a>",
|
||||
"",
|
||||
"<p class=\"red-text\">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",
|
||||
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
|
||||
@ -2020,7 +2019,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2121,7 +2120,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2213,7 +2212,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2306,7 +2305,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2399,7 +2398,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2498,7 +2497,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2605,7 +2604,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2719,7 +2718,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2821,7 +2820,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -2925,7 +2924,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<p>Things cats love:</p>",
|
||||
"<ul>",
|
||||
@ -3016,7 +3015,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<div>",
|
||||
" <p>Things cats love:</p>",
|
||||
@ -3128,7 +3127,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<div class=\"silver-background\">",
|
||||
" <p>Things cats love:</p>",
|
||||
@ -3242,7 +3241,7 @@
|
||||
"",
|
||||
"<p>Click here for <a href=\"#\">cat photos</a>.</p>",
|
||||
"",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back\" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"<a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a>",
|
||||
"",
|
||||
"<div class=\"silver-background\">",
|
||||
" <p>Things cats love:</p>",
|
||||
|
@ -322,6 +322,7 @@
|
||||
"Traduis la phrase donnée en pig latin (verlan anglais)",
|
||||
"Le <a href=\"http://fr.wikipedia.org/wiki/Pig_Latin\" target=\"_blank\">Pig Latin</a> prend la ou les première(s) consonne(s) d'un mot en anglais et les mets à la fin du mot accompagné par le suffixe \"ay\".",
|
||||
"Si un mot commence par une voyelle ajoute \"way\" à la fin du mot.",
|
||||
"Les chaînes de caractères entrées sont garanties d'être des mots anglais, en lettres minuscules.",
|
||||
"N'oublie pas d'utiliser <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Lire-Chercher-Demander</a> si tu es bloqué. Essaye de trouver un partenaire. Écris ton propre code."
|
||||
]
|
||||
},
|
||||
|
@ -289,7 +289,7 @@
|
||||
"We've seen from the last two lessons that each object in our JSON array contains an <code>imageLink</code> key with a value that is the URL of a cat's image.",
|
||||
"When we're looping through these objects, let's use this <code>imageLink</code> property to display this image in an <code>img</code> element.",
|
||||
"Here's the code that does this:",
|
||||
"<code>html += \"<img src = '\" + val.imageLink + \"'>\";</code>"
|
||||
"<code>html += \"<img src = '\" + val.imageLink + \"' \" + \"alt='\" + val.altText + \"'>\";</code>"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"fccss",
|
||||
@ -349,14 +349,14 @@
|
||||
"Hemos visto en las dos últimas lecciones que cada objeto en nuestro vector JSON contiene una llave <code>imageLink</code> con un valor que corresponde a la URL de la imagen de un gato.",
|
||||
"Cuando estamos recorriendo estos objetos, usemos esta propiedad <code>imageLink</code> para visualizar la imagen en un elemento <code>img</code>.",
|
||||
"Aquí está el código que hace esto:",
|
||||
"<code>html += \"<img src = '\" + val.imageLink + \"'>\";</code>"
|
||||
"<code>html += \"<img src = '\" + val.imageLink + \"' \" + \"alt='\" + val.altText + \"'>\";</code>"
|
||||
],
|
||||
"titlePt": "Apresentar as imagens da fonte de dados",
|
||||
"descriptionPt": [
|
||||
"Como temos visto nas ultimas lições, cada objeto em nosso array JSON contém a chave <code>imageLink</code> com um valor que corresponde a URL da imagem de um gato.",
|
||||
"Quando estamos percorrendo por estes objetos, usamos a propriedade <code>imageLink</code> para visualizar a imagem em um elemento <code>img</code>.",
|
||||
"Aqui está o código para fazer isso:",
|
||||
"<code>html += \"<img src = '\" + val.imageLink + \"'>\";</code>"
|
||||
"<code>html += \"<img src = '\" + val.imageLink + \"' \" + \"alt='\" + val.altText + \"'>\";</code>"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -387,7 +387,7 @@
|
||||
"",
|
||||
" html += \"<div class = 'cat'>\"",
|
||||
"",
|
||||
" html += \"<img src = '\" + val.imageLink + \"'>\"",
|
||||
" html += \"<img src = '\" + val.imageLink + \"' \" + \"alt='\" + val.altText + \"'>\"",
|
||||
"",
|
||||
" html += \"</div>\"",
|
||||
"",
|
||||
|
@ -20,12 +20,12 @@
|
||||
"Install MongoDB with this command: <code>sudo apt-get install mongodb-org</code>",
|
||||
"Set up your mongod alias by following the directions at <a href='https://community.c9.io/t/setting-up-mongodb/1717' target='_blank'>https://community.c9.io/t/setting-up-mongodb/1717</a>.",
|
||||
"Now start the tutorial by running <code>learnyoumongo</code>.",
|
||||
"Whenever you run a command that includes <code>mongod</code> on c9.io, use <code>./mongod</code> instead.",
|
||||
"Whenever you run a command that includes <code>mongod</code> on c9.io, use <code>./mongod</code> instead. Together with the commands used in Step 11, this adds additional parameters to the <code>mongod</code> command to allow MongoDB to run in the C9 environment.",
|
||||
"Note that you can resize the c9.io's windows by dragging their borders.",
|
||||
"Make sure that you are always in your project's \"workspace\" directory. You can always navigate back to this directory by running this command: <code>cd ~/workspace</code>.",
|
||||
"You can view this Node School module's source code on GitHub at <a href='https://github.com/evanlucas/learnyoumongo'>https://github.com/evanlucas/learnyoumongo</a>.",
|
||||
"Complete \"Mongod\"",
|
||||
"Complete \"Connect\"",
|
||||
"Complete \"Connect\"<br><br><strong>Note:</strong> Use the command <code>mongod --port 27017</code> in place of <code>mongod --port 27017 --dbpath=./data</code> to avoid a duplicate parameter error.<br><br><code>--dbpath=./data</code> is already included in the <code>./mongod</code> command.",
|
||||
"Complete \"Find\"",
|
||||
"Complete \"Find Project\"",
|
||||
"Complete \"Insert\"",
|
||||
|
@ -36,6 +36,8 @@ block content
|
||||
a(href="#{challenge.url}" target='_parent')
|
||||
= challenge.title
|
||||
span.sr-only= " Complete"
|
||||
span.text-primary    
|
||||
strong *
|
||||
else if challenge.isRequired
|
||||
p.challenge-title.ion-ios-circle-outline.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
||||
a(name="#{challenge.dashedName}" target='_parent' href="#{challenge.url}" class=challenge.isComingSoon ? 'disabled' : '')
|
||||
|
@ -5,9 +5,5 @@ aside.map-aside.is-collapsed
|
||||
.map-aside-action-bar
|
||||
a.map-aside-action-item.map-aside-action-pop-out(href='/map' target='_blank' aria-label='open map in new tab')
|
||||
button.map-aside-action-item.map-aside-action-collapse(aria-label='close map aside')
|
||||
aside.wiki-aside.is-collapsed
|
||||
.wiki-aside-action-bar.wiki-fixed-header
|
||||
.chat-embed-main-title
|
||||
span Free Code Camp's Wiki
|
||||
a.wiki-aside-action-item.wiki-aside-action-pop-out(href='/wiki' target='_blank' aria-label='open wiki in new tab')
|
||||
button.wiki-aside-action-item.wiki-aside-action-collapse(aria-label='close wiki aside')
|
||||
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
extends ../layout-wide
|
||||
block content
|
||||
iframe#wikiFrame(frameborder='no')
|
||||
script.
|
||||
var wikiUrl = '//freecodecamp.github.io/wiki';
|
||||
var wikiOrigin = /https?:\/\/freecodecamp.github.io/;
|
||||
var requestedPath = !{JSON.stringify(path) || ''};
|
||||
if (requestedPath !== '' && requestedPath.slice(-1) !== '/') {
|
||||
requestedPath += '/';
|
||||
}
|
||||
var lang = window.location.toString().match(/\/\w{2}\//);
|
||||
lang = (lang) ? lang[0] : '/en/';
|
||||
$('#wikiFrame').attr(
|
||||
'src',
|
||||
wikiUrl + (requestedPath ? requestedPath : lang)
|
||||
);
|
||||
window.addEventListener('message', function(e) {
|
||||
if (!wikiOrigin.test(e.origin)) {
|
||||
return null;
|
||||
}
|
||||
history.replaceState(history.state, null, e.data);
|
||||
return null;
|
||||
});
|
Reference in New Issue
Block a user