Home Web Front-end CSS Tutorial Build a Focus on Today Website

Build a Focus on Today Website

Sep 03, 2024 pm 12:46 PM

Build a Focus on Today Website

Introduction

Hello, developers! I’m excited to share my latest project: a Focus on Day application. This project is ideal for those who want to keep track of their daily focus and ensure they stay on top of their tasks. It’s a great way to enhance your frontend development skills using HTML, CSS, and JavaScript while creating a functional and visually appealing productivity tool.

Project Overview

The Focus on Day is a web application designed to help users stay focused on their daily tasks. With a clean and user-friendly interface, it allows users to set a daily focus and keep track of their progress throughout the day. This project demonstrates how to create a practical productivity tool using modern web development techniques.

Features

  • User-Friendly Interface: The application has a simple and intuitive design, making it easy for users to set and manage their daily focus.
  • Responsive Design: The application is fully responsive, providing an optimal viewing experience on both desktop and mobile devices.
  • Task Management: Users can set their focus for the day and track their progress as they work towards achieving their goals.

Technologies Used

  • HTML: Provides the structure for the Focus on Day application.
  • CSS: Styles the application to create a clean and responsive design.
  • JavaScript: Manages the interactive elements, including task management and progress tracking.

Project Structure

Here’s an overview of the project structure:

Focus-on-Day/
├── index.html
├── style.css
└── script.js
Copy after login
  • index.html: Contains the HTML structure for the Focus on Day application.
  • style.css: Includes CSS styles to create an engaging and responsive design.
  • script.js: Manages the interactive elements, such as setting tasks and tracking progress.

Installation

To get started with the project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/abhishekgurjar-in/Focus-on-Day.git
    
    Copy after login
  2. Open the project directory:

    cd Focus-on-Day
    
    Copy after login
  3. Run the project:

    • Open the index.html file in a web browser to view the Focus on Day application.

Usage

  1. Open the application in a web browser.
  2. Set your daily focus by entering a task or goal in the input field.
  3. Track your progress as you work through the day.
  4. Update or change your focus as needed.

Code Explanation

HTML

The index.html file defines the structure of the Focus on Day application, including input fields for setting the focus and displaying progress. Here’s a snippet:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="style.css" />
    <script src="script.js" defer></script>
    <title>Focus on Day</title>
  </head>
  <body>
    <div class="container">
      <h1>Focus on Day</h1>
      <input type="text" id="focusInput" placeholder="Enter your focus for today..." />
      <button id="setFocusButton">Set Focus</button>
      <div id="focusDisplay"></div>
      <button id="clearFocusButton">Clear Focus</button>
    </div>
    <div class="footer">
      <p>Made with ❤️ by Abhishek Gurjar</p>
    </div>
  </body>
</html>
Copy after login

CSS

The style.css file styles the Focus on Day application, ensuring it’s visually appealing and responsive. Below are some key styles:

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}

.container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

h1 {
  margin-bottom: 20px;
  font-size: 24px;
}

input[type="text"] {
  padding: 10px;
  width: 80%;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

#focusDisplay {
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.footer {
  margin-top: 20px;
  color: #333;
}
Copy after login

JavaScript

The script.js file contains the functionality for setting and clearing the daily focus. Here’s a simple snippet for demonstration:

document.getElementById('setFocusButton').addEventListener('click', function() {
  const focusInput = document.getElementById('focusInput').value;
  if (focusInput) {
    document.getElementById('focusDisplay').innerText = `Today's Focus: ${focusInput}`;
    document.getElementById('focusInput').value = '';
  }
});

document.getElementById('clearFocusButton').addEventListener('click', function() {
  document.getElementById('focusDisplay').innerText = '';
});
Copy after login

Live Demo

You can check out the live demo of the Focus on Day project here.

Conclusion

Building the Focus on Day application was a fantastic experience in creating a simple yet effective productivity tool. This project underscores the importance of task management in staying focused and achieving daily goals. By applying HTML, CSS, and JavaScript, we’ve developed an application that helps users keep their focus on track throughout the day. I hope this project inspires you to build your own productivity tools. Happy coding!

Credits

This project was developed as part of my continuous learning journey in web development.

Author

  • Abhishek Gurjar
    • GitHub Profile

Feel free to use this format for your blog post!

The above is the detailed content of Build a Focus on Today Website. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Vue 3 Vue 3 Apr 02, 2025 pm 06:32 PM

It&#039;s out! Congrats to the Vue team for getting it done, I know it was a massive effort and a long time coming. All new docs, as well.

Building an Ethereum app using Redwood.js and Fauna Building an Ethereum app using Redwood.js and Fauna Mar 28, 2025 am 09:18 AM

With the recent climb of Bitcoin’s price over 20k $USD, and to it recently breaking 30k, I thought it’s worth taking a deep dive back into creating Ethereum

Can you get valid CSS property values from the browser? Can you get valid CSS property values from the browser? Apr 02, 2025 pm 06:17 PM

I had someone write in with this very legit question. Lea just blogged about how you can get valid CSS properties themselves from the browser. That&#039;s like this.

A bit on ci/cd A bit on ci/cd Apr 02, 2025 pm 06:21 PM

I&#039;d say "website" fits better than "mobile app" but I like this framing from Max Lynch:

Stacked Cards with Sticky Positioning and a Dash of Sass Stacked Cards with Sticky Positioning and a Dash of Sass Apr 03, 2025 am 10:30 AM

The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll.

Using Markdown and Localization in the WordPress Block Editor Using Markdown and Localization in the WordPress Block Editor Apr 02, 2025 am 04:27 AM

If we need to show documentation to the user directly in the WordPress editor, what is the best way to do it?

Comparing Browsers for Responsive Design Comparing Browsers for Responsive Design Apr 02, 2025 pm 06:25 PM

There are a number of these desktop apps where the goal is showing your site at different dimensions all at the same time. So you can, for example, be writing

Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Apr 05, 2025 pm 05:51 PM

Questions about purple slash areas in Flex layouts When using Flex layouts, you may encounter some confusing phenomena, such as in the developer tools (d...

See all articles