├── .qovery.yml ├── contacts ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── admin.cpython-37.pyc │ ├── models.cpython-37.pyc │ ├── urls.cpython-37.pyc │ └── views.cpython-37.pyc ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20210108_1420.py │ ├── 0003_remove_contact_birthday.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-37.pyc │ │ ├── 0002_auto_20210108_1420.cpython-37.pyc │ │ ├── 0003_remove_contact_birthday.cpython-37.pyc │ │ └── __init__.cpython-37.pyc ├── models.py ├── tests.py ├── urls.py └── views.py ├── contactslist ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── settings.cpython-37.pyc │ ├── urls.cpython-37.pyc │ └── wsgi.cpython-37.pyc ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py ├── db.sqlite3 ├── manage.py ├── static ├── style-delete.css ├── style-edit.css ├── style-profile.css └── style.css └── templates ├── contact-profile.html ├── delete.html ├── edit.html ├── index.html └── new.html /.qovery.yml: -------------------------------------------------------------------------------- 1 | --- 2 | application: 3 | name: "contacts-list" 4 | project: "first-project" 5 | organization: "QoveryCommunity" 6 | routers: 7 | - name: "main-contacts-list" 8 | routes: 9 | - application_name: "contacts-list" 10 | paths: 11 | - "/*" 12 | -------------------------------------------------------------------------------- /contacts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/__init__.py -------------------------------------------------------------------------------- /contacts/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Contact 3 | 4 | # Register your models here. 5 | admin.site.register(Contact) -------------------------------------------------------------------------------- /contacts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ContactsConfig(AppConfig): 5 | name = 'contacts' 6 | -------------------------------------------------------------------------------- /contacts/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.4 on 2021-01-08 14:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Contact', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('full_name', models.CharField(max_length=250)), 19 | ('relationship', models.CharField(max_length=250)), 20 | ('email', models.EmailField(max_length=254)), 21 | ('phone_number', models.CharField(max_length=20)), 22 | ('address', models.CharField(max_length=1000)), 23 | ('birthday', models.DateField(max_length=1000)), 24 | ], 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /contacts/migrations/0002_auto_20210108_1420.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.4 on 2021-01-08 14:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('contacts', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='contact', 15 | name='birthday', 16 | field=models.DateField(), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /contacts/migrations/0003_remove_contact_birthday.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.4 on 2021-01-10 23:47 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('contacts', '0002_auto_20210108_1420'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='contact', 15 | name='birthday', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /contacts/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/migrations/__init__.py -------------------------------------------------------------------------------- /contacts/migrations/__pycache__/0001_initial.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/migrations/__pycache__/0001_initial.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/migrations/__pycache__/0002_auto_20210108_1420.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/migrations/__pycache__/0002_auto_20210108_1420.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/migrations/__pycache__/0003_remove_contact_birthday.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/migrations/__pycache__/0003_remove_contact_birthday.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contacts/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /contacts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Contact(models.Model): 5 | full_name = models.CharField(max_length=250) 6 | relationship = models.CharField(max_length=250) 7 | email = models.EmailField(max_length=254) 8 | phone_number = models.CharField(max_length=20) 9 | address = models.CharField(max_length=1000) 10 | 11 | def __str__(self): 12 | return self.full_name -------------------------------------------------------------------------------- /contacts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /contacts/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.index, name='index'), 6 | path('add-contact/', views.addContact, name='add-contact'), 7 | path('edit-contact/', views.editContact, name='edit-contact'), 8 | path('delete/', views.deleteContact, name='delete'), 9 | path('profile/', views.contactProfile, name='profile') 10 | ] -------------------------------------------------------------------------------- /contacts/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .models import Contact 3 | 4 | # Create your views here. 5 | 6 | def index(request): 7 | contacts = Contact.objects.all() 8 | search_input = request.GET.get('search-area') 9 | if search_input: 10 | contacts = Contact.objects.filter(full_name__icontains=search_input) 11 | else: 12 | contacts = Contact.objects.all() 13 | search_input = '' 14 | return render(request, 'index.html', {'contacts': contacts, 'search_input': search_input}) 15 | 16 | def addContact(request): 17 | if request.method == 'POST': 18 | 19 | new_contact = Contact( 20 | full_name=request.POST['fullname'], 21 | relationship=request.POST['relationship'], 22 | email=request.POST['email'], 23 | phone_number=request.POST['phone-number'], 24 | address=request.POST['address'], 25 | ) 26 | new_contact.save() 27 | return redirect('/') 28 | 29 | return render(request, 'new.html') 30 | 31 | def editContact(request, pk): 32 | contact = Contact.objects.get(id=pk) 33 | 34 | if request.method == 'POST': 35 | contact.full_name = request.POST['fullname'] 36 | contact.relationship = request.POST['relationship'] 37 | contact.email = request.POST['email'] 38 | contact.phone_number = request.POST['phone-number'] 39 | contact.address = request.POST['address'] 40 | contact.save() 41 | 42 | return redirect('/profile/'+str(contact.id)) 43 | return render(request, 'edit.html', {'contact': contact}) 44 | 45 | def deleteContact(request, pk): 46 | contact = Contact.objects.get(id=pk) 47 | 48 | if request.method == 'POST': 49 | contact.delete() 50 | return redirect('/') 51 | 52 | return render(request, 'delete.html', {'contact': contact}) 53 | 54 | def contactProfile(request, pk): 55 | contact = Contact.objects.get(id=pk) 56 | return render(request, 'contact-profile.html', {'contact':contact}) -------------------------------------------------------------------------------- /contactslist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contactslist/__init__.py -------------------------------------------------------------------------------- /contactslist/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contactslist/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /contactslist/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contactslist/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /contactslist/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contactslist/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /contactslist/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/contactslist/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /contactslist/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for contactslist project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'contactslist.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /contactslist/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for contactslist project. 3 | 4 | Generated by 'django-admin startproject' using Django 3.1.4. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/3.1/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | import os 15 | 16 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 17 | BASE_DIR = Path(__file__).resolve().parent.parent 18 | 19 | 20 | # Quick-start development settings - unsuitable for production 21 | # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | SECRET_KEY = 'lqzo%=5tyvuk8w7=1$1sl!ry4^-r2jg*8q0y4ymwee89)aavf#' 25 | 26 | # SECURITY WARNING: don't run with debug turned on in production! 27 | DEBUG = True 28 | 29 | ALLOWED_HOSTS = ['*'] 30 | 31 | 32 | # Application definition 33 | 34 | INSTALLED_APPS = [ 35 | 'django.contrib.admin', 36 | 'django.contrib.auth', 37 | 'django.contrib.contenttypes', 38 | 'django.contrib.sessions', 39 | 'django.contrib.messages', 40 | 'django.contrib.staticfiles', 41 | 'contacts' 42 | ] 43 | 44 | MIDDLEWARE = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'contactslist.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': [BASE_DIR/'templates'], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'contactslist.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/3.1/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.sqlite3', 81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 82 | } 83 | } 84 | 85 | 86 | # Password validation 87 | # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators 88 | 89 | AUTH_PASSWORD_VALIDATORS = [ 90 | { 91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 92 | }, 93 | { 94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 95 | }, 96 | { 97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 98 | }, 99 | { 100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 101 | }, 102 | ] 103 | 104 | 105 | # Internationalization 106 | # https://docs.djangoproject.com/en/3.1/topics/i18n/ 107 | 108 | LANGUAGE_CODE = 'en-us' 109 | 110 | TIME_ZONE = 'UTC' 111 | 112 | USE_I18N = True 113 | 114 | USE_L10N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | # Static files (CSS, JavaScript, Images) 120 | # https://docs.djangoproject.com/en/3.1/howto/static-files/ 121 | 122 | STATIC_URL = '/static/' 123 | STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') 124 | STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) -------------------------------------------------------------------------------- /contactslist/urls.py: -------------------------------------------------------------------------------- 1 | """contactslist URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/3.1/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | 19 | urlpatterns = [ 20 | path('admin/', admin.site.urls), 21 | path('', include('contacts.urls')) 22 | ] 23 | -------------------------------------------------------------------------------- /contactslist/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for contactslist project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'contactslist.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomitokko/contacts-list/ac912762480132d0d04c668bcf5f932a173d303f/db.sqlite3 -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'contactslist.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /static/style-delete.css: -------------------------------------------------------------------------------- 1 | *, *::before, *::after { 2 | box-sizing: border-box; 3 | } 4 | 5 | body{ 6 | font-family: 'Inter', sans-serif; 7 | margin: 0; 8 | } 9 | 10 | .container{ 11 | max-width: 428px; 12 | margin: 0 auto; 13 | background-color: #313438; 14 | min-height: 100vh; 15 | } 16 | 17 | 18 | .hero{ 19 | color: white; 20 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 21 | padding: 2em 0; 22 | } 23 | 24 | .back-btn{ 25 | color: #fff; 26 | font-size: 1.7em; 27 | padding-left: 1em; 28 | } 29 | 30 | 31 | .hero-info{ 32 | display: flex; 33 | flex-flow: column; 34 | align-items: center; 35 | } 36 | 37 | .relationship-hero{ 38 | width: 5em; 39 | text-align: center; 40 | padding: .4em .5em; 41 | border-radius: 100px; 42 | border-top-left-radius: 0; 43 | margin: 0; 44 | background-color: #75A85E; 45 | } 46 | 47 | 48 | .delete-container{ 49 | background-color: #313438; 50 | color: #fff; 51 | text-align: center; 52 | } 53 | 54 | p{ 55 | padding-bottom: 2em; 56 | color: #fff; 57 | } 58 | 59 | .delete-container{ 60 | padding: 2em 3.5em; 61 | } 62 | 63 | .delete-contact{ 64 | display: flex; 65 | width: 90%; 66 | margin: 0 auto; 67 | align-items: center; 68 | padding: 1em 2em; 69 | border-radius: 20px; 70 | box-shadow: 6px 6px 12px #2d2f33, 71 | -6px -6px 12px #35393d; 72 | } 73 | 74 | .delete-button{ 75 | background-color: #313438; 76 | border: none; 77 | color: #fff; 78 | font-size: 1.3em; 79 | padding-left: 1.5em; 80 | cursor: pointer; 81 | } 82 | 83 | .delete-icon{ 84 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 85 | border-radius: 100px; 86 | font-size: 1.5em; 87 | padding: .5em; 88 | cursor: pointer; 89 | } -------------------------------------------------------------------------------- /static/style-edit.css: -------------------------------------------------------------------------------- 1 | *, *::before, *::after { 2 | box-sizing: border-box; 3 | } 4 | 5 | body{ 6 | font-family: 'Inter', sans-serif; 7 | margin: 0; 8 | } 9 | 10 | .container{ 11 | max-width: 428px; 12 | margin: 0 auto; 13 | background-color: #313438; 14 | min-height: 100vh; 15 | } 16 | 17 | 18 | a{ 19 | text-decoration: none; 20 | } 21 | 22 | 23 | .hero{ 24 | color: white; 25 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 26 | padding: 2em 0; 27 | } 28 | 29 | .back-btn{ 30 | color: #fff; 31 | font-size: 1.7em; 32 | padding-left: 1em; 33 | } 34 | 35 | .contact-info{ 36 | padding: 1.5em; 37 | } 38 | 39 | 40 | .hero-info{ 41 | display: flex; 42 | flex-flow: column; 43 | align-items: center; 44 | } 45 | 46 | .relationship-hero{ 47 | width: 5em; 48 | text-align: center; 49 | padding: .4em .5em; 50 | border-radius: 100px; 51 | border-top-left-radius: 0; 52 | margin: 0; 53 | background-color: #75A85E; 54 | } 55 | 56 | 57 | .info-line{ 58 | display: flex; 59 | color: #fff; 60 | width: 90%; 61 | margin: 0 auto; 62 | padding: 1em 2em; 63 | margin-top: 2em; 64 | border-radius: 20px; 65 | box-shadow: inset 6px 6px 12px #2d2f33, 66 | inset -6px -6px 12px #35393d; 67 | } 68 | 69 | p{ 70 | margin: 0; 71 | padding-left: 2em; 72 | } 73 | 74 | .icon-gradient{ 75 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 76 | border-radius: 100px; 77 | font-size: 1.5em; 78 | padding: .5em; 79 | } 80 | 81 | .location{ 82 | padding: .5em .6em; 83 | } 84 | 85 | .type{ 86 | border: none; 87 | background: none; 88 | padding-left: 2em; 89 | font-size: 1.2em; 90 | color: #fff; 91 | outline: none; 92 | } 93 | 94 | .button-container{ 95 | background-color: #313438; 96 | padding: 2em 3.5em; 97 | color: #fff; 98 | } 99 | 100 | .update-contact{ 101 | display: flex; 102 | color: #fff; 103 | width: 90%; 104 | margin: 0 auto; 105 | align-items: center; 106 | padding: 1em 2em; 107 | border-radius: 20px; 108 | box-shadow: 6px 6px 12px #2d2f33, 109 | -6px -6px 12px #35393d; 110 | 111 | } 112 | 113 | .button{ 114 | background-color: #313438; 115 | border: none; 116 | color: #fff; 117 | font-size: 1.3em; 118 | padding-left: 1.5em; 119 | outline: none; 120 | cursor: pointer; 121 | } 122 | -------------------------------------------------------------------------------- /static/style-profile.css: -------------------------------------------------------------------------------- 1 | *, *::before, *::after { 2 | box-sizing: border-box; 3 | } 4 | 5 | body{ 6 | font-family: 'Inter', sans-serif; 7 | margin: 0; 8 | } 9 | 10 | .container{ 11 | max-width: 428px; 12 | margin: 0 auto; 13 | background-color: #313438; 14 | min-height: 100vh; 15 | } 16 | 17 | .hero{ 18 | color: #fff; 19 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 20 | padding: 2em 0; 21 | } 22 | 23 | .back-btn{ 24 | color: #fff; 25 | font-size: 1.7em; 26 | padding-left: 1em; 27 | } 28 | 29 | .contact-info{ 30 | padding: 3em 1.5em; 31 | } 32 | 33 | .hero-info{ 34 | display: flex; 35 | flex-flow: column; 36 | align-items: center; 37 | } 38 | 39 | .relationship{ 40 | width: 5em; 41 | text-align: center; 42 | padding: .4em .5em; 43 | border-radius: 100px; 44 | border-top-left-radius: 0; 45 | margin: 0; 46 | } 47 | 48 | .friend{ 49 | background-color: #75A85E; 50 | } 51 | 52 | .info-line{ 53 | display: flex; 54 | color: #fff; 55 | width: 90%; 56 | margin: 0 auto; 57 | align-items: center; 58 | padding: 1em 2em; 59 | margin-top: 2em; 60 | border-radius: 20px; 61 | box-shadow: 6px 6px 12px #2d2f33, 62 | -6px -6px 12px #35393d; 63 | } 64 | 65 | p{ 66 | margin: 0; 67 | padding-left: 2em; 68 | } 69 | 70 | .icon-gradient{ 71 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 72 | border-radius: 100px; 73 | font-size: 1.5em; 74 | padding: .5em; 75 | } 76 | 77 | #location{ 78 | padding: .5em .6em; 79 | } 80 | 81 | 82 | 83 | .edit-contact{ 84 | background-color: #313438; 85 | padding: 2.5em 3.5em; 86 | text-align: center; 87 | color: #fff; 88 | } -------------------------------------------------------------------------------- /static/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family: 'Inter', sans-serif; 3 | margin: 0; 4 | } 5 | 6 | .container{ 7 | max-width: 428px; 8 | margin: 0 auto; 9 | background-color: #313438; 10 | min-height: 100vh; 11 | } 12 | 13 | a{ 14 | text-decoration: none; 15 | } 16 | 17 | .header{ 18 | display: flex; 19 | justify-content: space-evenly; 20 | color: #fff; 21 | background: linear-gradient(90deg, rgba(111,177,127,1) 0%, rgba(154,173,89,1) 100%); 22 | padding: 2em 0; 23 | align-items: center; 24 | } 25 | 26 | .contact-search{ 27 | font-size: 1.2em; 28 | padding:.3em .3em; 29 | border-radius: 100px; 30 | border:1px solid white; 31 | outline: none; 32 | } 33 | 34 | 35 | .contacts-library{ 36 | background: #313438; 37 | } 38 | 39 | .add{ 40 | color: #fff; 41 | font-size: 1.5em; 42 | } 43 | 44 | i{ 45 | color: #fff; 46 | font-size: 1.5em; 47 | } 48 | 49 | .contact-name{ 50 | color: #fff; 51 | font-size: 1.2em; 52 | } 53 | 54 | 55 | ul{ 56 | margin: 0; 57 | padding: 0; 58 | width: 100%; 59 | } 60 | 61 | hr{ 62 | border: 1px solicontactd #494a4b; 63 | } 64 | 65 | .list__item{ 66 | list-style: none; 67 | } 68 | 69 | .relationship{ 70 | color: #fff; 71 | width: 6em; 72 | text-align: center; 73 | padding: .4em .5em; 74 | border-radius: 100px; 75 | border-top-left-radius: 0; 76 | background-color: #75A85E; 77 | } 78 | 79 | 80 | .contact-section{ 81 | display: flex; 82 | justify-content: space-between; 83 | align-items: center; 84 | padding: 0 1.5em; 85 | transition: 0.3s; 86 | } 87 | 88 | .contact-section:hover{ 89 | background-color: #48494a; 90 | } 91 | 92 | .text{ 93 | padding-left: 1em; 94 | } -------------------------------------------------------------------------------- /templates/contact-profile.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Contact Profile 16 | 17 | 18 | 19 | 20 |
21 |
22 | 23 | 24 | 25 |
26 |

