Add aboutpage and change some css
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
792b6279b9
commit
bda02302a7
6 changed files with 79 additions and 23 deletions
|
@ -11,16 +11,16 @@ export const MemoryUsage = () => {
|
||||||
const usedMB = (memoryInfo.usedJSHeapSize / 1024 / 1024).toFixed(2);
|
const usedMB = (memoryInfo.usedJSHeapSize / 1024 / 1024).toFixed(2);
|
||||||
setMemoryUsage(`Used: ${usedMB} MB`);
|
setMemoryUsage(`Used: ${usedMB} MB`);
|
||||||
} else {
|
} else {
|
||||||
setMemoryUsage("Memory info not supported in this browser.");
|
setMemoryUsage("Memory info not supported in this browser. <br/> Please use Chrome");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const interval = setInterval(updateMemoryUsage, 500);
|
const interval = setInterval(updateMemoryUsage, 500);
|
||||||
return () => clearInterval(interval); // Cleanup on unmount
|
return () => clearInterval(interval);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: "10px" }}> {/* Added padding here */}
|
<div style={{ padding: "10px" }}>
|
||||||
<Typography color="textPrimary" component="div">
|
<Typography color="textPrimary" component="div">
|
||||||
<Typography color="textSecondary" component="div">
|
<Typography color="textSecondary" component="div">
|
||||||
Client-Side Memory Usage
|
Client-Side Memory Usage
|
||||||
|
|
|
@ -37,8 +37,8 @@ export const Menu = ({
|
||||||
return (
|
return (
|
||||||
<Paper classes={{ root: classes.wrapper }} style={{
|
<Paper classes={{ root: classes.wrapper }} style={{
|
||||||
position: "fixed",
|
position: "fixed",
|
||||||
width: "550px",
|
width: "370px",
|
||||||
height: "500px",
|
height: "495px",
|
||||||
top: "80px",
|
top: "80px",
|
||||||
left: "20px",
|
left: "20px",
|
||||||
color: "black",
|
color: "black",
|
||||||
|
|
|
@ -84,7 +84,7 @@ export const MenuSolverControls = ({
|
||||||
<MenuSection highlight>
|
<MenuSection highlight>
|
||||||
<MenuItem title="Algorithm">
|
<MenuItem title="Algorithm">
|
||||||
<Grid container alignItems="center">
|
<Grid container alignItems="center">
|
||||||
<Grid item xs={11}>
|
<Grid item xs={12}>
|
||||||
<Select
|
<Select
|
||||||
value={selectedAlgorithm}
|
value={selectedAlgorithm}
|
||||||
onChange={onAlgorithmChange}
|
onChange={onAlgorithmChange}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from "gatsby";
|
import { Link } from "gatsby";
|
||||||
|
import logo from "../images/favicon.png";
|
||||||
|
|
||||||
export const Navbar = () => {
|
export const Navbar = () => {
|
||||||
const navbarStyle = {
|
const navbarStyle = {
|
||||||
|
@ -9,14 +10,17 @@ export const Navbar = () => {
|
||||||
padding: '10px 20px',
|
padding: '10px 20px',
|
||||||
backgroundColor: '#333',
|
backgroundColor: '#333',
|
||||||
color: 'white',
|
color: 'white',
|
||||||
position: 'fixed', // Ensures the navbar stays at the top
|
position: 'fixed',
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
zIndex: 1000, // Makes sure the navbar stays on top
|
zIndex: 1000,
|
||||||
};
|
};
|
||||||
|
|
||||||
const leftStyle = {
|
const leftStyle = {
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '15px', // Increased spacing between the logo and text
|
||||||
fontSize: '20px',
|
fontSize: '20px',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
};
|
};
|
||||||
|
@ -27,35 +31,35 @@ export const Navbar = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const linkStyle = {
|
const linkStyle = {
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '10px',
|
||||||
color: 'white',
|
color: 'white',
|
||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
};
|
};
|
||||||
|
|
||||||
const linkHoverStyle = {
|
|
||||||
textDecoration: 'underline',
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav style={navbarStyle}>
|
<nav style={navbarStyle}>
|
||||||
<div style={leftStyle}>
|
<div style={leftStyle}>
|
||||||
{/* Make the "TSP Visualization" clickable */}
|
{/* Wrap both the logo and text inside the same Link */}
|
||||||
<Link to="/" style={linkStyle}>
|
<Link to="/" style={linkStyle}>
|
||||||
|
<img src={logo} alt="Logo" style={{ height: '30px' }} />
|
||||||
TSP Visualization
|
TSP Visualization
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div style={rightStyle}>
|
<div style={rightStyle}>
|
||||||
<Link
|
<Link
|
||||||
to="/about"
|
to="/about"
|
||||||
style={linkStyle}
|
style={linkStyle}
|
||||||
onMouseOver={(e) => e.target.style.textDecoration = 'underline'}
|
onMouseOver={(e) => e.target.style.textDecoration = 'underline'}
|
||||||
onMouseOut={(e) => e.target.style.textDecoration = 'none'}>
|
onMouseOut={(e) => e.target.style.textDecoration = 'none'}>
|
||||||
About
|
About
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/source-code"
|
to="/source-code"
|
||||||
style={linkStyle}
|
style={linkStyle}
|
||||||
onMouseOver={(e) => e.target.style.textDecoration = 'underline'}
|
onMouseOver={(e) => e.target.style.textDecoration = 'underline'}
|
||||||
onMouseOut={(e) => e.target.style.textDecoration = 'none'}>
|
onMouseOut={(e) => e.target.style.textDecoration = 'none'}>
|
||||||
Source Code
|
Source Code
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -18,9 +18,8 @@ export const SEO = ({ subtitle }) => {
|
||||||
property="og:title"
|
property="og:title"
|
||||||
content={`Traveling Salesman Problem Visualizer`}
|
content={`Traveling Salesman Problem Visualizer`}
|
||||||
/>
|
/>
|
||||||
<meta property="og:url" content="https://tspvis.com" />
|
<meta property="og:url" content="https://tsib.techtransthai.org/" />
|
||||||
<meta property="og:description" content={description} />
|
<meta property="og:description" content={description} />
|
||||||
<meta property="og:image" content="https://i.imgur.com/u4ibcsC.jpg" />
|
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
);
|
);
|
||||||
|
|
53
src/pages/about.js
Normal file
53
src/pages/about.js
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
Navbar
|
||||||
|
} from "../components";
|
||||||
|
|
||||||
|
|
||||||
|
const AboutPage = () => {
|
||||||
|
const containerStyle = {
|
||||||
|
maxWidth: '900px',
|
||||||
|
margin: '80px auto 20px',
|
||||||
|
padding: '0 20px',
|
||||||
|
fontFamily: 'Arial, sans-serif',
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Navbar />
|
||||||
|
<div style={containerStyle}>
|
||||||
|
<h2>About this project</h2>
|
||||||
|
<p>
|
||||||
|
Traveling Salesman Problem is blah blah blah Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||||
|
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua quaerat voluptatem. Ut enim aeque
|
||||||
|
doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et
|
||||||
|
infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut postea
|
||||||
|
variareli voluptas distinguique possit, augeri amplificarique non possit.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Ullus investigandi veri, nisi inveneris, et quaerendi defatigationo turpis est, cum esset accusata
|
||||||
|
et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse
|
||||||
|
numquam potest. Praeterea bona praeterita grata recordatione renovata delectant. Est autem situm
|
||||||
|
in nobis ut et voluptates et dolores nasci fatemur e corporis.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Ullus investigandi veri, nisi inveneris, et quaerendi defatigationo turpis est, cum esset accusata
|
||||||
|
et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse
|
||||||
|
numquam potest. Praeterea bona praeterita grata recordatione renovata delectant. Est autem situm
|
||||||
|
in nobis ut et voluptates et dolores nasci fatemur e corporis voluptatibus et doloribus --
|
||||||
|
itaque concedo, quod modo dicebas, cadere causa, si qui.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4>Created by</h4>
|
||||||
|
<ul>
|
||||||
|
<li>64010823 วีรภัทร อินอุดม</li>
|
||||||
|
<li>64010543 พงศ์ภีระ วงศประสิทธิพร</li>
|
||||||
|
<li>64011106 ณรงค์พล กิจรังสรรค์</li>
|
||||||
|
<li>64011160 นนทัช มุกลีมาศ</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AboutPage;
|
Loading…
Add table
Add a link
Reference in a new issue