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

edits and updates #124

Open
wants to merge 1 commit into
base: main
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
12 changes: 8 additions & 4 deletions server/djangoproj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
CSRF_TRUSTED_ORIGINS = []
ALLOWED_HOSTS=['localhost','http://127.0.0.1:8000/','127.0.0.1']
CSRF_TRUSTED_ORIGINS=['http://127.0.0.1']

REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [],
Expand Down Expand Up @@ -61,7 +61,9 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR,'frontend/static')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -134,5 +136,7 @@

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

STATICFILES_DIRS = []
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'frontend/static')
]

2 changes: 2 additions & 0 deletions server/djangoproj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
path('admin/', admin.site.urls),
path('djangoapp/', include('djangoapp.urls')),
path('', TemplateView.as_view(template_name="Home.html")),
path('about/', TemplateView.as_view(template_name="About.html")),
path('contact/', TemplateView.as_view(template_name="Contact.html")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
30 changes: 16 additions & 14 deletions server/frontend/static/About.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>
<head>
<!-- Link the style sheet here -->
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/bootstrap.min.css">
</head>
<div>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color:darkturquoise; height: 1in;">
Expand All @@ -27,35 +28,36 @@ <h2 style="padding-right: 5%;">Dealerships</h2>

<div class="card" style="width: 80%;margin: auto; margin-top:5%;">
<div class="banner" name="about-header">
<!-- Insert header information here -->
<h1>About Us</h1>
Welcome to Best Cars dealership, home to the best cars in North America. We deal in sale of domestic and imported cars at reasonable prices.
</div>
<div style="display: flex;flex-direction: row; margin:auto">
<div class="card" style="width: 30%;">
<img class="card-img-top" src="/static/person.png" alt="Card image">
<img class="card-img-top" src="https://t4.ftcdn.net/jpg/05/28/57/41/360_F_528574116_OBSxPD68hAgs7TccU7OLdTvJnCYjm6gW.jpg" alt="Card image">
<div class="card-body">
<p class="title">Person1</p>
<p>Person1 Title</p>
<p class="card-text">Some text that explains the person1 in about 2 short sentences</p>
<p class="title">Yoda</p>
<p>Master</p>
<p class="card-text">Wise, he is. Much to learn from him, there is.</p>
<p>[email protected]</p>
</div>
</div>

<div class="card" style="width: 30%;">
<img class="card-img-top" src="/static/person.png" alt="Card image">
<img class="card-img-top" src="https://pyxis.nymag.com/v1/imgs/73a/a89/3e06421c9061164cd70fb21b5712ab32f5-17-jar-jar-binks.rsquare.w330.jpg" alt="Card image">
<div class="card-body">
<p class="title">Person2</p>
<p>Person2 Title</p>
<p class="card-text">Some text that explains the person2 in about 2 short sentences</p>
<p class="title">Jaja</p>
<p>ololo</p>
<p class="card-text">A powerful figure, he is. Respect, one must give him, or face dire consequences.</p>
<p>[email protected]</p>
</div>
</div>

<div class="card" style="width: 30%;">
<img class="card-img-top" src="/static/person.png" alt="Card image">
<img class="card-img-top" src="https://heroichollywood.com/wp-content/uploads/2019/12/Star-Wars-George-Lucas-Palpatine.jpg" alt="Card image">
<div class="card-body">
<p class="title">Person3</p>
<p>Person3 Title</p>
<p class="card-text">Some text that explains the person3 in about 2 short sentences</p>
<p class="title">Palpatine</p>
<p>Canceler</p>
<p class="card-text">A master of manipulation, he is. His ambitions know no bounds, as he seeks ultimate control.</p>
<p>[email protected]</p>
</div>
</div>
Expand Down
40 changes: 40 additions & 0 deletions server/frontend/static/Contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/bootstrap.min.css">
<title>Contact Us</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color:darkturquoise; height: 1in;">
<div class="container-fluid">
<h2 style="padding-right: 5%;">Dealerships</h2>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" style="font-size: larger;" aria-current="page" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" style="font-size: larger;" href="/about">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link active" style="font-size: larger;" href="/contact">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="contact-info">
<h2>Get in Touch!</h2>
<p>If you have any questions, feel free to reach out:</p>
<p>Email: <a href="mailto:[email protected]">[email protected]</a></p>
<p>Phone: <a href="tel:1234567890">(123) 456-7890</a></p>
<p>Address: 1234 Example St, City, Country</p>
</div>
</body>
</html>
48 changes: 48 additions & 0 deletions server/frontend/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,51 @@ img{
text-align:center;
box-shadow: 2px 2px 3px #999;
}

body {
font-family: Arial, sans-serif;
}

nav ul {
list-style-type: none;
padding: 0;
}

nav li {
display: inline;
margin-right: 20px;
}

.active {
font-weight: bold;
text-decoration: underline;
}

.contact-info {
max-width: 600px; /* Limit width */
margin: 40px auto; /* Center horizontally and add top margin */
padding: 20px; /* Padding around the content */
background: white; /* White background for contrast */
border-radius: 8px; /* Rounded corners */
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
text-align: center; /* Center the text */
}

.contact-info h2 {
margin-bottom: 20px; /* Space below the heading */
color: #007BFF; /* Bootstrap primary color for header */
}

.contact-info p {
font-size: 1.1em; /* Slightly larger text */
margin: 10px 0; /* Space between paragraphs */
}

.contact-info a {
color: #007BFF; /* Link color */
text-decoration: none; /* Remove underline */
}

.contact-info a:hover {
text-decoration: underline; /* Underline on hover */
}
Loading