{{ contact.full_name | title }}

27 |

{{ contact.relationship | title }}

28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 |

{{ contact.phone_number }}

36 |
37 | 38 | 39 |
40 | 41 |

{{ contact.email }}

42 |
43 | 44 | 45 | 46 |
47 | 48 |

{{ contact.address }}

49 |
50 | 51 | 52 |
53 | 54 | 55 | 56 |
57 |
58 | 59 |
60 |
61 |
62 | 63 |
64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /templates/delete.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Delete Contact 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 |
25 |

{{ contact.full_name | title }}

26 |

{{ contact.relationship | title }}

27 |
28 |
29 | 30 |
31 |

Are you sure you want to delete this contact?

32 | 33 |
34 | {% csrf_token %} 35 |
36 | 37 | 38 |
39 |
40 | 41 |
42 |
43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /templates/edit.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Edit Contact 16 | 17 | 18 | 19 | 20 |
21 |
22 | 23 | 24 | 25 |
26 |

{{ contact.full_name | title }}

27 |

{{ contact.relationship | title }}

28 |
29 |
30 | 31 |
32 | {% csrf_token %} 33 |
34 | 35 |
36 | 37 | 39 |
40 | 41 |
42 | 43 | 45 |
46 | 47 | 48 | 49 |
50 | 51 | 53 |
54 | 55 | 56 | 57 |
58 | 59 | 60 |
61 | 62 | 63 | 64 |
65 | 66 | 67 |
68 | 69 | 70 |
71 | 72 |
73 |
74 | 75 | 76 |
77 |
78 |
79 | 80 |
81 | 82 | 83 |
84 | 85 | 86 |
87 |
88 | 89 |
90 |
91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Contacts List 17 | 18 | 19 | 20 |
21 | 22 |
23 | 32 | 33 |
34 | 35 |
36 | 64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /templates/new.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Edit Contact 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 |
27 |

New Contact

28 |
29 |
30 | 31 |
32 | {% csrf_token %} 33 |
34 | 35 |
36 | 37 | 38 |
39 | 40 |
41 | 42 | 43 |
44 | 45 | 46 | 47 |
48 | 49 | 50 |
51 | 52 | 53 | 54 | 55 |
56 | 57 | 58 |
59 | 60 | 61 |
62 | 63 | 64 |
65 | 66 | 67 | 68 |
69 | 70 |
71 | 72 | 73 |
74 | 75 | 76 |
77 |
78 | 79 | 80 |
81 |
82 | 83 | 84 | 85 | --------------------------------------------------------------------------------