Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8 from Osmose/update-docs
Browse files Browse the repository at this point in the history
Fix bug 1113274: Add CONTRIBUTING file, slim down README.
  • Loading branch information
Cory Price committed Jan 6, 2015
2 parents 63c71cf + b1ea41f commit 8fd10bc
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 67 deletions.
75 changes: 75 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,75 @@
# How to Contribute

Welcome, and thanks for considering contributing! In order to make our
review/development process easier, we have some guidelines to help you figure
out how to contribute to Project Lorax.


## Getting Started

If you're new to contributing to Mozilla, you may want to read through the
[Mozilla Webdev Bootcamp](http://mozweb.readthedocs.org/en/latest/), a tutorial
and reference guide to contributing as a web developer to Mozilla.


## Reporting Issues

We use [Bugzilla][] to track issues and bugs for Project Lorax. Any issues
with the website should be filed under the Shape of the Web component in the
Websites product.

[Bugzilla]: https://bugzilla.mozilla.org/buglist.cgi?product=Websites&component=Shape%20of%20the%20Web&resolution=---


## Developer Setup

This section describes how to set up an instance of the site on your local
computer for you to develop with.

The following steps assume you have [Git](http://git-scm.com/) and
[Node.js](http://nodejs.org/) installed.

1. Clone the repo:

```sh
git clone https://github.com/mozilla/lorax.git
```

2. Install [LESS](http://lesscss.org/), [Grunt](http://gruntjs.com/), and
[Bower](http://bower.io/).

```sh
npm install -g less bower grunt-cli
```

3. Download dependencies via bower and npm.

```sh
bower install
npm install
```

4. Start the development server.

```sh
grunt server
```

5. Open http://127.0.0.1:9000 in your browser.


## Development Guidelines

* Servers pull code from `master`. Development should happen in feature branches
and pull requests should merge back to `master` except in special cases.
* JavaScript code should follow Mozilla's [JavaScript guidelines](js-bootcamp),
and CSS code should follow our [CSS guidelines](css-bootcamp).

[js-bootcamp]: http://mozweb.readthedocs.org/en/latest/reference/js-style.html
[css-bootcamp]: http://mozweb.readthedocs.org/en/latest/reference/css-style.html


## Additional Resources

* IRC: #webprod on [irc.mozilla.org](https://wiki.mozilla.org/IRC).
* Planning/roadmap/meetings: [Lorax on MozillaWiki](https://wiki.mozilla.org/Engagement/Campaigns/Project_Lorax)
80 changes: 15 additions & 65 deletions README.md
@@ -1,71 +1,21 @@
Lorax
=====
# Shape of the Web

The Lorax is interested in your proposal.
Shape of the Web (codenamed "Lorax") is a micro-site encouraging the Mozilla
audience to educate themselves about the state of the Web, learn more about
Mozilla and show their support.

![skeptical lorax](http://i.imgur.com/NqMpLxC.jpg)
- [Project Lorax on wiki.mozilla.org](https://wiki.mozilla.org/Engagement/Campaigns/Project_Lorax)

## Get LESS
```sh
npm install -g less
```
## Contributing

## Initialize App
If you're interested in contributing, or are looking for instructions on how
to set up a local development copy of Lorax, check out the
[CONTRIBUTING.md](https://github.com/mozilla/lorax/blob/master/CONTRIBUTING.md)
file.

```sh
bower install
npm install
grunt server
```
## License

## Data Structure

In the data/ folder there are two subfolders: base/ and i18n/.

### Base

The base/ folder contains all data that is consistent across languages. None of the data in this folder will be changed as a result of localization.

##### main.json
Contains all issues, grouped by topic. Data for styling, type of infographic, tags, etc.

##### countries.topo.json
Contains the SVG data for drawing the world map.

### i18N

i18n is the localization folder. In it are subfolders which represent each language. Each language folder contains several files:

##### main.json
This file has four main sections: **topics**, **tags**, **modals**, and **misc**. <br>

* The **topics** section contains text for each issue on the detail page (name, title, copy, links, etc.). This is also where you'll find the data for **shareUrl**, which controls each issue's links for Twitter, Facebook, and email.

* The **tags** section contains the display name for each issue tag.

* The **modals** section is organized by the type of modal (about, legend, etc.) and contains all copy and relevant information for that modal.

* The **misc** section contains just that: miscellaneous information that doesn't warrant its own category. Example data includes the site header, labels for the nav, and text for the intro.

##### country-data.json

Contains a list of all countries and their data for the world map infographics.

##### infographics.json

This file is organized by issue. Each issue has a header, subheader, and source, as well as data that pertains to its specific infographic.

## Email Sign-Up Feature

Code for the email sign-up page is located at:

**/app/lorax/directives/modal-email.js**<br>
and <br>
**/app/lorax/directives/modal-email.tpl.html**<br/>

You can find the inputs for email, country, and ToS in the HTML file. They are all under the form tag with the class "keep-informed__form"

### Success / Fail Buttons
The styling and basic functionality for these buttons is implemented. There are variables for each button, **showFailedBtn** and **showSuccessBtn**. If there are set to true, the buttons will appear.<br>

The functions **onSubmitFail()** and **onSubmitSuccess()** provide functionality to turn these variables to true and set the other buttons to false. For example, running **onSubmitFail()** will show the "Failed" button and hide the "Submit" and "Success" buttons. Feel free to change the functionality as needed.
This software is licensed under the
[Mozilla Public License 2.0](https://www.mozilla.org/MPL/). For more
information, read the
[LICENSE](https://github.com/mozilla/lorax/blob/master/LICENSE) file.
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -18,7 +18,7 @@
"jquery": "~2.1.1",
"modernizr": "~2.8.3",
"requirejs": "~2.1.14",
"d3": "~3.4.12",
"d3": "~3.5",
"jquery-tiny-pubsub": "~0.7.0",
"angular-route": "~1.3.0",
"lodash": "~2.4.1",
Expand Down
51 changes: 51 additions & 0 deletions docs/workandco_notes.md
@@ -0,0 +1,51 @@
## Data Structure

In the data/ folder there are two subfolders: base/ and i18n/.

### Base

The base/ folder contains all data that is consistent across languages. None of the data in this folder will be changed as a result of localization.

##### main.json
Contains all issues, grouped by topic. Data for styling, type of infographic, tags, etc.

##### countries.topo.json
Contains the SVG data for drawing the world map.

### i18N

i18n is the localization folder. In it are subfolders which represent each language. Each language folder contains several files:

##### main.json
This file has four main sections: **topics**, **tags**, **modals**, and **misc**. <br>

* The **topics** section contains text for each issue on the detail page (name, title, copy, links, etc.). This is also where you'll find the data for **shareUrl**, which controls each issue's links for Twitter, Facebook, and email.

* The **tags** section contains the display name for each issue tag.

* The **modals** section is organized by the type of modal (about, legend, etc.) and contains all copy and relevant information for that modal.

* The **misc** section contains just that: miscellaneous information that doesn't warrant its own category. Example data includes the site header, labels for the nav, and text for the intro.

##### country-data.json

Contains a list of all countries and their data for the world map infographics.

##### infographics.json

This file is organized by issue. Each issue has a header, subheader, and source, as well as data that pertains to its specific infographic.

## Email Sign-Up Feature

Code for the email sign-up page is located at:

**/app/lorax/directives/modal-email.js**<br>
and <br>
**/app/lorax/directives/modal-email.tpl.html**<br/>

You can find the inputs for email, country, and ToS in the HTML file. They are all under the form tag with the class "keep-informed__form"

### Success / Fail Buttons
The styling and basic functionality for these buttons is implemented. There are variables for each button, **showFailedBtn** and **showSuccessBtn**. If there are set to true, the buttons will appear.<br>

The functions **onSubmitFail()** and **onSubmitSuccess()** provide functionality to turn these variables to true and set the other buttons to false. For example, running **onSubmitFail()** will show the "Failed" button and hide the "Submit" and "Success" buttons. Feel free to change the functionality as needed.
6 changes: 5 additions & 1 deletion package.json
@@ -1,7 +1,11 @@
{
"name": "Lorax",
"version": "0.1.0",
"description": "https://github.com/chrisjames-work/lorax",
"description": "https://github.com/mozilla/lorax",
"repository": {
"type": "git",
"url": "git://github.com/mozilla/lorax.git"
},
"devDependencies": {
"connect-modrewrite": "~0.7.9",
"grunt": "~0.4.5",
Expand Down

0 comments on commit 8fd10bc

Please sign in to comment.