Skip to content
Snippets Groups Projects
Commit a42dfdfd authored by Marcel Žec's avatar Marcel Žec
Browse files

tripmedium better design, highligher class

parent aa5f9cae
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
import React from "react"; import React from "react";
import { Container, Card, Form, Row } from "react-bootstrap"; import { Container, Card, Form, Row, Col } from "react-bootstrap";
import TripSmall from "./TripSmall"; import TripSmall from "./TripSmall";
import CardColumns from "react-bootstrap/CardColumns"; import CardColumns from "react-bootstrap/CardColumns";
import Spinner from "react-bootstrap/Spinner"; import Spinner from "react-bootstrap/Spinner";
...@@ -96,8 +96,8 @@ class IndexFilter extends React.Component { ...@@ -96,8 +96,8 @@ class IndexFilter extends React.Component {
); );
} else { } else {
return ( return (
<Container className="d-flex justify-content-center"> <Container className="d-flex mt-3">
<Row> <Col>
<Card> <Card>
<Form> <Form>
<Form.Group> <Form.Group>
...@@ -150,21 +150,23 @@ class IndexFilter extends React.Component { ...@@ -150,21 +150,23 @@ class IndexFilter extends React.Component {
</Form.Group> </Form.Group>
</Form> </Form>
</Card> </Card>
</Row> </Col>
<Row className="ml-3"> <Col className="ml-3">
<CardColumns className="d-flex flex-column"> {/*<CardColumns className="d-flex flex-column">*/}
{this.state.trips.map((trip) => { {this.state.trips.map((trip) => {
return ( return (
<Row>
<TripMedium <TripMedium
key={trip.short_name} key={trip.short_name}
highlightWords={this.state.filter.words} highlightWords={this.state.filter.words}
trip={trip} trip={trip}
/> />
); </Row>
})} );
</CardColumns> })}
</Row> {/*</CardColumns>*/}
</Col>
{/*<CardColumns> {/*<CardColumns>
{this.state.trips.map((trip) => { {this.state.trips.map((trip) => {
......
...@@ -56,7 +56,7 @@ class TripMedium extends React.Component { ...@@ -56,7 +56,7 @@ class TripMedium extends React.Component {
return ( return (
<Link to={"/trips/" + this.props.trip.short_name}> <Link to={"/trips/" + this.props.trip.short_name}>
<Card> <Card className="mb-3">
<Card.Body className="d-flex"> <Card.Body className="d-flex">
<div> <div>
<div className="image-card"> <div className="image-card">
...@@ -71,12 +71,33 @@ class TripMedium extends React.Component { ...@@ -71,12 +71,33 @@ class TripMedium extends React.Component {
this.props.trip.possible_xp_reward this.props.trip.possible_xp_reward
} xp{" "} } xp{" "}
</span> </span>
<h4 className="ml-3" id="trip-title">
{" "}
{this.props.trip.name}
</h4>
</div> </div>
</div> </div>
</div>
<div>
<h4 className="ml-3">
<Highlighter
highlightClassName="textHighlight"
searchWords={
this.props.highlightWords
? this.props.highlightWords
: []
}
autoEscape={true}
textToHighlight={this.props.trip.name}
/>
</h4>
<Highlighter
highlightClassName="textHighlight"
searchWords={
this.props.highlightWords
? this.props.highlightWords
: []
}
autoEscape={true}
textToHighlight={this.props.trip.description}
/>
<Row className="trip_sessions"> <Row className="trip_sessions">
<Col className=""> <Col className="">
<span className="dateIcon"> <span className="dateIcon">
...@@ -94,18 +115,6 @@ class TripMedium extends React.Component { ...@@ -94,18 +115,6 @@ class TripMedium extends React.Component {
</Col> </Col>
</Row> </Row>
</div> </div>
<div>
<Highlighter
highlightClassName="YourHighlightClass"
searchWords={
this.props.highlightWords
? this.props.highlightWords
: []
}
autoEscape={true}
textToHighlight={this.props.trip.description}
/>
</div>
</Card.Body> </Card.Body>
</Card> </Card>
</Link> </Link>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment