Skip to content

Commit

Permalink
release: latest changes to production (anitab-org#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
annabauza authored Jul 24, 2020
1 parent 9ebef8a commit fac6922
Show file tree
Hide file tree
Showing 203 changed files with 1,603 additions and 334 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ language: node_js
node_js:
- 8.15.0

before_deploy:
- yarn
- yarn build

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_API_KEY
keep_history: true
local_dir: './build/'
target_branch: 'master'
on:
branch: production
branch: production
Binary file added Fork Button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 66 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,83 @@

This is the main website for **AnitaB.org Open Source**. It contains information about our various open source projects, the programs we participate in, information about how to contribute, and how to contact us.This website acts as an interface to help introduce people to the organization's Open Source community, and make the transition from newcomers to contributors easier.

## Setup and run

To setup the project locally follow the instructions:

#### Fork

_**Note**_: *This is only needed if you want to contribute to the project.*

If you want to contribute to the project you will have to create your own copy of the project on GitHub. You can do this by clicking the Fork button that can be found on the top right corner of the [landing page](https://github.com/anitab-org/anitab-org.github.io) of the repository.

#### Clone

_**Note**_: *For this you need to install git on your machine. You can download the git tool from [here](https://git-scm.com/downloads).*

* If you have forked the project, run the following command -

`git clone https://github.com/YOUR_GITHUB_USER_NAME/anitab-org.github.io`

where `YOUR_GITHUB_USER_NAME` is your GitHub handle.

* If you haven't forked the project, run the following command -

`git clone https://github.com/anitab-org/anitab-org.github.io`

#### Remote

_**Note**_: *This is only needed if you want to contribute to the project.*

When a repository is cloned, it has a default remote named `origin` that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote named upstream. For this project it can be done by running the following command -

`git remote add upstream https://github.com/anitab-org/anitab-org.github.io`

You can check that the previous command worked by running `git remote -v`. You should see the following output:

```
$ git remote -v
origin https://github.com/YOUR_GITHUB_USER_NAME/anitab-org.github.io (fetch)
origin https://github.com/YOUR_GITHUB_USER_NAME/anitab-org.github.io (push)
upstream https://github.com/anitab-org/anitab-org.github.io.git (fetch)
upstream https://github.com/anitab-org/anitab-org.github.io.git (push)
```


### Run app

Download the latest stable version of NodeJs [here](https://nodejs.org/en/download/) and install it. Install `yarn`. Run `node --version` and `yarn --version` to verify successful installation.

To get the frontend running locally:

* Clone this repository
* `yarn` to install all required dependencies
* `yarn start` to start the local server


## Prerequisites

**Javascript** - We are using technologies such as javascript , HTML , CSS for our website AnitaB.org Open Source.

**React-Native** - As our Whole content is written in react native so we can easly transform this into native apps in future.


## Contributing

**This project is under active development**

Please read our [Contributing Guidelines](https://github.com/anitab-org/anitab-org.github.io/blob/develop/CONTRIBUTING.md), [Code of Conduct](https://github.com/anitab-org/anitab-org.github.io/blob/develop/code_of_conduct.md) and [Reporting Guidelines](https://github.com/anitab-org/anitab-org.github.io/blob/develop/reporting_guidelines.md) thoroughly.
Please read our [Contributing Guidelines](docs/CONTRIBUTING.md), [Code of Conduct](docs/code_of_conduct.md) and [Reporting Guidelines](docs/reporting_guidelines.md) thoroughly.

## Branches

* **master** and **gh-pages**: These branches contain the deployment of the website.
* **develop**: This contains the latest code. All the contributing PRs must be sent to this branch.
* **production**: Merge develop into production triggers deployment of the website.
- **master**: These branches contain the deployment of the website.
- **develop**: This contains the latest code. All the contributing PRs must be sent to this branch.
- **production**: Merge develop into production triggers deployment of the website.

## Contact

If you have any questions or want to discuss something about this repo, feel free to reach out to our team on our Zulip channel [#Design-team](https://anitab-org.zulipchat.com/#narrow/stream/216323-design).
If you have any questions or want to discuss something about this repo, feel free to reach out to our team on our Zulip channel [#Design-team](https://anitab-org.zulipchat.com/#narrow/stream/216323-design). If you are a new contributor, head over to this project's stream [#anitab-org.github.io](https://anitab-org.zulipchat.com/#narrow/stream/235478-anitab-org.2Egithub.2Eio) on Zulip to see ongoing discussions.

## License

The project is licensed under the GNU General Public License v3.0. Learn more about it in the [LICENSE](https://github.com/anitab-org/anitab-org.github.io/blob/develop/LICENSE) file.
The project is licensed under the GNU General Public License v3.0. Learn more about it in the [LICENSE](LICENSE) file.
49 changes: 49 additions & 0 deletions Wiki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Fork

_**Note**: This is only needed if you want to contribute to the project._

If you want to contribute to the project you will have to create your own copy of the project on GitHub. You can do this by clicking the
**Fork** button that can be found on the top right corner of the [landing page]([https://github.com/anitab-org/anitab-org.github.io]) of the repository.


## [](https://github.com/anitab-org/anitab-org.github.io/wiki/Fork,-Clone-&-Remote#clone)Clone

_**Note**: For this you need to install [git](https://git-scm.com/) on your machine. You can download the git tool from [here](https://git-scm.com/downloads)._

- If you have forked the project, run the following command -

`git clone https://github.com/YOUR_GITHUB_USER_NAME/anitab-org.github.io`

where `YOUR_GITHUB_USER_NAME` is your GitHub handle.

- If you haven't forked the project, run the following command -

`git clone https://github.com/anitab-org/anitab-org.github.io`

## [](https://github.com/anitab-org/anitab-org.github.io/wiki/Fork,-Clone-&-Remote#remote)Remote

_**Note**: This is only needed if you want to contribute to the project._

When a repository is cloned, it has a default remote named `origin` that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote named upstream. For this project it can be done by running the following command -

`git remote add upstream https://github.com/anitab-org/anitab-org.github.io`

You can check that the previous command worked by running `git remote -v`. You should see the following output:

```
$ git remote -v
origin https://github.com/YOUR_GITHUB_USER_NAME/anitab-org.github.io (fetch)
origin https://github.com/YOUR_GITHUB_USER_NAME/anitab-org.github.io (push)
upstream https://github.com/anitab-org/anitab-org.github.io.git (fetch)
upstream https://github.com/anitab-org/anitab-org.github.io.git (push)
```
## Install
1. Latest stable version of NodeJs [here](https://nodejs.org/en/download/).
2. Install [yarn]([https://classic.yarnpkg.com/en/docs/install#windows-stable](https://classic.yarnpkg.com/en/docs/install#windows-stable)).
3. Run `node -v` and `yarn -v`. If you get the version number, then the installation was successful.

To get the frontend running locally:

- Clone this repository
- `yarn` to install all required dependencies
- `yarn start` or `npm start` to start the local server
23 changes: 23 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing Guidelines

* You can join us on [AnitaB.org Open Source Zulip](https://anitab-org.zulipchat.com/). Each active repo has its own stream to direct questions to (for example #powerup or #portal). anitab-org.github.io stream is [#anitab-org.github.io](https://anitab-org.zulipchat.com/#narrow/stream/235478-anitab-org.2Egithub.2Eio).
* Remember that this is an inclusive community, committed to creating a safe, positive environment. See the full [Code of Conduct](http://www.systers.io/code-of-conduct.html).
* Follow our [Commit Message Style Guide](https://github.com/anitab-org/mentorship-android/wiki/Commit-Message-Style-Guide) when you commit your changes.
* Please consider raising an issue before submitting a pull request (PR) to solve a problem that is not present in our [issue tracker](https://github.com/anitab-org/anitab-org.github.io/issues). This allows maintainers to first validate the issue you are trying to solve and also reference the PR to a specific issue.
* When developing a new feature, include at least one test when applicable.
* When submitting a PR, please follow [this template](.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) (which will probably be already filled up once you create the PR).
* When submitting a PR with changes to user interface (e.g.: new screen, ...), please add screenshots to the PR description.
* When you are finished with your work, please squash your commits otherwise we will squash them on your PR (this can help us maintain a clear commit history).
* When creating an issue to report a bug in the project, please follow our [bug_report.md](.github/ISSUE_TEMPLATE/bug_report.md) template.
* Issues labeled as “First Timers Only” are meant for contributors who have not contributed to the project yet. Please choose other issues to contribute to, if you have already contributed to these type of issues.

## General Guidelines

* If you’re just getting started work on an issue labeled “First Timers Only” in any project.
* In an active repository (not an archived one), choose an open issue from the issue list, claim it in the comments, and a maintainer will assign it to you.
* After approval you must make continuous notes on your progress in the issue while working. If there is not at least one comment every 3 days, the maintainer can reassign the issue.
* Create a branch specific to the issue you're working on, so that you send a PR from that branch instead of the base branch on your fork.
* If you’d like to create a new issue, please go through our issue list first (open as well as closed) and make sure the issues you are reporting do not replicate the existing issues.
* Have a short description on what has gone wrong (like a root cause analysis and description of the fix), if that information is not already present in the issue.
* If you have issues on multiple pages, report them separately. Do not combine them into a single issue.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-native-web": "^0.12.2",
"react-scripts": "3.4.1"
"react-scripts": "^3.4.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>AnitaB org open source</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
6 changes: 4 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState } from 'react';
import { View } from 'react-native';
import Header from './Components/Header';
import Content from './Components/Content';
import Footer from './Components/Footer';

function App() {
const [selected, setSelected] = useState(0);
Expand All @@ -11,12 +12,13 @@ function App() {
'PROGRAMS',
'PROJECTS',
'EVENTS',
'CONTRIBUTE',
'CONTRIBUTE'
];
return (
<View style={{ flex: 1, alignItems: 'center' }}>
<View style={{ position: 'absolute', width: '100%', alignItems: 'center' }}>
<Header selected={selected} setSelected={setSelected} titles={titles} />
<Content selected={selected} titles={titles} />
<Footer />
</View>
);
}
Expand Down
42 changes: 25 additions & 17 deletions src/Components/Content/index.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
import React from 'react';
import { View, Text, Image } from 'react-native';
import Projects from './../Projects';

function Content({ selected, titles }) {
return (
<View
style={{
width: 800,
height: 600,
alignItems: 'center',
paddingTop: 40,
}}
>
{renderContent(titles[selected])}
<Image
style={{ height: 200, width: 200 }}
source={require('./../../assets/contribute.png')}
/>
<Text>UNDER CONSTRUCTION</Text>
</View>
);
if (selected === 3) {
return <Projects />;
} else {
return (
<View
style={{
width: '80%',
alignItems: 'center',
paddingTop: 40,
}}
>
{renderContent(titles[selected])}
<Image
style={{ height: 200, width: 200 }}
source={require('./../../assets/contribute.png')}
/>
<Text>UNDER CONSTRUCTION</Text>
</View>
);
}
}

function renderContent(title) {
return <Text>{title}</Text>;
}

function renderContent(title) {
Expand Down
23 changes: 23 additions & 0 deletions src/Components/Footer/Contact.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import { View, Text } from 'react-native';
import styles from './styles';
import contentJson from '../../content/contact_us.json';

function Contact() {
const content = contentJson.sections.find(
section => section.title === 'Contact Us'
).content;

return (
<View style={[styles.col, styles.right]}>
<Text style={[styles.text, styles.heading]}>Contact Us</Text>
{content.map((content, i) => (
<Text style={[styles.text, styles.description]} key={i}>
{content.par}
</Text>
))}
</View>
);
}

export default Contact;
70 changes: 70 additions & 0 deletions src/Components/Footer/Form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React, { useState } from 'react';
import { View, Text, TextInput, TouchableHighlight } from 'react-native';
import styles from './styles';

function Form() {
const [email, updateEmail] = useState('');
const [message, updateMessage] = useState('');
const [emailBorder, updateEmailBorder] = useState(0);
const [messageBorder, updateMessageBorder] = useState(0);

return (
<View style={[styles.col, styles.left]}>
<Text style={[styles.text, styles.heading]}>
Any queries or feedbacks?
</Text>
<TextInput
style={[
styles.description,
styles.formField,
styles.formEmail,
{ borderWidth: emailBorder }
]}
placeholder='Your email address'
onChangeText={(text) => updateEmail(text)}
value={email}
/>
<TextInput
style={[
styles.description,
styles.formField,
styles.formMessage,
{ borderWidth: messageBorder }
]}
multiline={true}
placeholder='Your queries or feedbacks'
onChangeText={(text) => updateMessage(text)}
value={message}
/>
<TouchableHighlight style={styles.formButton} onPress={submitForm}>
<Text style={[styles.description, styles.text]}>Submit</Text>
</TouchableHighlight>
</View>
);

function submitForm() {
const emailRegex = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
let error = 0;

if (!email || !emailRegex.test(email)) {
updateEmailBorder(2);
error = 1;
} else {
updateEmailBorder(0);
}

if (!message) {
updateMessageBorder(2);
error = 1;
} else {
updateMessageBorder(0);
}

if (!error) {
updateEmail('');
updateMessage('');
}
}
}

export default Form;
Loading

0 comments on commit fac6922

Please sign in to comment.