Client - style fix

This commit is contained in:
Sam 2019-08-31 22:11:08 +02:00
parent 05a03cc349
commit 774e8682b0
3 changed files with 11 additions and 6 deletions

View File

@ -41,7 +41,9 @@ export default class ActivitiesList extends React.PureComponent {
<Link to={`/activities/${activity.id}`}>
{activity.title}
</Link>
{activity.map && <StaticMap activity={activity} />}
{activity.map && (
<StaticMap activity={activity} display="list" />
)}
</td>
<td>
{format(

View File

@ -127,7 +127,7 @@ label {
max-height: 18px;
}
.activity-title img, .activity-title .map-attribution {
.activity-title img, .activity-title .map-attribution-list {
display: none;
}
@ -141,10 +141,10 @@ label {
z-index: 1000;
}
.activity-title:hover .map-attribution {
.activity-title:hover .map-attribution-list {
display:block;
font-size: 11px;
left: -130px;
margin-left: 10px;
position:relative;
top: 0;
z-index: 1000;

View File

@ -4,7 +4,10 @@ import { apiUrl } from '../../utils'
export default class StaticMap extends React.PureComponent {
render() {
const { activity } = this.props
const { activity, display } = this.props
const attributionStyle =
display === 'list' ? 'map-attribution-list' : 'map-attribution text-right'
return (
<>
<img
@ -12,7 +15,7 @@ export default class StaticMap extends React.PureComponent {
src={`${apiUrl}activities/map/${activity.map}?${Date.now()}`}
alt="activity map"
/>
<div className="map-attribution text-right">
<div className={attributionStyle}>
<span className="map-attribution-text">©</span>
<a
className="map-attribution-text"