Skip to content

Commit

Permalink
Merge pull request #1 from WorkoutLogs/update
Browse files Browse the repository at this point in the history
Starting the website
  • Loading branch information
ReddyyZ authored Dec 24, 2023
2 parents 5dead4b + 747d54e commit 2f768c4
Show file tree
Hide file tree
Showing 10 changed files with 1,774 additions and 329 deletions.
1,797 changes: 1,634 additions & 163 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"postcss": "^8.4.31",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-mobile-app-button": "^1.2.17",
"tailwindcss": "^3.3.5"
}
}
Binary file added src/assets/app-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/components/content.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

// import { Container } from './styles';

function Content({ children }) {
return <div className='mb-auto'>
{children}
</div>;
}

export default Content;
11 changes: 11 additions & 0 deletions src/components/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

// import { Container } from './styles';

function Footer({backgroundColor}) {
return <footer className='h-16 px-4 flex items-center text-white' style={{backgroundColor}}>
<a href='https://workoutlogs.github.io/privacy-policy'>Privacy Policy</a>
</footer>;
}

export default Footer;
11 changes: 11 additions & 0 deletions src/components/header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

// import { Container } from './styles';

function Header({ backgroundColor }) {
return <header style={{backgroundColor}} className='text-white h-16 p-2 flex items-center md:px-12 md:block justify-center'>
<a href='#' className='text-2xl border-b-2 border-b-transparent hover:border-b-white'>WorkoutLogs</a>
</header>;
}

export default Header;
11 changes: 11 additions & 0 deletions src/components/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

// import { Container } from './styles';

function Layout({ children }) {
return <div className='h-screen' style={{backgroundColor: "#df2a27"}}>
{children}
</div>;
}

export default Layout;
36 changes: 36 additions & 0 deletions src/html.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react"
import PropTypes from "prop-types"

export default function HTML(props) {
return (
<html {...props.htmlAttributes}>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
{props.headComponents}
</head>
<body {...props.bodyAttributes}>
{props.preBodyComponents}
<div
key={`body`}
id="___gatsby"
dangerouslySetInnerHTML={{ __html: props.body }}
/>
{props.postBodyComponents}
</body>
</html>
)
}

HTML.propTypes = {
htmlAttributes: PropTypes.object,
headComponents: PropTypes.array,
bodyAttributes: PropTypes.object,
preBodyComponents: PropTypes.array,
body: PropTypes.string,
postBodyComponents: PropTypes.array,
}
221 changes: 55 additions & 166 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,176 +1,65 @@
import * as React from "react"

const pageStyles = {
color: "#232129",
padding: 96,
fontFamily: "-apple-system, Roboto, sans-serif, serif",
}
const headingStyles = {
marginTop: 0,
marginBottom: 64,
maxWidth: 320,
}
const headingAccentStyles = {
color: "#663399",
}
const paragraphStyles = {
marginBottom: 48,
}
const codeStyles = {
color: "#8A6534",
padding: 4,
backgroundColor: "#FFF4DB",
fontSize: "1.25rem",
borderRadius: 4,
}
const listStyles = {
marginBottom: 96,
paddingLeft: 0,
}
const listItemStyles = {
fontWeight: 300,
fontSize: 24,
maxWidth: 560,
marginBottom: 30,
}

const linkStyle = {
color: "#8954A8",
fontWeight: "bold",
fontSize: 16,
verticalAlign: "5%",
}

const docLinkStyle = {
...linkStyle,
listStyleType: "none",
marginBottom: 24,
}

const descriptionStyle = {
color: "#232129",
fontSize: 14,
marginTop: 10,
marginBottom: 0,
lineHeight: 1.25,
}

const docLink = {
text: "Documentation",
url: "https://www.gatsbyjs.com/docs/",
color: "#8954A8",
}

const badgeStyle = {
color: "#fff",
backgroundColor: "#088413",
border: "1px solid #088413",
fontSize: 11,
fontWeight: "bold",
letterSpacing: 1,
borderRadius: 4,
padding: "4px 6px",
display: "inline-block",
position: "relative",
top: -2,
marginLeft: 10,
lineHeight: 1,
}

const links = [
{
text: "Tutorial",
url: "https://www.gatsbyjs.com/docs/tutorial/getting-started/",
description:
"A great place to get started if you're new to web development. Designed to guide you through setting up your first Gatsby site.",
color: "#E95800",
},
{
text: "How to Guides",
url: "https://www.gatsbyjs.com/docs/how-to/",
description:
"Practical step-by-step guides to help you achieve a specific goal. Most useful when you're trying to get something done.",
color: "#1099A8",
},
{
text: "Reference Guides",
url: "https://www.gatsbyjs.com/docs/reference/",
description:
"Nitty-gritty technical descriptions of how Gatsby works. Most useful when you need detailed information about Gatsby's APIs.",
color: "#BC027F",
},
{
text: "Conceptual Guides",
url: "https://www.gatsbyjs.com/docs/conceptual/",
description:
"Big-picture explanations of higher-level Gatsby concepts. Most useful for building understanding of a particular topic.",
color: "#0D96F2",
},
{
text: "Plugin Library",
url: "https://www.gatsbyjs.com/plugins",
description:
"Add functionality and customize your Gatsby site or app with thousands of plugins built by our amazing developer community.",
color: "#8EB814",
},
{
text: "Build and Host",
url: "https://www.gatsbyjs.com/cloud",
badge: true,
description:
"Now you’re ready to show the world! Give your Gatsby site superpowers: Build and host on Gatsby Cloud. Get started for free!",
color: "#663399",
},
]
import Layout from "../components/layout"
import Header from "../components/header"
import { GooglePlayButton } from 'react-mobile-app-button';
import AppScreenshot from '../assets/app-screenshot.png';
import Footer from "../components/footer";
import Content from "../components/content";

const IndexPage = () => {
const GooglePlayUrl = "https://play.google.com/store/apps/details?id=com.reddyyz.WorkoutLogs";
const description = 'Download WorkoutLogs app and start tracking your workouts today!'

return (
<main style={pageStyles}>
<h1 style={headingStyles}>
Congratulations
<br />
<span style={headingAccentStyles}>— you just made a Gatsby site! 🎉🎉🎉</span>
</h1>
<p style={paragraphStyles}>
Edit <code style={codeStyles}>src/pages/index.js</code> to see this page
update in real-time. 😎
</p>
<ul style={listStyles}>
<li style={docLinkStyle}>
<a
style={linkStyle}
href={`${docLink.url}?utm_source=starter&utm_medium=start-page&utm_campaign=minimal-starter`}
>
{docLink.text}
</a>
</li>
{links.map(link => (
<li key={link.url} style={{ ...listItemStyles, color: link.color }}>
<span>
<a
style={linkStyle}
href={`${link.url}?utm_source=starter&utm_medium=start-page&utm_campaign=minimal-starter`}
>
{link.text}
</a>
{link.badge && (
<span style={badgeStyle} aria-label="New Badge">
NEW!
</span>
)}
<p style={descriptionStyle}>{link.description}</p>
</span>
</li>
))}
</ul>
<img
alt="Gatsby G Logo"
src="data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 110 20 10 10 0 010-20zm0 2c-3.73 0-6.86 2.55-7.75 6L14 19.75c3.45-.89 6-4.02 6-7.75h-5.25v1.5h3.45a6.37 6.37 0 01-3.89 4.44L6.06 9.69C7 7.31 9.3 5.63 12 5.63c2.13 0 4 1.04 5.18 2.65l1.23-1.06A7.959 7.959 0 0012 4zm-8 8a8 8 0 008 8c.04 0 .09 0-8-8z' fill='%23639'/%3E%3C/svg%3E"
<Layout>
<Header
backgroundColor='#df2a27'
/>
<Content>
<div className="flex text-white p-4 flex-col md:flex-row" style={{backgroundColor: "#df2a27"}}>
<div className="flex-1 flex justify-center md:justify-end">
<div className="md:mr-8 flex flex-col">
<h1 className="text-6xl text-left w-64 font-bold">The<br/>Best<br/>Workout<br/>Tracker.</h1>
<p className="text-xl mt-5" style={{maxWidth: 450}}>{description}</p>
<GooglePlayButton
url={GooglePlayUrl}
theme='dark'
className='mt-5 self-center md:self-auto'
/>
</div>
</div>
<div className='flex-1 flex justify-center md:justify-start mt-8'>
<img
style={{
width: 275
}}
className="md:ml-8"
src={AppScreenshot}
/>
</div>
</div>
<div className="bg-white p-4">
<h1 className="text-2xl text-center mb-4 font-medium">App Functionalities</h1>
<p className="text-center mb-4">A simple workout tracker, developed by gym rats, for gym rats!</p>
<ul className="list-disc list-inside self-center">
<li>Track your workouts, record weight, reps, and RPE</li>
<li>Track all your body measurements (bodyweight, bicep size, etc.)</li>
<li>Plate calculator</li>
<li>Powerlifting points calculator</li>
<li>RPE/1RM calculator</li>
<li>Timers</li>
</ul>
</div>
</Content>
<Footer
backgroundColor='#df2a27'
/>
</main>
</Layout>
)
}

export default IndexPage

export const Head = () => <title>Home Page</title>
export const Head = () => (
<title>WorkoutLogs - Gym Tracker</title>
)
4 changes: 4 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

#___gatsby, #gatsby-focus-wrapper, body, html {
height: 100vh;
}

0 comments on commit 2f768c4

Please sign in to comment.