anan commited on
Commit
f961d63
·
1 Parent(s): b2929bf

add loading page

Browse files
src/landing/__init__.py ADDED
File without changes
src/landing/admin.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.contrib import admin
2
+
3
+ # Register your models here.
src/landing/apps.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class LandingConfig(AppConfig):
5
+ name = 'landing'
src/landing/migrations/__init__.py ADDED
File without changes
src/landing/models.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.db import models
2
+
3
+ # Create your models here.
src/landing/templates/landing/base.html ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <!-- Required meta tags -->
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+
8
+ <script src="https://kit.fontawesome.com/1d71f92e0a.js" crossorigin="anonymous"></script>
9
+
10
+ <!-- Bootstrap CSS -->
11
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
12
+
13
+ <title>Social Network</title>
14
+ </head>
15
+ <body>
16
+ {% include 'landing/navbar.html' %}
17
+ {% block content %}
18
+ {% endblock content %}
19
+
20
+ <!-- Option 1: Bootstrap Bundle with Popper -->
21
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
22
+ </body>
23
+ </html>
src/landing/templates/landing/index.html ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends 'landing/base.html' %}
2
+
3
+ {% block content %}
4
+ <div class="container">
5
+ <div class="row justify-content-center mt-5">
6
+ <div class="col-md-10 col-sm-12 text-center">
7
+ <h1 class="display-2">Connect With Your Friends</h1>
8
+ <p class="mt-3 lead">Follow people who interest you, stay up to date on the latest news and join conversations with your friends!</p>
9
+ <div class="d-flex justify-content-center mt-5">
10
+ <a href="{% url 'account_login' %}" class="btn btn-light mr-2">Log In</a>
11
+ <a href="{% url 'account_signup' %}" class="btn btn-dark">Register</a>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ {% endblock content %}
src/landing/templates/landing/navbar.html ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="container">
2
+ <nav class="navbar navbar-expand-lg navbar-light">
3
+ <div class="container-fluid">
4
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
5
+ <span class="navbar-toggler-icon"></span>
6
+ </button>
7
+ <a class="navbar-brand" href="{% url 'index' %}">Social Network</a>
8
+ <div class="collapse navbar-collapse" id="navbarTogglerDemo03">
9
+ <ul class="navbar-nav me-auto mb-2 mb-lg-0">
10
+ </ul>
11
+ <form class="d-flex">
12
+ <div class="input-group">
13
+ <span class="input-group-text" id="basic-addon1">@</span>
14
+ <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
15
+ </div>
16
+ </form>
17
+ {% if user.is_authenticated %}
18
+ <div class="nav-item dropdown">
19
+ <a class="nav-link dropdown-toggle text-dark" data-bs-toggle="dropdown" role="buton" aria-expanded="false"><i class="fas fa-user"></i></a>
20
+ <ul class="dropdown-menu">
21
+ <li><a class="dropdown-item" href="#">Profile</a></li>
22
+ <li><a class="dropdown-item" href="{% url 'account_logout' %}">Sign Out</a></li>
23
+ </ul>
24
+ </div>
25
+ {% endif %}
26
+ </div>
27
+ </div>
28
+ </nav>
29
+ </div>
src/landing/tests.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.test import TestCase
2
+
3
+ # Create your tests here.
src/landing/urls.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from django.urls import path
2
+ from landing.views import Index
3
+
4
+ urlpatterns = [
5
+ path('', Index.as_view(), name='index'),
6
+ ]
src/landing/views.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from django.shortcuts import render
2
+ from django.views import View
3
+
4
+ class Index(View):
5
+ def get(self, request, *args, **kwargs):
6
+ return render(request, 'landing/index.html')
7
+