├── .gitignore
├── assets
├── img
│ ├── bg-people.png
│ ├── bg-people.@2x.png
│ ├── pope-francis.png
│ ├── pope-francis.@2x.png
│ ├── hamburger.svg
│ ├── close.svg
│ ├── search.svg
│ ├── facebook.svg
│ ├── twitter.svg
│ ├── thumbs-up.svg
│ ├── thumbs-down.svg
│ └── wikipedia.svg
└── data.json
├── README.md
├── index.html
└── css
└── main.css
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 |
--------------------------------------------------------------------------------
/assets/img/bg-people.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zemoga/ui-test/HEAD/assets/img/bg-people.png
--------------------------------------------------------------------------------
/assets/img/bg-people.@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zemoga/ui-test/HEAD/assets/img/bg-people.@2x.png
--------------------------------------------------------------------------------
/assets/img/pope-francis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zemoga/ui-test/HEAD/assets/img/pope-francis.png
--------------------------------------------------------------------------------
/assets/img/pope-francis.@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zemoga/ui-test/HEAD/assets/img/pope-francis.@2x.png
--------------------------------------------------------------------------------
/assets/img/hamburger.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/img/close.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/img/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/img/facebook.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/img/twitter.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/img/thumbs-up.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/img/thumbs-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "data": [
3 | {
4 | "name": "Kanye West",
5 | "description": "Born in Atlanta and raised in Chicago, West was first known as a producer for Roc-A-Fella Records in the early 2000s, producing singles for several mainstream artists.",
6 | "category": "entertainment",
7 | "picture": "kanye.png",
8 | "lastUpdated": "2020-03-10T23:08:57.892Z",
9 | "votes": {
10 | "positive": 23,
11 | "negative": 36
12 | }
13 | },
14 | {
15 | "name": "Mark Zuckerberg",
16 | "description": "Born in White Plains, New York, Zuckerberg attended Harvard University, where he launched the Facebook social networking service from his dormitory room on February 4, 2004.",
17 | "category": "business",
18 | "picture": "mark.png",
19 | "lastUpdated": "2021-02-14T23:10:19.134Z",
20 | "votes": {
21 | "positive": 418,
22 | "negative": 324
23 | }
24 | },
25 | {
26 | "name": "Cristina Fernández de Kirchner",
27 | "description": "Her first term of office started with a conflict with the agricultural sector, and her proposed taxation system was rejected.",
28 | "category": "politics",
29 | "picture": "cristina.png",
30 | "lastUpdated": "2020-12-10T23:41:07.120Z",
31 | "votes": {
32 | "positive": 45,
33 | "negative": 97
34 | }
35 | },
36 | {
37 | "name": "Malala Yousafzai",
38 | "description": "The daughter of educational activist Ziauddin, Yousafzai was born to a Pashtun family in Mingora, Khyber Pakhtunkhwa, Pakistan. Her family came to run a chain of schools in the region.",
39 | "category": "politics",
40 | "picture": "malala.png",
41 | "lastUpdated": "2020-12-10T23:41:07.120Z",
42 | "votes": {
43 | "positive": 18,
44 | "negative": 3
45 | }
46 | },
47 | {
48 | "name": "Elon Musk",
49 | "description": "In 2002, Musk founded SpaceX, an aerospace manufacturer and space transport services company, of which he is CEO, CTO, and lead designer.",
50 | "category": "business",
51 | "picture": "elon.png",
52 | "lastUpdated": "2020-12-20T23:43:38.041Z",
53 | "votes": {
54 | "positive": 1237,
55 | "negative": 894
56 | }
57 | },
58 | {
59 | "name": "Greta Thumberg",
60 | "description": "Thunberg's activism started after convincing her parents to adopt several lifestyle choices to reduce their own carbon footprint.",
61 | "category": "environment",
62 | "picture": "greta.png",
63 | "lastUpdated": "2021-02-26T23:44:50.326Z",
64 | "votes": {
65 | "positive": 118,
66 | "negative": 45
67 | }
68 | }
69 | ]
70 | }
--------------------------------------------------------------------------------
/assets/img/wikipedia.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Zemoga Front End Development - Candidate Test v2.1
2 | ==================================================
3 |
4 | 👋 Welcome! Are you ready to become a Zemogian FED?
5 | --------------------------------------------------
6 |
7 | ### Overview
8 |
9 | Our client's app Rule of Thumb™️ tracks the sentiment of their users on trending and controversial people from different fields, including politics, business, media and entertainment, etc. The website has the following requirement: they need to present their users with an easy way to share their opinion on each presented celebrity, using votes (thumbs up and down), and display the results to the user while the poll is open. These features should be available to all users, regardless of where they're accessing the website from, whether it's a smartphone, a tablet or a desktop computer.
10 |
11 | > 👉 **The challenge**: Build a responsive display component for the data provided, and add it to the Rule of Thumb™️ website, complying with the design specifications.
12 |
13 | ### Acceptance Criteria
14 |
15 | Below you will find the minimum requirements we need to consider this challenge as completed 🎉
16 |
17 | 1. [ ] The interactive component should meet the design criteria, which you can find below in the different required resolutions:
18 | - [Mobile Prototype](https://www.figma.com/proto/NlQ6PjfanVO2YyuDUaohjx/Rule-of-Thumb---FED-Challenge?node-id=6%3A43&scaling=min-zoom)
19 | - [Tablet Prototype](https://www.figma.com/proto/NlQ6PjfanVO2YyuDUaohjx/Rule-of-Thumb---FED-Challenge?node-id=84%3A1033&scaling=min-zoom)
20 | - [Desktop Prototype](https://www.figma.com/proto/NlQ6PjfanVO2YyuDUaohjx/Rule-of-Thumb---FED-Challenge?node-id=84%3A2401&scaling=min-zoom)
21 | - [Design Handoff (Figma)](https://www.figma.com/file/NlQ6PjfanVO2YyuDUaohjx/Rule-of-Thumb---FED-Challenge)
22 | 2. [ ] In mobile version, cards **should only** be displayed as a list of cards, with horizontal scrolling and overflow.
23 | 3. [ ] In tablet and desktop versions, user **should be able to switch views** between _list view_ and _grid view_, using the dropdown menu, which should be located at the top right section of the component.
24 | 1. If the _list view_ is selected, all cards should be stacked vertically, according to the design specs.
25 | 2. If the _grid view_ is selected, all cards should be positioned as a grid of elements, according to the design specs.
26 | 4. [ ] Each card should contain a **gauge bar** at the bottom, which will display the distribution of positive and negative votes **as a percentage**. (See `assets/data.json` for reference).
27 | 5. [ ] Each card should contain three buttons: a **"thumbs down" (yellow)**, a **"thumbs up" (teal)** and a "Vote now" button **which should be disabled** by default.
28 | 1. If either "thumbs up" or "thumbs down" button is pressed, it should **toggle the selected state of that button** (denoted as a white border, see design specs for reference), and enable the "Vote Now" button.
29 | 2. If "Vote Now" button is pressed, **that vote should be posted**, and three other things should happen:
30 | 1. Eyebrow text should change to the copy "Thank you for your vote!"
31 | 2. "Vote now" text should change to the copy "Vote Again"
32 | 3. The **gauge bar** below should reflect the changes in the registered data and **percentage should be updated**.
33 | 3. If "Vote Again" button is pressed, all buttons should return to the initial state, and all modified copy texts should be reverted to their original state. The gauge bar, however, should persist the votes already posted.
34 | 6. [ ] **All posted votes should be persisted** by any means, and should be exactly the same count, even if the page is refreshed. Use _any_ persistance mechanisms you prefer: LocalStorage, Cookies, IndexedDB, URL params, a Back End service (Firebase, DynamoDB, Redis, etc).
35 |
36 | > ✅ You won't start from scratch! In this repository you can find the file `index.html` which contains the source code of the website, and the section in which you should include the interactive component. Feel free to use, reuse, refactor and/or vandalize any CSS variables, class names and markup as a starting point.
37 |
38 | Tips on Delivery
39 | ----------------
40 |
41 | Whew! that was a lot of requirements, wasn't it? 😬
42 |
43 | Here are some tips to make this challenge truly enjoyable:
44 |
45 | - **Use any framework/library/tool you like.** Anything goes! React freak? Angular nerd? Vue believer? Svelte/Ember/Mithril/_younameit_ hipster? _jQuery ninja_? (Still relevant this days, go figure 😅). Even if you are a purist Vanilla HTML/CSS/ECMAScript user, please use whichever tool you need to showcase the best of your work.
46 | - **We don't care about IE** and neither should you. We'll test in Chromium, like all cool people do.
47 | - **Please send us the manual** or at least instructions in a README.md file on how to run your code, if we need to compile/transpile/serve the code you send us. We'll try our best to figure out issues if any problem arises, but a good developer should always ensure that their code works in places other that their own machine. We suggest using the [_engines_ property](https://medium.com/@faith__ngetich/locking-down-a-project-to-a-specific-node-version-using-nvmrc-and-or-engines-e5fd19144245) in a `package.json`, an `.nvmrc` file or [Volta](https://docs.volta.sh/guide/), if you need to lockdown specific tool versions (such as Node.js, yarn, etc).
48 | - **Cleanup your boilerplate**. Useless files, empty tests, commented out code and everything alike hinders our ability to see your real code. So, if you're using CLIs, generators or code boilerplate of any sort, please be kind and cleanup anything that's not adding value to the result.
49 | - **We value your time.** There's no time limit on this challenge (well, reasonably speaking, we don't expect you to take more than **three days** on it), and as long as you send us working code that meets the criteria described above, we're happy. Don't overthink it though, find an easy way to achieve a good result and stick to it.
50 | - **No copypasta, please.** You can find anything on GitHub and StackOverflow these days, can't you? Well, _so can we_. We won't blame you if you forgot how to use the LocalStorage API. Just don't copypaste big chunks of code.
51 |
52 |
53 | ### Going above and beyond 🚀
54 |
55 | If you feel that covering the basic acceptance criteria isn't enough to showcase the best of your abilities feel free to add a little extra. **This is by no means mandatory** but if there are any valuable additional skills you'd like to show off go right ahead. These are just a few ideas of things you could add:
56 |
57 | - Implement any sort of _state management solution_, that deals with data updates in a coherent manner.
58 | - Write some tests. Unit, Integration, E2E, anything that ensures that your code is unbreakable.
59 | - Do you know any back end language? Does _serverless_ ring a bell? Build some basic back end that deals with persistance.
60 | - Implement some level of accessibility for impaired people reviewing your code.
61 | - _Containerize_ the entire website and make it run flawlessly on any machine.
62 | - Cleanup your commit history and show us your thought process with atomic commits.
63 | - Document your code. Use any format you know of to generate documentation that allow us to peek under the hood.
64 | - Include any SEO strategy, and show off your score in any popular tool.
65 | - Create configuration for different environments, and optimize your code for production usage.
66 |
67 | > ⚠️ The sky is the limit, but so is your time. Remember that any of these is **entirely optional**. We want our heads blown by your code, but we won't wait three months for your masterpiece. Be reasonable and stick to what you can achieve in **three days tops**.
68 |
69 | Challenge complete?
70 | -------------------
71 |
72 | Send a link to your recruiter pointing to your repository (Github or Bitbucket). The **master** branch should contain the entire result, along with the instructions to run your code on the README.md file (if apples).
73 |
74 | Happy coding! 🙌
75 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
53 | He’s talking tough on clergy sexual abuse, or is he just another pervert protector? (thumbs down) or a true pedophile punishing pontiff? (thumbs up)
54 |