Delete comment
116 |117 | Are you sure you want to delete this comment? This will remove the 118 | comment and cant be undone 119 |
120 | 121 | 122 |├── .gitignore ├── LICENSE ├── README.md ├── data.json ├── design ├── active-states.jpg ├── desktop-design.jpg ├── desktop-modal.jpg ├── desktop-preview.jpg ├── mobile-design.jpg └── mobile-modal.jpg ├── images ├── avatars │ ├── image-amyrobson.png │ ├── image-amyrobson.webp │ ├── image-juliusomo.png │ ├── image-juliusomo.webp │ ├── image-maxblagun.png │ ├── image-maxblagun.webp │ ├── image-ramsesmiron.png │ └── image-ramsesmiron.webp ├── favicon-32x32.png ├── icon-delete.svg ├── icon-edit.svg ├── icon-minus.svg ├── icon-plus.svg └── icon-reply.svg ├── index.html ├── script.js ├── style-guide.md └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | # Avoid accidental upload of the Sketch and Figma design files 2 | ##################################################### 3 | ## Please do not remove lines 5 and 6 - thanks! 🙂 ## 4 | ##################################################### 5 | *.sketch 6 | *.fig 7 | 8 | # Avoid accidental XD upload if you convert the design file 9 | ############################################### 10 | ## Please do not remove line 12 - thanks! 🙂 ## 11 | ############################################### 12 | *.xd 13 | 14 | # Avoid your project being littered with annoying .DS_Store files! 15 | .DS_Store 16 | .prettierignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Sarthak Sachdev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Interactive Comments Section 2 | 3 | ## Welcome! 👋 4 | 5 | ## Table of contents 6 | 7 | - [Overview](#overview) 8 | - [The challenge](#the-challenge) 9 | - [How to setup the project](#how-to-setup-the-project) 10 | - [Screenshot](#screenshot) 11 | - [Links](#links) 12 | - [My process](#my-process) 13 | - [Built with](#built-with) 14 | - [What I learned](#what-i-learned) 15 | - [Continued development](#continued-development) 16 | - [Useful resources](#useful-resources) 17 | - [Author](#author) 18 | - [Acknowledgments](#acknowledgments) 19 | 20 | ## Overview 21 | 22 | ### The challenge 23 | 24 | The challenge is to create the Interactive Comments Section, an interactive comment section component beautifully designed for the best user interaction. Users should be able to view the optimal layout for the app depending on their device's screen size and see hover states for all interactive elements on the page. They should also be able to create, read, update, and delete comments and replies, as well as upvote and downvote comments. 25 | 26 | ### How to setup the project 27 | 28 | To set up the project locally, follow these steps: 29 | 30 | 1. Clone the repository using GitHub Desktop or Git Bash: 31 | ```bash 32 | git clone https://github.com/SartHak-0-Sach/Interactive-comments-section_frontend_project.git 33 | ``` 34 | 2. Open the project folder in your code editor. 35 | 3. Run the project using a live server extension or deploy it using Netlify, Vercel, or another web hosting and deployment service. 36 | 37 | ### Screenshot 38 | 39 |  40 | 41 | ### Links 42 | 43 | - Solution URL: [GitHub Repository](https://github.com/SartHak-0-Sach/Interactive-comments-section_frontend_project) 44 | - Live Site URL: [Live Site](https://comments-section-frontend.netlify.app/) 45 | 46 | ## My process 47 | 48 | ### Built with 49 | 50 | - HTML5 51 | - CSS3 52 | - JavaScript 53 | 54 | You will find all the required assets in the `/design` folder. The assets are already optimized. 55 | 56 | There is also a `style-guide.md` file containing the information you'll need, such as color palette and fonts. 57 | 58 | ### What I learned 59 | 60 | This project was one of my first projects which really challenged my capabilities on making the page responsive using CSS media queries and so I was really proud of this snippet mentioned below when I was abel to successfully execute it- 61 | 62 | ```css 63 | @media screen and (max-width:640px) { 64 | .container { 65 | padding: .75rem; 66 | } 67 | 68 | .replies { 69 | padding-left: 1rem; 70 | margin-left: .5rem; 71 | } 72 | 73 | .comment { 74 | grid-template-areas: 75 | "user user user" 76 | "comment comment comment" 77 | "score ... controls" 78 | ; 79 | 80 | gap: .5rem; 81 | } 82 | 83 | .c-score { 84 | flex-direction: row; 85 | width: auto; 86 | } 87 | 88 | .reply-input { 89 | grid-template-areas: 90 | "input input input" 91 | "avatar ... button" 92 | ; 93 | grid-template-rows: auto min-content; 94 | align-items: center; 95 | gap: .5rem; 96 | } 97 | 98 | .reply-input img { 99 | height: 2rem; 100 | width: 2rem; 101 | } 102 | 103 | .reply-input textarea { 104 | height: 6rem; 105 | padding: .5rem; 106 | align-self: stretch; 107 | } 108 | } 109 | ``` 110 | 111 | ### Continued development 112 | 113 | The continuously learning journey of a programmer never ends. This project made me realize that there are many concepts that I need to work upon including fundamentals like flex-box and its properties, to more complex concepts like working with fetch and async await in javascript. These areas are some that I think I need to work more upon in the upcoming future as they highlight some of the most significant regions of web development that are important for every developer to know of. 114 | 115 | These key points mentioned here will help me grow accountable and consistent towards improving at writing good quality code and be a successful full stack developer one day. 116 | 117 | ### Useful resources 118 | 119 | - [Harkirat Singh course notes](https://github.com/SartHak-0-Sach/harkirat-singh-course_code_and_notes) - I have added notes of all lectures along with code and lecture insights of all weeks along with bonus lectures to help you all as much as I can. 120 | - [My development code and notes](https://github.com/SartHak-0-Sach/cwh-web-dev-playlist_code_and_notes) - These are my notes that I made while working on my development skills in initial days and did these courses. Make sure to star the repository if you like it.✨💫 121 | - [MDN documentation hover state for CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/:hover) - This is an amazing article which helped me finally understand hover states. I'd recommend it to anyone still learning this concept. 122 | 123 | ## Author 124 | 125 | Sarthak Sachdev 126 | - Website - [Sarthak Sachdev](https://itsmesarthak.netlify.app/) 127 | - LeetCode - [@sarthak_sachdev](https://leetcode.com/u/sarthak_sachdev/) 128 | - Twitter - [@sarthak_sach69](https://www.twitter.com/sarthak_sach69) 129 | 130 | ## Acknowledgments 131 | 132 | I feel like the solutions provided on the website and the continuous doubt solving by industry experts on discord for free is something that is unmatched by anyone else and need to be acknowledged for their efforts in improving me as a developer by suggesting the best practices in your respective tech stack. 133 | 134 | ## Got feedback for me? 135 | 136 | I love receiving feedback! I am always looking to improve my code and take up new innovative ideas to work upon. So if you have anything you'd like to mention, please email 'hi' at saarsaach30[at]gmail[dot]com. 137 | 138 | If you liked this project make sure to spread the word and share it with all your friends. 139 | 140 | **Happy coding!** ☺️🚀 141 | -------------------------------------------------------------------------------- /data.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentUser": { 3 | "image": { 4 | "png": "./images/avatars/image-juliusomo.png", 5 | "webp": "./images/avatars/image-juliusomo.webp" 6 | }, 7 | "username": "juliusomo" 8 | }, 9 | "comments": [ 10 | { 11 | "id": 1, 12 | "content": "Impressive! Though it seems the drag feature could be improved. But overall it looks incredible. You've nailed the design and the responsiveness at various breakpoints works really well.", 13 | "createdAt": "1 month ago", 14 | "score": 12, 15 | "user": { 16 | "image": { 17 | "png": "./images/avatars/image-amyrobson.png", 18 | "webp": "./images/avatars/image-amyrobson.webp" 19 | }, 20 | "username": "amyrobson" 21 | }, 22 | "replies": [] 23 | }, 24 | { 25 | "id": 2, 26 | "content": "Woah, your project looks awesome! How long have you been coding for? I'm still new, but think I want to dive into React as well soon. Perhaps you can give me an insight on where I can learn React? Thanks!", 27 | "createdAt": "2 weeks ago", 28 | "score": 5, 29 | "user": { 30 | "image": { 31 | "png": "./images/avatars/image-maxblagun.png", 32 | "webp": "./images/avatars/image-maxblagun.webp" 33 | }, 34 | "username": "maxblagun" 35 | }, 36 | "replies": [ 37 | { 38 | "id": 3, 39 | "content": "If you're still new, I'd recommend focusing on the fundamentals of HTML, CSS, and JS before considering React. It's very tempting to jump ahead but lay a solid foundation first.", 40 | "createdAt": "1 week ago", 41 | "score": 4, 42 | "replyingTo": "maxblagun", 43 | "user": { 44 | "image": { 45 | "png": "./images/avatars/image-ramsesmiron.png", 46 | "webp": "./images/avatars/image-ramsesmiron.webp" 47 | }, 48 | "username": "ramsesmiron" 49 | } 50 | }, 51 | { 52 | "id": 4, 53 | "content": "I couldn't agree more with this. Everything moves so fast and it always seems like everyone knows the newest library/framework. But the fundamentals are what stay constant.", 54 | "createdAt": "2 days ago", 55 | "score": 2, 56 | "replyingTo": "ramsesmiron", 57 | "user": { 58 | "image": { 59 | "png": "./images/avatars/image-juliusomo.png", 60 | "webp": "./images/avatars/image-juliusomo.webp" 61 | }, 62 | "username": "juliusomo" 63 | } 64 | } 65 | ] 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /design/active-states.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/design/active-states.jpg -------------------------------------------------------------------------------- /design/desktop-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/design/desktop-design.jpg -------------------------------------------------------------------------------- /design/desktop-modal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/design/desktop-modal.jpg -------------------------------------------------------------------------------- /design/desktop-preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/design/desktop-preview.jpg -------------------------------------------------------------------------------- /design/mobile-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/design/mobile-design.jpg -------------------------------------------------------------------------------- /design/mobile-modal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/design/mobile-modal.jpg -------------------------------------------------------------------------------- /images/avatars/image-amyrobson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-amyrobson.png -------------------------------------------------------------------------------- /images/avatars/image-amyrobson.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-amyrobson.webp -------------------------------------------------------------------------------- /images/avatars/image-juliusomo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-juliusomo.png -------------------------------------------------------------------------------- /images/avatars/image-juliusomo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-juliusomo.webp -------------------------------------------------------------------------------- /images/avatars/image-maxblagun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-maxblagun.png -------------------------------------------------------------------------------- /images/avatars/image-maxblagun.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-maxblagun.webp -------------------------------------------------------------------------------- /images/avatars/image-ramsesmiron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-ramsesmiron.png -------------------------------------------------------------------------------- /images/avatars/image-ramsesmiron.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/avatars/image-ramsesmiron.webp -------------------------------------------------------------------------------- /images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/Interactive-comments-section_frontend_project/8815c6386b51d76dc06e4a0092d5e6b1a3b48512/images/favicon-32x32.png -------------------------------------------------------------------------------- /images/icon-delete.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-reply.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 13 | 14 |117 | Are you sure you want to delete this comment? This will remove the 118 | comment and cant be undone 119 |
120 | 121 | 122 |
5
45 |maxblagun
81 |2 weeks ago
82 |84 | 85 | 86 |
87 |