Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capstone2: Movie-website #30

Merged
merged 112 commits into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from 104 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a225d48
setting up webpack
GedeonTS May 17, 2022
2bafc97
Update webpack config
Lembani May 17, 2022
5731d04
Update dependencies
Lembani May 17, 2022
ead87a2
Add HTML boilerplate
Lembani May 17, 2022
12d2045
Add boilerplate
Lembani May 17, 2022
ecb486b
Add ESLint configuration
Lembani May 17, 2022
07e4559
Add build output
Lembani May 17, 2022
45fa07c
create linters
GedeonTS May 17, 2022
b95c517
Update ignore file
Lembani May 17, 2022
af67fc9
Create ESLint ignore file
Lembani May 17, 2022
417450d
Create Babel config
Lembani May 17, 2022
2e012b5
Create WebHint linter
Lembani May 17, 2022
921c68d
Add prettier config
Lembani May 17, 2022
35d321a
Add StyleLint linter
Lembani May 17, 2022
e4522af
Update dependencies
Lembani May 17, 2022
d2f2619
Merge pull request #19 from GedeonTS/setting-webpack
GedeonTS May 17, 2022
a29d5cb
create wrapper
GedeonTS May 17, 2022
d67eebd
Merge branch 'setting-webpack' into dev
GedeonTS May 17, 2022
6516e95
add npm start for webpack dev server
GedeonTS May 17, 2022
4eca473
add license text to the footer
GedeonTS May 17, 2022
a4c469e
create footer element
GedeonTS May 17, 2022
d6df2c7
change section to footer
GedeonTS May 17, 2022
4a15ce2
add border to the footer element
GedeonTS May 17, 2022
f7a2b91
Update script
Lembani May 17, 2022
fad64c4
Add header markup
Lembani May 17, 2022
fe8a74c
Add header styles
Lembani May 17, 2022
233df52
Add build output
Lembani May 17, 2022
0200dae
installing linters
GedeonTS May 17, 2022
de48447
install eslint locally
GedeonTS May 17, 2022
5623aaa
add js extension to footer
GedeonTS May 17, 2022
a19d9c7
delete useless spaces
GedeonTS May 17, 2022
eb70da6
delete useless spaces
GedeonTS May 17, 2022
1de8370
Create header
Lembani May 17, 2022
15ad0e3
Add header to document
Lembani May 17, 2022
46317b6
Update header markup
Lembani May 17, 2022
e073d4f
Add new build output
Lembani May 17, 2022
66a6a7d
Update linters
Lembani May 17, 2022
b8760cc
Add main title
Lembani May 17, 2022
99c31b4
config linters locally
GedeonTS May 17, 2022
089dd23
Merge pull request #21 from GedeonTS/footer
GedeonTS May 17, 2022
2477ba7
Merge branch 'dev' into create-header
Lembani May 17, 2022
ec33894
Merge pull request #20 from GedeonTS/create-header
Lembani May 17, 2022
56f4286
add style to the middle section
GedeonTS May 17, 2022
e6faa23
generate items from api
GedeonTS May 17, 2022
b789940
add markup to the homepage
GedeonTS May 17, 2022
aac094d
src/assets/
GedeonTS May 17, 2022
a2c0df7
create middle section
GedeonTS May 17, 2022
dc8c98f
adjut background to the homepage
GedeonTS May 17, 2022
719e373
fix errors
GedeonTS May 17, 2022
ad04fd3
remove commented code
GedeonTS May 17, 2022
e8f3b9a
Merge pull request #22 from GedeonTS/display
GedeonTS May 18, 2022
ddcefac
add h3 for item count
GedeonTS May 18, 2022
3e9740b
add counter function
GedeonTS May 18, 2022
59c5a81
add style to the homepage
GedeonTS May 18, 2022
07a3552
add h3 for item count
GedeonTS May 18, 2022
4b1f715
add text to h3
GedeonTS May 18, 2022
28d3a56
add font color to h3
GedeonTS May 18, 2022
a05aefc
fix linters
GedeonTS May 18, 2022
7753a41
fix stylelint
GedeonTS May 18, 2022
ae34396
fix lighthouse linter
GedeonTS May 18, 2022
0b8de7a
build up
GedeonTS May 18, 2022
200da6e
adjust image size
GedeonTS May 19, 2022
cdb05b2
add alt to images
GedeonTS May 19, 2022
f574a5d
Merge pull request #23 from GedeonTS/counter
GedeonTS May 19, 2022
ec45cf1
Add comment popup modal markup
Lembani May 20, 2022
f5ffaae
Add comment popup modal styles
Lembani May 20, 2022
f5f413a
Add comment popup modal functionality
Lembani May 20, 2022
8adc418
New build output
Lembani May 20, 2022
47e35a6
Fix linter errors
Lembani May 20, 2022
9c0e1bc
Merge pull request #24 from GedeonTS/create-display-comments-popup
Lembani May 20, 2022
0c71dc4
Add CSS styles for:
Lembani May 20, 2022
3789adc
Update to add:
Lembani May 20, 2022
137caf1
change likes color
GedeonTS May 20, 2022
18464df
import api related functions
GedeonTS May 20, 2022
9bc044a
add test
GedeonTS May 20, 2022
7eecd4e
add test to the movie counter function
GedeonTS May 20, 2022
b532a86
create fetching function
GedeonTS May 20, 2022
ec620db
add new variable
GedeonTS May 20, 2022
6947db6
create fetchlikes module
GedeonTS May 20, 2022
3483bf3
create liking function
GedeonTS May 20, 2022
759d917
add fetc likes api
GedeonTS May 20, 2022
a5c79e7
Merge pull request #25 from GedeonTS/create-display-comments-on-popup…
Lembani May 20, 2022
0187978
fix popup's bug
GedeonTS May 20, 2022
34bb307
rename test name
GedeonTS May 20, 2022
bcc4f5b
resolve conflict
GedeonTS May 20, 2022
4521c85
adjust parameters
GedeonTS May 20, 2022
43b7a07
add test
GedeonTS May 20, 2022
9ea4d54
resolve conlict in css file
GedeonTS May 20, 2022
a671b84
call functions in the main srcipt file
GedeonTS May 20, 2022
5c2f54e
rerwite fecthing function
GedeonTS May 20, 2022
38ed31d
rerwite fectLikes function
GedeonTS May 20, 2022
cd75aa1
create liking function
GedeonTS May 20, 2022
3a2de04
create fetch api function for likes
GedeonTS May 20, 2022
cee9fde
remove unnecessary addons
GedeonTS May 20, 2022
ed65c7e
src/moviesNumber.test.js
GedeonTS May 20, 2022
3063d8f
add missing semi colon
GedeonTS May 20, 2022
0583a86
config jest for testing
GedeonTS May 21, 2022
4683cb4
Merge pull request #26 from GedeonTS/likes
GedeonTS May 21, 2022
e8b9e9a
Add comment counter
Lembani May 21, 2022
7937c34
Merge pull request #27 from GedeonTS/count-comments
Lembani May 21, 2022
ad265ee
update readme
GedeonTS May 21, 2022
f596287
Add test to count comments on a movie
Lembani May 21, 2022
df4b7d7
Merge pull request #29 from GedeonTS/create-comment-counter-test
Lembani May 21, 2022
d1b8372
Merge pull request #28 from GedeonTS/update-readme
GedeonTS May 21, 2022
21d0eaf
Build output and deploy to GH pages
Lembani May 21, 2022
ed97ddb
Update package dependencies
Lembani May 21, 2022
f8c83ba
Add image loader config
Lembani May 21, 2022
c2b10d7
Update Styles
Lembani May 21, 2022
425e61b
Add logo images
Lembani May 21, 2022
ef207e5
Add logo on header
Lembani May 21, 2022
1e74e69
Update markup
Lembani May 21, 2022
3b2586e
Build output
Lembani May 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
}
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
coverage/
26 changes: 26 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb-base"],
"rules": {
"no-return-assign":"off",
"no-shadow": "off",
"no-param-reassign": "off",
"eol-last": "off",
"import/extensions": [ 1, {
"js": "always", "json": "always"
}]
},
"ignorePatterns": [
"dist/",
"build/"
]
}
64 changes: 64 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
lighthouse:
name: Lighthouse
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Lighthouse
run: |
npm install --save-dev hint@6.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Lighthouse Report
run: npx hint .
webhint:
name: Webhint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Webhint
run: |
npm install --save-dev hint@6.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Webhint Report
run: npx hint .
stylelint:
name: Stylelint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
eslint:
name: ESLint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup ESLint
run: |
npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
- name: ESLint Report
run: npx eslint .
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.DS_Store
.vscode
18 changes: 18 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"connector": {
"name": "local",
"options": {
"pattern": ["**", "!.git/**", "!node_modules/**", "!coverage/**"]
}
},
"extends": ["development"],
"formatters": ["stylish"],
"hints": [
"button-type",
"disown-opener",
"html-checker",
"meta-charset-utf-8",
"meta-viewport",
"no-inline-styles:error"
]
}
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"tabWidth": 2
}
20 changes: 20 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
}
],
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx", "coverage/**"]
}
105 changes: 104 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,104 @@
# kanban-board


![](https://img.shields.io/badge/Microverse-blueviolet)

# Movie-website

## Description
| Desktop Version |
| --------------------------------------------------------- |
| ![Screenshot from 2022-05-21 08-24-45](https://user-images.githubusercontent.com/97834160/169639118-c87604e7-725b-4d11-a69a-d9cd30c719ea.png) |

> "Movie-website" is a website which display movies from TVmaze api allowing users to like and comment. It keeps record of the users actions by counting likes and comments, saving them to an external server. We are building this website with Javascript (ES6) and Webpack, using promises and async awaits and multiple apis.

### Built With

- Javascript
- HTML and CSS
- WEBPACK
- NPM
- VS CODE


### Getting Started

You can have a copy of this repo run on your local machine by just directly cloning it.

### Live Demo

<!-- Click [here](https://gedeonts.github.io/......./)! -->
Coming Soon! 🔥

### Prerequisites

- Node.js
- npm
- vscode(or else)

To get the output of our project make sure you have google Chrome, Mozila or any other browser installed.

## Install

> In order to install this project please go through the following steps:

1. - [ ] Open the `Terminal`
2. - [ ] Navigate to the directory where you want to add this repository
3. - [ ] Run `git clone https://github.com/GedeonTS/Leaderboard.git`
4. - [ ] Run `npm install` to install the necessary modules
5. - [ ] Run `npm start`


### Run the following commands to run linter tests

WebHint
```bash
$ npx hint .
```

StyleLint
```bash
$ npx stylelint "**/*.{css,scss}"
```

ESLint
```bash
$ npx eslint .
```

### Usage

> Open the index.html file with your code editor of your choice and/or a browser of your choice.
```bash
Open the project using a live saver extension that can be found into your code editor.
```

## Authors

👤 **GedeonTS**

- GitHub: [@GedeonTS](https://github.com/GedeonTS)
- Twitter: [@Gedeon191](https://twitter.com/Gedeon191)
- LinkedIn: [Ushindi Gedeon](https://linkedin.com/in/ushindi-gedeon-73032a228)


👤 **Lembani Sakala**

- GitHub: [@lembani](https://github.com/lembani)
- Twitter: [@lembani_](https://twitter.com/lembani_)
- LinkedIn: [lembani-sakala-b58615109](https://linkedin.com/in/lembani-sakala-b58615109)



## Show your support

Give a ⭐️ if you like this project!

## Acknowledgments

- Hat tip to anyone who helped us.

## 📝 License

This project is [MIT](./MIT.md) licensed.


9 changes: 9 additions & 0 deletions __mocks__/commentsCount.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const comments = (commentList) => {
let counter;
commentList.forEach((comment, index) => {
counter = index + 1;
});
return counter;
};

export default comments;
9 changes: 9 additions & 0 deletions __mocks__/moviesNumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const movies = (arr) => {
let length;
arr.forEach((element, i) => {
length = i + 1;
});
return length;
};

export default movies;