1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

logo positioning, page routing corrections

This commit is contained in:
irismarie 2021-04-22 12:07:54 +02:00
parent 052db03e03
commit 11b6d13653
5 changed files with 20 additions and 7 deletions

View file

@ -122,9 +122,9 @@ class App extends React.Component {
{ pages.scenarios ? <Route path="/scenarios/:scenario" component={Scenario} /> : '' }
{ pages.scenarios ? <Route path="/dashboards/:dashboard" component={Dashboard} /> : '' }
{ pages.infrastructure ? <Route exact path="/infrastructure" component={InfrastructureComponents} /> : '' }
{ pages.infrastructure ? <Route path="/infrastructure/:ic" component={InfrastructureComponent} /> : '' }
<Route path="/infrastructure/:ic" component={InfrastructureComponent} />
{ pages.account ? <Route path="/account" component={User} /> : '' }
{ pages.users ? <Route path="/users" component={Users} /> : '' }
<Route path="/users" component={Users} />
{ pages.api ? <Route path="/api" component={APIBrowser} /> : '' }
</div>
</div>

View file

@ -24,7 +24,6 @@ const slew_values = {
home: true,
scenarios: true,
infrastructure: false,
users: false,
account: false,
api: false
},

View file

@ -23,7 +23,6 @@ const villasweb_values = {
home: true,
scenarios: true,
infrastructure: true,
users: true,
account: true,
api: true,
},

View file

@ -70,13 +70,13 @@ class SidebarMenu extends React.Component {
links.push(<li key={key}><a href={values.links[key]} title={key}>{key}</a></li>);
})
}
var logoStyle = { height: 110, margin: 'auto' };
var logoStyle = { width: 110, margin: 'auto' };
var logo = branding.getLogo(logoStyle);
return (
<div className="menucontainer">
{ logo ?
<div className="menu">
<div className="menulogo">
{logo}
</div>
: ''
@ -88,7 +88,9 @@ class SidebarMenu extends React.Component {
<ul>
<li hidden={!values.pages.home}><NavLink to="/home" activeClassName="active" title="Home">Home</NavLink></li>
<li hidden={!values.pages.scenarios}><NavLink to="/scenarios" activeClassName="active" title="Scenarios">Scenarios</NavLink></li>
<li hidden={!values.pages.infrastructure}><NavLink to="/infrastructure" activeClassName="active" title="Infrastructure">Infrastructure</NavLink></li>
{this.props.currentRole === 'Admin' || values.pages.infrastructure ?
<li><NavLink to="/infrastructure" activeClassName="active" title="Infrastructure">Infrastructure</NavLink></li> : ''
}
{this.props.currentRole === 'Admin' ?
<li><NavLink to="/users" activeClassName="active" title="Users">Users</NavLink></li> : ''
}

View file

@ -128,6 +128,19 @@ body {
0 9px 18px 0 rgba(0, 0, 0, 0.1);
}
.menulogo {
padding-top: 20px;
padding-bottom: 20px;
text-align: center;
margin-bottom: 20px;
width: 160px;
border-radius: var(--borderradius);
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
0 9px 18px 0 rgba(0, 0, 0, 0.1);
}
.menu a {
color: var(--secondarytext);
text-decoration:none;