...
 
Commits (2)
......@@ -33,6 +33,8 @@ import {
ExitToApp
} from "@material-ui/icons";
import Help from "../../containers/Help";
import { BASENAME } from "../../config";
import About from "../../containers/About";
const styles = theme => ({
menu: {
......@@ -225,6 +227,17 @@ class Routes extends Component {
/>
)}
/>
<Route
exact
path="/about"
render={() => (
<About
handleGlobalMessage={this.handleGlobalMessage}
language={this.props.language}
handleLanguageChange={this.props.handleLanguageChange}
/>
)}
/>
</Switch>
<ClickAwayListener onClickAway={this.handleClickAway}>
<Button
......@@ -236,10 +249,18 @@ class Routes extends Component {
</Button>
</ClickAwayListener>
<div className={!this.state.hide ? classes.menuBar : classes.hideBar}>
<Button variant="fab" className={classes.help} href="/help">
<Button
variant="fab"
className={classes.help}
href={BASENAME === "/" ? "/help" : BASENAME + "/help"}
>
<HelpOutline className={classes.iconMenu} />
</Button>
<Button variant="fab" className={classes.about}>
<Button
variant="fab"
className={classes.about}
href={BASENAME === "/" ? "/about" : BASENAME + "/about"}
>
<InfoOutlined className={classes.iconMenu} />
</Button>
<Button
......
......@@ -16,6 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
export const BASENAME = "/";
export const API_ROOT = "http://localhost:8080/expliclas-api/api";
export const API_DOC = "http://localhost:8080/";
export const HOME = "http://localhost:3000/";
/*
* Copyright (C) 2018 Bruno López Trigo
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React, { Component, Fragment } from "react";
import PropTypes from "prop-types";
import { withStyles } from "@material-ui/core/styles";
import Grid from "@material-ui/core/Grid";
import NavBar from "../components/global/NavBar";
import { ExpandMore as ExpandMoreIcon } from "@material-ui/icons";
import {
Typography,
ExpansionPanel,
ExpansionPanelSummary,
ExpansionPanelDetails,
AppBar,
Toolbar
} from "@material-ui/core";
import galicia from "../components/images/galicia.png";
import citius from "../components/images/citius.png";
import usc from "../components/images/usc.png";
import campusVida from "../components/images/campusvida.png";
import ue from "../components/images/ue.png";
import xunta from "../components/images/xunta.png";
const styles = theme => ({
padding: {
paddingTop: 64
},
expansionPanelDetails: {
display: "block"
},
appBar: {
top: "auto",
bottom: 0,
zIndex: -1,
backgroundColor: "white"
},
leftLogos: {
height: 36,
marginTop: 20,
marginBottom: 20
},
rightLogos: {
height: 60,
marginTop: 20,
marginBottom: 20
},
toolbar: {
alignItems: "center",
justifyContent: "space-around"
}
});
class About extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
const { classes } = this.props;
return (
<Fragment>
<NavBar
language={this.props.language}
handleLanguageChange={this.props.handleLanguageChange}
/>
<Grid container justify="center" className={classes.padding}>
<Grid item xs={12}>
<ExpansionPanel defaultExpanded>
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
<Typography variant="h4">License</Typography>
</ExpansionPanelSummary>
<ExpansionPanelDetails className={classes.expansionPanelDetails}>
<Typography variant="body1">
Copyright (C) 2018 Bruno López Trigo
</Typography>
<Typography variant="body1">
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version. This
program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. You should have
received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA
</Typography>
<Typography variant="body1">
Check full license here:{" "}
<a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt">
https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
</a>
</Typography>
</ExpansionPanelDetails>
</ExpansionPanel>
<ExpansionPanel>
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
<Typography variant="h4">Icons</Typography>
</ExpansionPanelSummary>
<ExpansionPanelDetails className={classes.expansionPanelDetails}>
<Typography variant="body1">
This service uses open source{" "}
<a href="https://material.io/tools/icons/?style=baseline">
Material Design Icons
</a>
. Icons use the Apache License version 2.0 which is available
here:{" "}
<a href="https://www.apache.org/licenses/LICENSE-2.0.html">
https://www.apache.org/licenses/LICENSE-2.0.html
</a>
</Typography>
</ExpansionPanelDetails>
</ExpansionPanel>
<ExpansionPanel>
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
<Typography variant="h4">Images</Typography>
</ExpansionPanelSummary>
<ExpansionPanelDetails className={classes.expansionPanelDetails}>
<Typography variant="body1">
All images are free to use and have been obtained from{" "}
<a href="https://pixabay.com/">Pixabay</a>
</Typography>
</ExpansionPanelDetails>
</ExpansionPanel>
<ExpansionPanel>
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
<Typography variant="h4">Credits</Typography>
</ExpansionPanelSummary>
<ExpansionPanelDetails className={classes.expansionPanelDetails}>
<Typography variant="body1">
This service was developed at{" "}
<a href="https://citius.usc.es/">CiTIUS</a> by{" "}
<a href="https://citius.usc.es/equipo/investigadores-en-formacion/bruno-lopez-trigo">
Bruno López Trigo
</a>{" "}
under the direction of{" "}
<a href="https://citius.usc.es/equipo/investigadores-postdoutorais/jose-maria-alonso-moral">
Jose María Alonso Moral
</a>{" "}
and{" "}
<a href="https://citius.usc.es/equipo/persoal-adscrito/alberto-bugarin-diz">
Alberto Bugarín Diz
</a>
. ExpliClas is part of the research project{" "}
<b>
<a href="https://citius.usc.es/investigacion/proxectos/listado/disenando-sistemas-inteligentes-explicables-interaccionan-personas-generan-expli">
eXplica-IA: Diseñando Sistemas Inteligentes Explicables
que Interaccionan con Personas y Generan Explicaciones en
Lenguaje Natural
</a>
</b>
.
</Typography>
</ExpansionPanelDetails>
</ExpansionPanel>
<AppBar className={classes.appBar}>
<Toolbar className={classes.toolbar}>
<img
src={galicia}
alt="logo turístico galicia"
className={classes.leftLogos}
/>
<img
src={citius}
alt="logo citius"
className={classes.leftLogos}
/>
<img src={usc} alt="logo usc" className={classes.leftLogos} />
<img
src={campusVida}
alt="logo campus vida"
className={classes.leftLogos}
/>
<img
src={ue}
alt="logo unión europea"
className={classes.rightLogos}
/>
<img
src={xunta}
alt="logo xunta de galicia"
className={classes.rightLogos}
/>
</Toolbar>
</AppBar>
</Grid>
</Grid>
</Fragment>
);
}
}
About.propTypes = {
classes: PropTypes.object.isRequired
};
export default withStyles(styles)(About);
......@@ -69,7 +69,11 @@ class Help extends Component {
constructor(props) {
super(props);
this.state = {
tutorial1: false
tutorial1: false,
tutorial2A: false,
tutorial2B: false,
tutorial3: false,
tutorial4: false
};
}
......
......@@ -19,11 +19,17 @@
import React, { Component, Fragment } from "react";
import NavBar from "../components/global/NavBar";
import HomeCard from "../components/home/HomeCard";
import { Grid } from "@material-ui/core";
import { Grid, AppBar, Toolbar } from "@material-ui/core";
import PropTypes from "prop-types";
import { withStyles } from "@material-ui/core/styles";
import { Redirect } from "react-router-dom";
import CustomizedSnackbars from "../components/global/CustomizedSnackbars";
import galicia from "../components/images/galicia.png";
import citius from "../components/images/citius.png";
import usc from "../components/images/usc.png";
import campusVida from "../components/images/campusvida.png";
import ue from "../components/images/ue.png";
import xunta from "../components/images/xunta.png";
const styles = theme => ({
root: {
......@@ -33,6 +39,26 @@ const styles = theme => ({
padding: theme.spacing.unit * 2,
textAlign: "center",
color: theme.palette.text.secondary
},
appBar: {
top: "auto",
bottom: 0,
zIndex: -1,
backgroundColor: "white"
},
leftLogos: {
height: 36,
marginTop: 20,
marginBottom: 20
},
rightLogos: {
height: 60,
marginTop: 20,
marginBottom: 20
},
toolbar: {
alignItems: "center",
justifyContent: "space-around"
}
});
......@@ -56,6 +82,8 @@ class Home extends Component {
};
render() {
const { classes } = this.props;
return (
<Fragment>
<NavBar
......@@ -70,6 +98,32 @@ class Home extends Component {
/>
</Grid>
</Grid>
<AppBar className={classes.appBar}>
<Toolbar className={classes.toolbar}>
<img
src={galicia}
alt="logo turístico galicia"
className={classes.leftLogos}
/>
<img src={citius} alt="logo citius" className={classes.leftLogos} />
<img src={usc} alt="logo usc" className={classes.leftLogos} />
<img
src={campusVida}
alt="logo campus vida"
className={classes.leftLogos}
/>
<img
src={ue}
alt="logo unión europea"
className={classes.rightLogos}
/>
<img
src={xunta}
alt="logo xunta de galicia"
className={classes.rightLogos}
/>
</Toolbar>
</AppBar>
<CustomizedSnackbars
openFail={this.state.error}
handleClose={this.handleClose}
......
......@@ -22,10 +22,11 @@ import "./index.css";
import App from "./App";
import Analytics from "react-router-ga";
import { BrowserRouter as Router } from "react-router-dom";
import { BASENAME } from "./config";
ReactDOM.render(
<Router>
<Analytics id="UA-126813440-2">
<Router basename={BASENAME}>
<Analytics id="UA-131125449-1">
<App />
</Analytics>
</Router>,
......