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

create components for displaying usage in numbers #5

Open
wants to merge 7 commits into
base: main
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
57 changes: 36 additions & 21 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--

<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />


<!-- google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Varela+Round&display=swap" rel="stylesheet">
<!-- google fonts -->

<!-- iconify -->
<script src="https://code.iconify.design/2/2.1.0/iconify.min.js"></script>
<script src="https://code.iconify.design/2/2.1.1/iconify.min.js"></script>
<!-- iconify -->



<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -24,12 +37,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
<title>React App</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

Expand All @@ -39,5 +53,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</body>

</html>
13 changes: 11 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import React from "react";
// import React from "react";
import "./App.css";
// import Uses_numbers from "./components/tsxHTML_JS/Uses_number";
import ItemComponents from "./components/tsxHTML_JS/ItemComponents";
// import Uses_numbers from "./components/Uses_number";

function App() {
return <div>Hello World</div>;
return (
<>
{/* <Uses_numbers queryProcess='145'/> */}
<ItemComponents dataIcon="fluent:home-28-filled" mode='Home'/>
</>

);
}

export default App;
54 changes: 54 additions & 0 deletions src/components/tsxCSS/StyleItemComponents.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from "react";
import styled from "styled-components";


export const StyleItemComponents = styled.div`
font-family: 'Varela Round', sans-serif;
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
/* background-color: #1f1f68; */


/* .modecontainer{
background-color: transparent;
padding: 7px;

} */
.home{
color: #d8d1d1;
font-size: 25px;
width: 230px;
background: transparent;
border-radius: 10px;
border: none;
/* padding: 10%; */
}

.home:hover{
background-color: white;
color: black;
transition:1s;
}

.hicon{
position: absolute;
top: 9px;
left:40px;
padding:0px 0px 0px 0px;
padding-right: 10px;

}

.pad{
/* position: absolute;
top: 22px;
left:88px; */
padding-bottom: 3px;
padding: 0px 35px 0px 0px;
/* text-align: center; */
}


`
77 changes: 77 additions & 0 deletions src/components/tsxCSS/StyleUseNumber.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// 1
// css
// css for '145' number on dashboard

import styled from "styled-components";

export const StyleUserNumber = styled.div`
font-family: 'Varela Round', sans-serif;
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;



.content{
font-size: 30px;
margin-left: 20px;
}

.ctitle{
/* padding-top: 13%; */
padding-left: 1%;
margin-bottom: 2%;
}

.no{
font-size:55px ;
/* padding: 4% 6% 0% 6%; */

margin-top: 0%;
margin-bottom: 0%;
}
.nobox{
padding: 4% 6% 0% 6%;
margin-top: 0%;
margin-bottom: 0%;
}
.mostv{
font-size:17px;
padding-left:6%;
color: gray;
margin-bottom: 2%;
}

.viewa{
font-size: 25px;
color: rgb(14, 14, 190);
margin-top:0%;
padding-left: 8%;
padding-bottom: 3%;
}

.box{
/* border: solid black; */
box-shadow: 3px 4px 10px gray;
margin-left: 1.5%;
border-radius: 15px;

}

.pad{
width: 440px;
}

.pos{
align-items: center;
padding: 10px 5px 10px 240px;
}

.next{
color:#0e0ebe;
padding:0px 0px 0px 0px;
margin: 0px 0px -4px 2px;
}

`
22 changes: 22 additions & 0 deletions src/components/tsxHTML_JS/ItemComponents.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 2
// home and filter item component on dashboard

import React from "react";
import { StyleItemComponents } from "../tsxCSS/StyleItemComponents";
export default function homeIcon(props: { mode: string , dataIcon:string }) {
return (
<StyleItemComponents>

<button className="home">
<div>
<span className="iconify hicon" data-icon={props.dataIcon}></span>
<span className="pad">
{props.mode}
</span>
</div>
</button>

</StyleItemComponents>
)

}
33 changes: 33 additions & 0 deletions src/components/tsxHTML_JS/Uses_number.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// 1
// 145 number on dashboard

import React from "react";
import { StyleUserNumber } from "../tsxCSS/StyleUseNumber";


export default function Uses_number(props: { queryProcess: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined; }) {

return (
<StyleUserNumber>

<div className="content">
<div className="pad">
<p className="ctitle">Queries processed</p>
<div className="box">
<p className="nobox">
<span className="no">{props.queryProcess}</span>
<span className="iconify pos" data-icon="akar-icons:download"></span>
</p>
<p className="mostv">Most visited - google.com, discord.com</p>
<p className="viewa">View all
<span className="iconify next" data-icon="ic:round-navigate-next"></span>
</p>
</div>
</div>
</div>
</StyleUserNumber>

)
}