Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of views based on routing implemented (All Planets) #14

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "./App.css";
import Home from "./views/Home";
import Register from "./views/Register";
import Login from "./views/Login";
import FilmDetail from "./views/FilmDetail";
import Planets from "./views/Planets";

function App() {
Expand All @@ -12,6 +13,7 @@ function App() {
<Route path="/" element={<Home />} />
<Route path="/register" element={<Register />} />
<Route path="/login" element={<Login />} />
<Route path="/filmdetail" element={<FilmDetail />} />
<Route path="/planets" element={<Planets />} />
</Routes>
);
Expand Down
6 changes: 5 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;

body{
background-color: black;
}
35 changes: 35 additions & 0 deletions src/views/FilmDetail.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
function FilmDetail() {
return (
<div className="container mx-auto mt-5">
<div className="grid grid-cols-2 gap-4 h-1/2">
<div className="col-span-1">
<img
src="https://images.unsplash.com/photo-1432457990754-c8b5f21448de?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=435&q=80"
className="w-full h-1/2 object-cover"
alt="cover"
/>
</div>
<div
className="col-span-1 pl-4 pt-10 h-1/2 text-white"
style={{ backgroundColor: "#423E3E" }}>
<h2 className="font-bold" style={{fontSize:"30px"}}>Star Wars: The Phantom</h2>
<p className="text-lg mt-7">
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis
quibusdam quos dicta minima est necessitatibus recusandae fugit
saepe odio autem assumenda voluptatum beatae molestias facere,
officiis laborum tenetur voluptatibus dolorum. Dolore, error sit
molestias sunt numquam temporibus commodi sapiente voluptas quos
voluptatibus repellendus dolores cumque nesciunt nihil, placeat,
perferendis quae nisi dolorem accusamus magnam deleniti. Repellendus
perspiciatis nobis molestiae perferendis blanditiis sed obcaecati,
inventore praesentium nesciunt odit fugiat delectus aliquam
</p>
</div>
</div>
<h3 className="text-2xl font-bold text-white" style={{marginTop:"-480px",marginLeft:"20px"}}>Databank: The Phantom</h3>
<hr className="w-100 h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"/>
</div>
);
}

export default FilmDetail;