Skip to content
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
Empty file.
16 changes: 16 additions & 0 deletions GoogleSearch/GoogleSearch/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for GoogleSearch project.

It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/6.0/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'GoogleSearch.settings')

application = get_asgi_application()
118 changes: 118 additions & 0 deletions GoogleSearch/GoogleSearch/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
"""
Django settings for GoogleSearch project.

Generated by 'django-admin startproject' using Django 6.0.3.

For more information on this file, see
https://docs.djangoproject.com/en/6.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/6.0/ref/settings/
"""

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-va+-9k9lu@igyhbv!prh9(&g@u+%=ts_0u!o=-ow0@#lb2oz1$'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'main',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'GoogleSearch.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'GoogleSearch.wsgi.application'


# Database
# https://docs.djangoproject.com/en/6.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}


# Password validation
# https://docs.djangoproject.com/en/6.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/6.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/6.0/howto/static-files/

STATIC_URL = 'static/'
23 changes: 23 additions & 0 deletions GoogleSearch/GoogleSearch/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
URL configuration for GoogleSearch project.

The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/6.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path , include

urlpatterns = [
path('admin/', admin.site.urls),
path('',include("main.urls"))
]
16 changes: 16 additions & 0 deletions GoogleSearch/GoogleSearch/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for GoogleSearch project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/6.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'GoogleSearch.settings')

application = get_wsgi_application()
Empty file added GoogleSearch/main/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions GoogleSearch/main/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions GoogleSearch/main/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class MainConfig(AppConfig):
name = 'main'
Empty file.
3 changes: 3 additions & 0 deletions GoogleSearch/main/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
178 changes: 178 additions & 0 deletions GoogleSearch/main/static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
body {
font-family: 'Roboto', sans-serif;
margin: 0;
color: #202124;
}


.header {
display: flex;
justify-content: flex-end;
padding: 15px 20px;
}

.right-links a {
margin-right: 15px;
text-decoration: none;
color: #202124;
font-size: 14px;
}

.signin-btn {
background: #1a73e8;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
}


.main {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 100px;
}

.logo {
width: 272px;
margin-bottom: 25px;
}


.search-container {
width: 100%;
display: flex;
justify-content: center;
}

.search-box {
display: flex;
align-items: center;
width: 580px;
height: 44px;
border: 1px solid #dfe1e5;
border-radius: 24px;
padding: 0 15px;
}


.search-box:hover {
box-shadow: 0 1px 6px rgba(32,33,36,0.28);
}

.search-box input {
flex: 1;
border: none;
outline: none;
font-size: 16px;
}

.icons img {
width: 25px;

}

/* BUTTONS */
.buttons {
margin-top: 25px;
}

.buttons button {
background: #f8f9fa;
border: 1px solid #f8f9fa;
padding: 10px 16px;
margin: 5px;
border-radius: 4px;
cursor: pointer;
}

.buttons button:hover {
border: 1px solid #dadce0;
}

/* FOOTER */
.footer {
position: fixed;
bottom: 0;
width: 100%;
background: #f2f2f2;
font-size: 14px;
}

.footer-top {
padding: 10px 20px;
border-bottom: 1px solid #dadce0;
}

.footer-bottom {
display: flex;
justify-content: space-between;
padding: 10px 20px;
}

.footer a {
margin-right: 15px;
text-decoration: none;
color: #70757a;
}

/* TERMS PAGE */
.terms-page {
text-align: left;
margin-top: 50px;
}

/* .terms-img {
width: 90vh;
margin-bottom: 30px;
display: flex;
justify-content: center
;
} */
.terms-img {
display: flex;
justify-content: center;
margin: auto;
height: 500px;
width: 400px;
}




.terms-content {
max-width: 700px;
margin: auto;
}


.terms-header {
text-align: center;
margin-top: 40px;
}

.terms-illustration {
width: 180px;
margin-bottom: 20px;
}

.terms-meta a {
color: #1a73e8;
text-decoration: none;
}

.country {
margin-top: 5px;
}

.terms-body {
width: 65%;
margin: 40px auto;
line-height: 1.8;
}
.back-btn:hover{
color: #ac3131;
}

Binary file added GoogleSearch/main/static/images/camera.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 GoogleSearch/main/static/images/google-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 GoogleSearch/main/static/images/mircophone.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 GoogleSearch/main/static/images/tos_main_illustration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions GoogleSearch/main/templates/main/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}Google{% endblock %}</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" />
<style>
.material-symbols-outlined {
font-variation-settings:
'FILL' 0,
'wght' 400,
'GRAD' 0,
'opsz' 24;
}
</style>

<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
Loading