Skip to content

Commit

Permalink
Help button finally completed after a big git saga
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnax308 committed Sep 18, 2024
1 parent 7019a4a commit da0580e
Show file tree
Hide file tree
Showing 10 changed files with 288 additions and 118 deletions.
178 changes: 135 additions & 43 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
font-style: normal;
}

@font-face {
font-family: "JetBrain";
src: url('./assets/JetBrainsMonoNL-BoldItalic.ttf') format("truetype");
font-weight: normal;
font-style: normal;
}

/* -------------------------------------------------------------------------- */
/* ------------------------GENERAL APP-WIDE STYLES--------------------------- */
/* -------------------------------------------------------------------------- */
Expand Down Expand Up @@ -1700,30 +1707,36 @@ redudant. Not putting under calendar chart styles for obvious reasons. */
z-index: 100;
}

.help-modal{
.help-modal {
position: relative;
width: 80%;
height: 85%;
background-color: #0a0c11;
background-color: black;
border: 3px solid var(--grey);
z-index: 100;
display: flex;
flex-direction: column;
bottom: 3%;
}


.help-close-x-btn {
align-items: end;
content: none;
.help-modal .slick-list{
appearance: none;
}

.help-x-btn {
content: none;
flex: 10%;
position: relative;
left: 720px;
top: -50px;
width: 50px;
height: 50px;
height: 10px;
max-height: 50px;
border: none;
background: none;
border-radius: 5px;
transition: background 0.5s;
z-index: 101;
}

.help-X {
Expand All @@ -1735,6 +1748,7 @@ redudant. Not putting under calendar chart styles for obvious reasons. */
height: 1px;
background-color: rgb(255, 255, 255);
transform: translateX(-50%) rotate(45deg);
z-index: 100;
}

.help-Y {
Expand All @@ -1746,6 +1760,7 @@ redudant. Not putting under calendar chart styles for obvious reasons. */
height: 1px;
background-color: #fff;
transform: translateX(-50%) rotate(-45deg);
z-index: 100;
}

.help-x-btn:hover {
Expand All @@ -1769,68 +1784,145 @@ redudant. Not putting under calendar chart styles for obvious reasons. */
}
}

.slide {
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
background: #0a0c11 ;
height: 800px;
.carousel {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}

.slide h1 {
margin-bottom: 40px;
.carousel-slide {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
transition: opacity 0.5s;
}

.carousel-slide.active {
display: grid;
opacity: 1;
align-items: center;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 2fr;
grid-template-areas:
'img-top title'
'img-bot content';
}

.carousel-slide.active h2{
text-align: center;
grid-area: title;
font-size: 64px;
padding-top:10px ;
margin-bottom: 10px;
font-family: JetBrain;
line-height: 1.2;
text-wrap: wrap;
}

.slide p {
.carousel-slide img {
height: 60%;
width: 100%;
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 3;
grid-auto-columns: minmax(500px, auto);
overflow: hidden;
}

.carousel-slide p {
font-size: 25px;
margin-bottom: 10px;
grid-area: content;
padding-left: 20px;
padding-right: 20px;
word-break: keep-all;
font-family: JetBrain;
}

.help-screen-content {
height: 100%;
width: 100%;
justify-content: end;
padding: 12px 18px;
}

.welcome-slide {
display: none;
}

.welcome-slide.active{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
text-align: center;
font-size: 80px;
margin-top: 240px;
justify-content: center;
}

.slide img {
max-width: 100%;
height: auto;
.welcome-slide.active h2 {
font-size: 70px;
font-weight: bold;
text-align: center;
margin: 0px;
padding: 0;
transform: translateY(-50%);
font-family: JetBrain;
}

.custom-arrow {
.carousel-indicators {
position: absolute;
top: 45%;
transform: translateY(-50%);
background: #3576cc;
border-radius: 15px;
width: 50px;
height: 50px;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}

.carousel-indicators button {
margin: 0 5px;
border: none;
background-color: #fff;
cursor: pointer;
z-index: 100;
color: var(--secondary);
font-size: 24px;
padding: 5px;
border-radius: 50%;
}

.custom-arrow svg{
fill: white;
.carousel-indicators button.active {
background-color: #333;
color: #fff;
}

.custom-prev {
left: -50px;
padding-left: 10px;
.carousel-prev, .carousel-next {
position: absolute;
top: 45%;
transform: translateY(-50%);
background-color: #3576bb;
border-radius: 12px;
border: none;
cursor: pointer;
font-size: 36px;
padding: 10px;
padding-bottom: 15px;
z-index: 1;

}

.custom-next {
right: -50px;
.carousel-prev {
left: 10px;
}

.carousel-next {
right: 10px;
}

.carousel-prev:hover, .carousel-next:hover {
background-color: #ccc;
filter: brightness(120%);
}

.carousel-prev:active, .carousel-next:active {
background-color: #aaa;
}
Binary file added src/assets/gifs/comp.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gifs/group.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gifs/nested.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gifs/task.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gifs/tenor.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gifs/tomm.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gifs/work-work-in-progress.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions src/utility/CustomCarousel.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
import React, { useState, useEffect } from "react";
import taskgif from "../assets/gifs/task.gif";
import tomgif from "../assets/gifs/tomm.gif";
import compgif from "../assets/gifs/comp.gif";
import groupgif from "../assets/gifs/group.gif";
import nestedgif from "../assets/gifs/nested.gif";
import workgif from "../assets/gifs/work-work-in-progress.gif";
import feedgif from "../assets/gifs/tenor.gif"

const Carousel = React.forwardRef((props, ref) => {
const [currentIndex, setCurrentIndex] = useState(0);
const [slides, setSlides] = useState([
{ id: 1, title: "Welcome to HabTrack" },
{
id: 2,
image: taskgif,
title: "Tasks",
content:
"Tasks are any real life activity that you do or plan to do. What are tasks? You can define them, because they can be anything that you want.\nSince tasks are a part of your TO-DO list, we expect that you are planning to do them! At least we hope, you will do them.\nYou can create a task.\nYou can edit them, we will let you get away with those typos.\nIf you ever feel like slacking off, you can delete them! We prefer you complete them though.\nFeel like you have a long day tommorow? You can even set tasks for tommorow! We will talk about this a bit later. ",
},
{
id: 3,
image: compgif,
title: "Completed Tasks",
content:
"No better joy in life than completing a long-awaited task.\nAlso no bigger satisfaction than seeing a list of tasks that you have conquered (um, I mean completed).\nThat's why we present to you, your trophy cabinet for the day, a list of completed tasks.\nComes near and whispers 'You can flex this' Nods with agreement.\nMarked a task completed by mistake? Don't worry, we gotchu.\nYou can undo a task in completed list, because who doesn't make mistakes. ",
},
{
id: 4,
image: groupgif,
title: "Groups",
content: "Have a series of tasks related to each to other? You can group them together!\nIntroducing groups, so that your tasks are more organized!\nThis gives you a better idea about what to do and in which area.\nYou can add more groups, edit them and delete them as well.\nYou also have a side menu to directly add tasks to the group! Saving you a few extra clicks.\nPS: The default group is called 'root' and is denoted by /.",
},
{
id: 5,
image: nestedgif,
title: "Nested Groups",
content: "Feel like groups aren't enough to satisfy the organized freak in you? Don't worry, we got you covered.\nYou can create a group inside a group, which is inside a group, which is again inside a group and so on...\nCreate as many nested groups that you want.\nCaution note: Since you can delete groups, if the groups do contain tasks, you will delete the task as well!",
},
{
id: 6,
image: tomgif,
title: "Tommorow",
content: "We also know about the planning freaks out there, so we covered them as well. W developers, right?\nYou can set tasks for tomorrow.\nYou can create groups and then tasks inside of them. Why? Well, because the other collaborator is a planning and organizing freak.\nThe tasks you set in Tomorrow will be added to task list along with your existing tasks and groups. This will happen at midnight. We hope that there is an empty task list before midnight! (PS: You can always delete them)",
},
{
id: 7,
image: workgif,
title: "Habits",
content: "Habits is yet our most unique feature. We call this a productivity tracker tool and we mean it. \nThere are some tasks that needs to be done daily. Now, why add them daily in tasks?? We got habits for them.\nHabits aren't really only tasks than can be done daily, they are tasks which you can track with utmost precision.\nLet's take an example: Going to the gym.\nPeople go to the gym daily. You can track that you have been going to the gym daily. Now in gym, people tend to have different exercise days, like: back-day, legs-day, arms-day, etc. With habits you can track even these days. ",
},

{
id: 8,
image: workgif,
title: "Habits Cont'd",
content: "\nSo going to the gym is a habit and back-day, legs-day are a part of it, so we enable you to track on what date and time, which day you had! Essentially tracking your habits for eternity.\nWe can also help you learn a habit. We will help you maintain the 21 days streak :). "
},
{
id: 9,
image: workgif,
title: "Streaks Watch",
content: " We plan to convert you into a productivity freak, just like us.\nStreaks are year round tracking of tasks and habits which you have done and not done. \nDark blue squares indicates lesser tasks done and the brighter the blue, the more tasks have been done. White indicates 0 tasks done. \nYou can literally see the days which you have been slacking off and also how often you have been slacking off.\nThis will consist of two charts, one task master streak and the other habits streak.",
},

{
id:10,
image: workgif,
title: "Streaks Watch Cont'd",
content: "\nTask master streak will be tracking your productivity based on, if you are completing your TO-DOs. \nFor habits streak, each habit will get a different chart. Different colours will indicate different days in habits. \nYou would also see and ongoing streak(basically a number) and the highest streak(another number)."
},
{
id: 11,
image: feedgif,
title: "Feedback and Contribute",
content: "Feel like you are more of a productivity freak and do a better job?:\nhttps://github.com/Piyuuussshhh/HabTrack.git\nFill this feedback form:https://forms.gle/vJoGNz8T8vxtZp4b8 \nGive us feedback, ideas, special requests. We are happy to oblige :) \n\tUpdate our Readme: https://github.com/Piyuuussshhh/HabTrack/tree/main",
},
]);

useEffect(() => {
setCurrentIndex(0);
}, [slides]);

const handlePrev = () => {
setCurrentIndex((currentIndex - 1 + slides.length) % slides.length);
};

const handleNext = () => {
setCurrentIndex((currentIndex + 1 + slides.length) % slides.length);
};

const handleDotClick = (index) => {
setCurrentIndex(index);
};

if (ref) {
ref.current = {
handlePrev,
handleNext,
slides,
currentIndex,
handleDotClick,
};
}

return (
<div className="carousel">
{slides.map((slide, index) => (
<div
key={index}
className={`carousel-slide ${index === 0 ? "welcome-slide" : ""} ${
index === currentIndex ? "active" : ""
}`}
>
{slide.title && <h2>{slide.title}</h2>}
{slide.image && <img src={slide.image} alt={slide.title} />}
{slide.content && (
<div className="help-screen-content">
{slide.content.split("\n").map((paragraph, index) => (
<p key={index}>{paragraph}</p>
))}
</div>
)}
</div>
))}
</div>
);
});

export default Carousel;
Loading

0 comments on commit da0580e

Please sign in to comment.