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

Add ContactUs and AboutUs #149

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','https://vaidaantonjo-8000.theianext-0-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai']
CSRF_TRUSTED_ORIGINS=['https://vaidaantonjo-8000.theianext-0-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai']

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)
6 changes: 4 additions & 2 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,7 +28,8 @@ <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%;">
Expand Down
36 changes: 36 additions & 0 deletions server/frontend/static/Contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<html>
<head>
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/bootstrap.min.css">
</head>
<body>
<div style="height: 100%; background-color: darkturquoise; display: flex; justify-content: center; align-items: center">
<div style="height: 80%; width:80%; background-color: red; border: 5px solid green; padding: 20px; border-radius: 25px;">
<div style="height: 100%; width:100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center;">
<div style="height: 45%; display: flex; justify-content: center; align-items: center; padding: 5px; flex-grow: 10;">
<img style="height: 200px; width:350px;" src="https://upload.wikimedia.org/wikipedia/commons/a/a4/2019_Toyota_Corolla_Icon_Tech_VVT-i_Hybrid_1.8.jpg" alt="Card image">
</div>
<div style="height: 45%; width:100%; display: flex; justify-content: space-between; align-items: center;">
<div style="height: 100%; width:100%; display: flex; justify-content: center; align-items: center;">
<img style="height: 100%; width:150px;" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTyzTWQoCUbRNdiyorem5Qp1zYYhpliR9q0Bw&s" alt="Card image">
</div>
<div style="height: 100%; width:5px; background-color: black"></div>
<div style="height: 100%; width:100%; display: flex; justify-content: center; align-items: center;">
<ul style="display: flex; flex-direction: column; justify-content: start; align-items: start;">
<li style="margin-bottom: 5px;">
<a class="nav-link" style="font-size: larger;" aria-current="page" href="/">First</a>
</li>
<li style="margin-bottom: 5px;">
<a class="nav-link active" style="font-size: larger;" href="/about">Second</a>
</li>
<li style="margin-bottom: 5px;">
<a class="nav-link" style="font-size: larger;" href="/contact">Third</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html>