Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved #5Code cleaning and #1 Improved the UI #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 30 additions & 7 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import useDarkMode from 'use-dark-mode';
import Phoneview from './components/PhoneView';
import WatchView from './components/WatchView';
import cr7 from './assets/cr7.png'
import { BiMoon } from "react-icons/bi";
import { BsSun } from "react-icons/bs";


/* style */
Expand All @@ -23,19 +25,40 @@ import './index.scss';
const App = (type) => {
const darkMode = useDarkMode(false);
return (
<>
<img alt="CR7" style={{
width: '60px',
height: '60px',
marginLeft: '300px',
<div id='mainpage'>
<div id="heading"style={{
display:'flex',
flexDirection: 'row',
backgroundColor:'#1e2633'
}}>
<img alt="CR7" style={{
width: '8vw',
height: '8vw',
marginLeft: '1vw',
marginTop: '1vh',
}} src={cr7} />
<h1 style={{ marginTop: '-50px' }}>CR7 Fitness App</h1>

<h1 style={{
color:'#4ceddd',
fontSize:'3vw',
}}>
CR7 Fitness App</h1>
<div className="navbar-right" onClick={darkMode.toggle}
style={{
marginTop:'5vh',
marginRight:'5vw',

}}>
{darkMode.value ? <BiMoon color="white" size='3vw' /> : <BsSun size='3vw' color="yellow"/>}
</div>

</div>
<div className='container'>
<LightMainCard {...darkMode} />
<Phoneview {...darkMode}/>
<WatchView {...darkMode}/>
</div>
</>
</div>
);
};

Expand Down
6 changes: 3 additions & 3 deletions src/components/CalendarCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ const CalendarCard = () => {
<div className="calendar-sub-cards">
<div className="calendar-card-card1">
<h6 style={{ fontWeight: "bolder", fontSize: "initial" }}>2</h6>
<hr class="solid"></hr>
<hr className="solid"></hr>
<h6 style={{ fontWeight: "100", fontSize: "xx-small" }}>work</h6>
</div>
<div className="calendar-card-card2">
<h6 style={{ fontWeight: "bolder", fontSize: "initial" }}>3</h6>
<hr class="solid"></hr>
<hr className="solid"></hr>
<h6 style={{ fontWeight: "100", fontSize: "xx-small" }}>
Personal
</h6>
</div>
</div>
<h6>-> Meeting 08:15</h6>
<h6>-&gt; Meeting 08:15</h6>
<div className="calendar-dots">
<HiDotsHorizontal />
</div>
Expand Down
7 changes: 2 additions & 5 deletions src/components/LightMainCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import React from "react";
import GoalCard from "./GoalCard";
import CalendarCard from "./CalendarCard";
import ClockCard from "./Clockcard";
import { BiMoon } from "react-icons/bi";
import { BsMoon } from "react-icons/bs";

import { FiActivity } from "react-icons/fi";

/* style */
Expand All @@ -16,9 +15,7 @@ const LightMainCard = (darkMode) => {
<>
<div className="Navbar">
<div className="navbar-middle">
<div className="navbar-right" onClick={darkMode.toggle}>
{darkMode.value ? <BiMoon color="white" /> : <BsMoon />}
</div>

<div
style={{
margin: "auto",
Expand Down
21 changes: 16 additions & 5 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ body {
-moz-osx-font-smoothing: grayscale;
}

#mianpage{
display: flex;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
Expand Down Expand Up @@ -39,9 +43,9 @@ h6 {

.container {
display: flex;
align-items: center;
flex-direction: column;
margin: 50px;
margin-left: 100px;
margin: 2vh;
.light-main-card {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -163,7 +167,10 @@ h6 {
}
}
}

#root{
width: 100%;
background-color: lightgrey;
}
.Navbar {
display: flex;
flex-direction: row;
Expand All @@ -178,16 +185,20 @@ h6 {
}
.navbar-right {
cursor: pointer;
height: min-content;
display: flex;
justify-content: center;
// margin: auto;
margin: 5px;
margin-top: 10vh;
margin-right: 10vw;;
}
}
.dark-mode {
.Navbar {
background-color: #1e1e30;
}
#root{
background-color:#1e1e30 ;
}
}

.dark-mode {
Expand Down