diff --git a/src/components/FlightCards/FlightCards.css b/src/components/FlightCards/FlightCards.css new file mode 100644 index 0000000..ad9caf5 --- /dev/null +++ b/src/components/FlightCards/FlightCards.css @@ -0,0 +1,60 @@ + .service-card { + width: 15rem; + height: 20rem; + /* padding: 2em 1.5em; */ + border-radius: 5px; + box-shadow: 0 0 35px rgba(0, 0, 0, 0.12); + cursor: pointer; + transition: 0.5s; + position: relative; + z-index: 2; + overflow: hidden; + background: #fff; + display: flex; + flex-direction: column; + padding-top: 1rem; + padding-left: 0.5rem; + } + + .service-card::after { + content: ""; + width: 100%; + height: 100%; + background: linear-gradient(#0dcaf0, rgb(255, 23, 131)); + position: absolute; + left: 0%; + top: -98%; + z-index: -2; + transition: all 0.4s cubic-bezier(0.77, -0.04, 0, 0.99); + } + + .service-card:hover:after { + top: 0%; + } + .service-card { + background-color: #ffffff; + color: black + } + + .service-card:hover { + color: #0dcaf0; + } + + .service-card:hover h3 { + color: #ffffff; + } + + .service-card:hover p { + color: #f0f0f0; + } + .trainp{ + font-size: 26px; + + } + .trainh{ + font-size: 2rem; + font-family: serif; + } + .trainp_div{ + margin-top: 3rem; + } \ No newline at end of file diff --git a/src/components/FlightCards/FlightCards.js b/src/components/FlightCards/FlightCards.js new file mode 100644 index 0000000..54b5d16 --- /dev/null +++ b/src/components/FlightCards/FlightCards.js @@ -0,0 +1,24 @@ +import React from 'react' +import './FlightCards.css' +function FlightCards({flight}) { + return ( + +
+ +

{train.train_name}

+
+

+ Date: {train.next_date} +

+

+ Time: {train.train_time} +

+

+ Cost: {train.cost} +

+
+
+ ) +} + +export default FlightCards \ No newline at end of file diff --git a/src/components/FlightCards/TrainCards.js b/src/components/FlightCards/TrainCards.js new file mode 100644 index 0000000..0704e90 --- /dev/null +++ b/src/components/FlightCards/TrainCards.js @@ -0,0 +1,25 @@ +import React from 'react' +import '../FlightCards/FlightCards.css' +function TrainCards({train}) { + return ( + +
+ +

{train.train_name}

+
+

+ Date: {train.next_date} +

+

+ Time: {train.train_time} +

+

+ Cost: {train.cost} +

+
+
+ + ) +} + +export default TrainCards \ No newline at end of file diff --git a/src/pages/PlaceDetailPage/PlaceDetailPage.css b/src/pages/PlaceDetailPage/PlaceDetailPage.css index 4b61894..74b1924 100644 --- a/src/pages/PlaceDetailPage/PlaceDetailPage.css +++ b/src/pages/PlaceDetailPage/PlaceDetailPage.css @@ -130,6 +130,13 @@ gap: 2rem; flex-direction: row; } +.train__container +{ + display: flex; + flex-wrap: wrap; + gap: 2rem; + flex-direction: row; +} @media only screen and (max-width: 1300px) { diff --git a/src/pages/PlaceDetailPage/PlaceDetailPage.js b/src/pages/PlaceDetailPage/PlaceDetailPage.js index 24f718f..dcf35d3 100644 --- a/src/pages/PlaceDetailPage/PlaceDetailPage.js +++ b/src/pages/PlaceDetailPage/PlaceDetailPage.js @@ -7,6 +7,7 @@ import BookingComponent from './BookingComponent' import axios from 'axios' import baseUrl from '../../utils/Urls' import HotelCards from '../../components/HotelCards/HotelCards' +import TrainCards from '../../components/FlightCards/TrainCards' const PlaceDetailPage = () => { const[placeName,setPlaceName]=useState('') const[placeImage,setPlaceImage]=useState() @@ -105,18 +106,16 @@ const PlaceDetailPage = () => {
Trains to {placeName} - +
+
Hotels in {placeName}