Merge branch 'master' into v0.2
This commit is contained in:
commit
68f0d47b2f
@ -8,13 +8,14 @@
|
|||||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
|
href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
|
||||||
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
|
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
|
||||||
crossorigin="anonymous">
|
crossorigin="anonymous"
|
||||||
|
>
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/fork-awesome@1.0.11/css/fork-awesome.min.css"
|
href="https://cdn.jsdelivr.net/npm/fork-awesome@1.1.5/css/fork-awesome.min.css"
|
||||||
integrity="sha256-MGU/JUq/40CFrfxjXb5pZjpoZmxiP2KuICN5ElLFNd8="
|
integrity="sha256-P64qV9gULPHiZTdrS1nM59toStkgjM0dsf5mK/UwBV4="
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
>
|
>
|
||||||
<link
|
<link
|
||||||
@ -34,5 +35,20 @@
|
|||||||
You need to enable JavaScript to run this app.
|
You need to enable JavaScript to run this app.
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
<script
|
||||||
|
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
||||||
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
|
||||||
|
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"short_name": "React App",
|
"short_name": "FitTrackee",
|
||||||
"name": "Create React App Sample",
|
"name": "Self hosted workout/activity tracker",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "favicon.ico",
|
"src": "favicon.ico",
|
||||||
@ -11,5 +11,6 @@
|
|||||||
"start_url": "./index.html",
|
"start_url": "./index.html",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#000000",
|
"theme_color": "#000000",
|
||||||
"background_color": "#ffffff"
|
"background_color": "#ffffff",
|
||||||
|
"version": "0.2.0"
|
||||||
}
|
}
|
||||||
|
@ -16,20 +16,22 @@ export default function ActivityCardHeader(props) {
|
|||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-auto">
|
<div className="col-auto">
|
||||||
{activity.next_activity ? (
|
{activity.previous_activity ? (
|
||||||
<Link
|
<Link
|
||||||
className="unlink"
|
className="unlink"
|
||||||
to={`/activities/${activity.next_activity}`}
|
to={`/activities/${activity.previous_activity}`}
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
className="fa fa-chevron-left"
|
className="fa fa-chevron-left"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
title="See previous activity"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<i
|
<i
|
||||||
className="fa fa-chevron-left inactive-link"
|
className="fa fa-chevron-left inactive-link"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
title="No previous activity"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@ -49,12 +51,14 @@ export default function ActivityCardHeader(props) {
|
|||||||
<i
|
<i
|
||||||
className="fa fa-edit custom-fa"
|
className="fa fa-edit custom-fa"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
title="Edit activity"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<i
|
<i
|
||||||
className="fa fa-trash custom-fa"
|
className="fa fa-trash custom-fa"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
onClick={() => displayModal(true)}
|
onClick={() => displayModal(true)}
|
||||||
|
title="Delete activity"
|
||||||
/><br />
|
/><br />
|
||||||
{activityDate && (
|
{activityDate && (
|
||||||
<span className="activity-date">
|
<span className="activity-date">
|
||||||
@ -63,20 +67,22 @@ export default function ActivityCardHeader(props) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-auto">
|
<div className="col-auto">
|
||||||
{activity.previous_activity ? (
|
{activity.next_activity ? (
|
||||||
<Link
|
<Link
|
||||||
className="unlink"
|
className="unlink"
|
||||||
to={`/activities/${activity.previous_activity}`}
|
to={`/activities/${activity.next_activity}`}
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
className="fa fa-chevron-right"
|
className="fa fa-chevron-right"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
title="See next activity"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<i
|
<i
|
||||||
className="fa fa-chevron-right inactive-link"
|
className="fa fa-chevron-right inactive-link"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
title="No next activity"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,7 +79,7 @@ class ActivityDisplay extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-8">
|
<div className="col-md-8">
|
||||||
{activity.with_gpx ? (
|
{activity.with_gpx ? (
|
||||||
<ActivityMap activity={activity} />
|
<ActivityMap activity={activity} />
|
||||||
) : (
|
) : (
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
.App {
|
html {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
padding-bottom: 20px;
|
margin: 0;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.App {
|
||||||
|
padding-bottom: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,6 +240,17 @@ label {
|
|||||||
color: #405976;
|
color: #405976;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
bottom: 0;
|
||||||
|
color: #8b8c8c;
|
||||||
|
font-size: 0.9em;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.huge {
|
.huge {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import './App.css'
|
|||||||
import Activity from './Activity'
|
import Activity from './Activity'
|
||||||
import Activities from './Activities'
|
import Activities from './Activities'
|
||||||
import Dashboard from './Dashboard'
|
import Dashboard from './Dashboard'
|
||||||
|
import Footer from './Footer'
|
||||||
import Logout from './User/Logout'
|
import Logout from './User/Logout'
|
||||||
import NavBar from './NavBar'
|
import NavBar from './NavBar'
|
||||||
import NotFound from './Others/NotFound'
|
import NotFound from './Others/NotFound'
|
||||||
@ -98,6 +99,7 @@ export default class App extends React.Component {
|
|||||||
{/* <Route path="/admin" component={Admin} /> */}
|
{/* <Route path="/admin" component={Admin} /> */}
|
||||||
<Route component={NotFound} />
|
<Route component={NotFound} />
|
||||||
</Switch>
|
</Switch>
|
||||||
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ export default function UserStatistics (props) {
|
|||||||
duration = `${duration.split(':')[0]}h ${duration.split(':')[1]}min`
|
duration = `${duration.split(':')[0]}h ${duration.split(':')[1]}min`
|
||||||
return (
|
return (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col">
|
<div className="col-md-3">
|
||||||
<div className="card activity-card">
|
<div className="card activity-card">
|
||||||
<div className="card-body row">
|
<div className="card-body row">
|
||||||
<div className="col-3">
|
<div className="col-3">
|
||||||
@ -25,7 +25,7 @@ export default function UserStatistics (props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col">
|
<div className="col-md-3">
|
||||||
<div className="card activity-card">
|
<div className="card activity-card">
|
||||||
<div className="card-body row">
|
<div className="card-body row">
|
||||||
<div className="col-3">
|
<div className="col-3">
|
||||||
@ -40,7 +40,7 @@ export default function UserStatistics (props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col">
|
<div className="col-md-3">
|
||||||
<div className="card activity-card">
|
<div className="card activity-card">
|
||||||
<div className="card-body row">
|
<div className="card-body row">
|
||||||
<div className="col-3">
|
<div className="col-3">
|
||||||
@ -53,7 +53,7 @@ export default function UserStatistics (props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col">
|
<div className="col-md-3">
|
||||||
<div className="card activity-card">
|
<div className="card activity-card">
|
||||||
<div className="card-body row">
|
<div className="card-body row">
|
||||||
<div className="col-3">
|
<div className="col-3">
|
||||||
|
29
fittrackee_client/src/components/Footer/index.jsx
Normal file
29
fittrackee_client/src/components/Footer/index.jsx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import { version } from './../../utils'
|
||||||
|
|
||||||
|
export default function Footer() {
|
||||||
|
return (
|
||||||
|
<footer className="footer">
|
||||||
|
<div className="container">
|
||||||
|
<strong>FitTrackee</strong> v{version} -{' '}
|
||||||
|
<a
|
||||||
|
href="https://github.com/SamR1/FitTrackee"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
source code
|
||||||
|
</a> under{' '}
|
||||||
|
<a
|
||||||
|
href="https://choosealicense.com/licenses/gpl-3.0/"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
GPLv3
|
||||||
|
</a>{' '}
|
||||||
|
license
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
import { format, parse } from 'date-fns'
|
import { format, parse } from 'date-fns'
|
||||||
import { DateTime } from 'luxon'
|
import { DateTime } from 'luxon'
|
||||||
|
|
||||||
|
export const version = '0.2.0' // version stored in 'utils' for now
|
||||||
export const apiUrl = `${process.env.REACT_APP_API_URL}/api/`
|
export const apiUrl = `${process.env.REACT_APP_API_URL}/api/`
|
||||||
export const thunderforestApiKey = `${
|
export const thunderforestApiKey = `${
|
||||||
process.env.REACT_APP_THUNDERFOREST_API_KEY
|
process.env.REACT_APP_THUNDERFOREST_API_KEY
|
||||||
|
Loading…
Reference in New Issue
Block a user