Skip to content

Commit

Permalink
Draft of refactored pages
Browse files Browse the repository at this point in the history
  • Loading branch information
naheyansheikh committed Nov 29, 2024
1 parent 7426b3f commit 3b719e6
Show file tree
Hide file tree
Showing 34 changed files with 2,239 additions and 722 deletions.
Binary file added frontend/src/assets/images/LogRectangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/ShopLogBooks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/adult-cardiac-book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/logbooks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/obstetrics-book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/ophthalmology-book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions frontend/src/components/ContentHeader/ContentHeader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.content-header {
position: absolute;
left: 230px;
top: 18%;
display: flex;
width: 80%;
justify-content: space-between;
align-items: center;
padding-bottom: 4px; /* Add padding to create space above border */
border-bottom: 1px solid #9AB0E1;
}

.content-header h2 {
font-size: 24px;
font-weight: 600;
color: #1E1E1E;
}

.button-group {
display: flex;
gap: 12px; /* Space between buttons */
align-items: center;
}

.actions-button {
background: white;
color: #000000; /* SECONDARY_COLOR */
border-radius: 20px; /* DEFAULT_BORDER_RADIUS */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
height: 40px;
padding: 0 16px;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 15px;
font-weight: 600;
}

.actions-button:hover {
background: #f0f5ff;
}

.add-button {
background: #244B94; /* PRIMARY_BACKGROUND_COLOR */
color: #F7FAFF; /* PRIMARY_COLOR */
border-radius: 20px; /* DEFAULT_BORDER_RADIUS */
width: 120px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
cursor: pointer;
font-size: 15px;
font-weight: 600;
}

.add-book-button:hover {
opacity: 0.9;
}

.plus-icon {
width: 18px;
height: 18px;
}

.down-icon {
width: 18px;
height: 18px;
}
39 changes: 39 additions & 0 deletions frontend/src/components/ContentHeader/ContentHeader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { useLocation } from "react-router-dom";
import { PlusIcon, ChevronDownIcon } from "@heroicons/react/24/outline";
import "./ContentHeader.css";

export default function ContentHeader() {
const location = useLocation();
const isHistory = location.pathname === "/history";

return (
<div className="content-header">
<h2>{isHistory ? "Log History" : "Logbooks"}</h2>
<div className="button-group">
<AddButton
variant={isHistory ? "history" : "logbook"}
onClick={() => {}}
/>
<ActionsButton onClick={() => {}} />
</div>
</div>
);
}

function AddButton({ variant = "logbook", onClick = () => {} }) {
return (
<button onClick={onClick} className="add-button">
{variant === "history" ? "Add Logs" : "Add Book"}
<PlusIcon className="plus-icon" />
</button>
);
}

function ActionsButton({ onClick = () => {} }) {
return (
<button onClick={onClick} className="actions-button">
<span>Actions</span>
<ChevronDownIcon className="down-icon" />
</button>
);
}
52 changes: 0 additions & 52 deletions frontend/src/components/LogHistory/LogTable.css

This file was deleted.

41 changes: 0 additions & 41 deletions frontend/src/components/LogHistory/LogTable.jsx

This file was deleted.

35 changes: 0 additions & 35 deletions frontend/src/components/LogHistory/Pagination.css

This file was deleted.

40 changes: 0 additions & 40 deletions frontend/src/components/LogHistory/Pagination.jsx

This file was deleted.

68 changes: 0 additions & 68 deletions frontend/src/components/LogHistory/SearchFilterSort.css

This file was deleted.

Loading

0 comments on commit 3b719e6

Please sign in to comment.