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

Feature 2 #8

Open
wants to merge 17 commits into
base: feature_1
Choose a base branch
from
Open
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
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# CARS CLUB

##### Main Goal: Improve my **TypeScript** skills

---

#### Plans & Features (in non-technical way):
Expand All @@ -11,3 +9,21 @@
- Section for posting cars for sales (allowed by all users): Marketplace
- Posts will be connected to the OP user (original poster) & they can update or delete their post
- Users not related to a particular post will be able to comment; they will be related to their own comment & be able to update and delete their own comment

### Run my frontend project

- Clone this project.
- Navigate (`cd`) into your project directory.
- Run `npm install` in your command line.
- Run `npm run dev` in your command line.
- Visit http://localhost:5173 in your browser.
- Vite version 4 has changed the PORT from 3000 to 5173.
- For the full functionality connect it with my <a href="https://github.com/Aleksandar15/Cars-Club-backend">backend</a> project.

##### Technologies used:

###### Postgres DB, TypeScript, ReactJS with Redux, NodeJS with ExpressJS

##### Sources

- For most of my SVG icons I've used a PNG version of icons8 and then converted that PNG into SVG using sites like https://www.pngtosvg.com
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="sportcar-96px+background.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cars Club</title>
</head>
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[redirects]]
from = '/*'
to = '/index.html'
status = 200
91 changes: 91 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.3.4",
"bootstrap": "^5.2.3",
"react": "^18.2.0",
"react-bootstrap": "^2.7.2",
Expand Down
Binary file added public/imgs/error404/error-png-128.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 public/imgs/error404/error-png-256.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 public/imgs/error404/error-png-512.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 public/imgs/error404/error-png-64.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 public/sportcar-96+no-background.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 public/sportcar-96px+background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/sportcar-97-svg-qweqpw.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* width */
::-webkit-scrollbar {
width: 15px;
/* height -> modifies the bottom(/horizontal) scrollbar */
height: 15px;
}

/* Trackpad */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px rgb(22, 131, 186);
border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
background: blue;
border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 255, 0.777);
}

.form-login {
border: dotted red 2px;
padding: 20px;
border-radius: 10px;
}

20 changes: 13 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { useState } from "react";
import { Container } from "react-bootstrap";
// import reactLogo from './assets/react.svg'
// import "./App.css";
import "./App.css";
import { Routes, Route } from "react-router-dom";
import HomePage from "./components/Home/HomePage";
import HomePage from "./pages/Home/HomePage";
import NavBar from "./components/NavBar/NavBar";
import Marketplace from "./components/Marketplace/Marketplace";
import PageNotFound from "./pages/PageNotFound/PageNotFound";
import Catalog from "./pages/ProtectedPages/Catalog";
import Marketplace from "./pages/ProtectedPages/Marketplace";
import Login from "./pages/PublicPages/Login";
import Register from "./pages/PublicPages/Register";

function App() {
return (
Expand All @@ -15,14 +19,16 @@ function App() {
<Routes>
<Route path="/" element={<HomePage />} />

{/* Public routes */}
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />

{/* Protected routes */}
<Route path="/marketplace" element={<Marketplace />} />
<Route path="/catalog" element={<Catalog />} />

{/* Not found route */}
<Route
path="*"
element={<h1 className="text-danger">NOT FOUND</h1>}
/>
<Route path="*" element={<PageNotFound />} />
</Routes>
</Container>
</div>
Expand Down
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.
1 change: 1 addition & 0 deletions src/assets/svg-icons/searchIcon/icons8-search.svg
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.
Empty file removed src/components/Catalog/Catalog.tsx
Empty file.
9 changes: 0 additions & 9 deletions src/components/Home/HomePage.tsx

This file was deleted.

Empty file removed src/components/Login/Login.tsx
Empty file.
64 changes: 0 additions & 64 deletions src/components/Marketplace/Marketplace.tsx

This file was deleted.

22 changes: 22 additions & 0 deletions src/components/MarketplaceComponents/CreatePost.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Button } from "react-bootstrap";
import CreatePostSVG from "../../utilities/icons-setup/createPost-SVG";

const CreatePostButton = () => {
return (
<div>
<div className="mt-1 ms-1 mb-2 d-flex align-items-center justify-content-space-between">
<h4 className="text-uppercase text-info fs-4 d-flex">
Have an offer? post yours instead
</h4>
<Button
size="lg"
className="btn-lg ms-4 mb-1 btn-outline-info bg-info "
>
<CreatePostSVG />
</Button>
</div>
</div>
);
};

export default CreatePostButton;
Loading