├── .gitignore ├── LICENSE ├── README.md ├── design ├── active-states.jpg ├── desktop-design.jpg ├── desktop-preview.jpg └── mobile-design.jpg ├── images ├── favicon-32x32.png ├── icon-arrow.svg ├── icon-location.svg ├── pattern-bg-desktop.png └── pattern-bg-mobile.png ├── index.html ├── script.js ├── style-guide.md └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | # Avoid accidental Sketch file upload 2 | ############################################### 3 | ## Please do not remove line 5 - thanks! 🙂 ## 4 | ############################################### 5 | *.sketch 6 | 7 | # Avoid accidental XD or Figma upload if you convert the design file 8 | ####################################################### 9 | ## Please do not remove lines 11 and 12 - thanks! 🙂 ## 10 | ####################################################### 11 | *.xd 12 | *.fig 13 | 14 | # Avoid your project being littered with annoying .DS_Store files! 15 | .DS_Store 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2024, Sarthak Sachdev 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IP Address Tracker 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 | Discover the location, timezone, and ISP of any IP address with the IP Address Tracker! 25 | 26 | This webpage allows users to 27 | - View the optimal layout for each page depending on their device's screen size. 28 | - See hover states for all interactive elements on the page. 29 | - Find their own IP address on the map on the initial page load. 30 | Users can also search for any IP addresses or domains and see the key information and location. 31 | 32 | ### How to setup the project 33 | 34 | To set up the project locally, follow these steps: 35 | 36 | 1. Clone the repository using GitHub Desktop or Git Bash: 37 | ```bash 38 | git clone https://github.com/SartHak-0-Sach/IP-address-tracker_frontend_project.git 39 | ``` 40 | 2. Open the project folder in your code editor. 41 | 3. Run the project using a live server extension or deploy it using Netlify, Vercel, or another web hosting and deployment service. 42 | 43 | ### Screenshot 44 | 45 |  46 | 47 | ### Links 48 | 49 | - Solution URL: [GitHub Repository](https://github.com/SartHak-0-Sach/IP-address-tracker_frontend_project) 50 | - Live Site URL: [Live Site](https://ip-address-tracker-app-project.netlify.app/) 51 | 52 | ## My process 53 | 54 | ### Built with 55 | 56 | - HTML5 57 | - CSS3 58 | - JavaScript 59 | - Leaflet.js (for the map) 60 | - IP Geolocation API (for fetching IP address details) 61 | 62 | You will find all the required assets in the `/design` folder. The assets are already optimized. 63 | 64 | There is also a `style-guide.md` file containing the information you'll need, such as color palette and fonts. 65 | 66 | ### What I learned 67 | 68 | This project is great at understanding how to execute basic CSS features like flexbox, responsive layout using media queries for both desktop and mobile and all sizes in between as shown below- 69 | 70 | ```css 71 | @media (max-width: 920px) { 72 | .info-field { 73 | font-size: .9rem; 74 | } 75 | } 76 | 77 | @media (max-width: 770px) { 78 | #ip-input { 79 | width: min(380px, 70%); 80 | } 81 | 82 | .info { 83 | width: 85vw; 84 | } 85 | } 86 | 87 | @media (max-width: 600px) { 88 | .top { 89 | height: 35vh; 90 | padding: .7rem; 91 | } 92 | 93 | .title { 94 | font-size: 1.5rem; 95 | } 96 | 97 | .info { 98 | width: 75vw; 99 | flex-direction: column; 100 | text-align: center; 101 | gap: 1.1rem; 102 | top: 12%; 103 | } 104 | 105 | .box { 106 | width: 100%; 107 | border: none; 108 | } 109 | } 110 | ``` 111 | 112 | ### Continued development 113 | 114 | 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. 115 | 116 | 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. 117 | 118 | ### Useful resources 119 | 120 | - [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. 121 | - [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.✨💫 122 | - [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. 123 | 124 | ## Author 125 | 126 | Sarthak Sachdev 127 | - Website - [Sarthak Sachdev](https://itsmesarthak.netlify.app/) 128 | - LeetCode - [@sarthak_sachdev](https://leetcode.com/u/sarthak_sachdev/) 129 | - Twitter - [@sarthak_sach69](https://www.twitter.com/sarthak_sach69) 130 | 131 | ## Acknowledgments 132 | 133 | 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. 134 | 135 | ## Got feedback for me? 136 | 137 | 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. 138 | 139 | If you liked this project make sure to spread the word and share it with all your friends. 140 | 141 | **Happy coding!** ☺️🚀 142 | -------------------------------------------------------------------------------- /design/active-states.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/design/active-states.jpg -------------------------------------------------------------------------------- /design/desktop-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/design/desktop-design.jpg -------------------------------------------------------------------------------- /design/desktop-preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/design/desktop-preview.jpg -------------------------------------------------------------------------------- /design/mobile-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/design/mobile-design.jpg -------------------------------------------------------------------------------- /images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/images/favicon-32x32.png -------------------------------------------------------------------------------- /images/icon-arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-location.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/pattern-bg-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/images/pattern-bg-desktop.png -------------------------------------------------------------------------------- /images/pattern-bg-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/all-my-frontend-mini-projects/IP-address-tracker_frontend_project/b8a344bed54398b21fabef8c1ef73974effb4fbd/images/pattern-bg-mobile.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |