1st commit
This commit is contained in:
37
templates/base.html
Normal file
37
templates/base.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Poll Me | Polls List</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
|
||||
crossorigin="anonymous">
|
||||
|
||||
{% block custom_css %}{% endblock custom_css %}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include 'includes/navbar.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
<!-- All javascript files goes under here -->
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
21
templates/home.html
Normal file
21
templates/home.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block custom_css %}
|
||||
<link rel="stylesheet" href="{% static 'css/home_style.css' %}">
|
||||
{% endblock custom_css %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div id="home-content">
|
||||
<h1>PollMe - Get Started!</h1>
|
||||
<h3>Your Voice Matters!</h3>
|
||||
<hr>
|
||||
<a class="btn btn-light btn-lg" href="{% url 'polls:list' %}" role="button">Get Started !</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
28
templates/includes/navbar.html
Normal file
28
templates/includes/navbar.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<nav class="navbar navbar-expand-sm navbar-light bg-light mb-5">
|
||||
<a class="navbar-brand" href="{% url 'home' %}"><i class="fas fa-person-booth"></i></a>
|
||||
<button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#collapsibleNavId"
|
||||
aria-controls="collapsibleNavId" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="collapsibleNavId">
|
||||
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'home' %}">Home <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'polls:list' %}">Polls</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="navbar-nav ml-auto">
|
||||
{% if request.user.is_authenticated %}
|
||||
<a class="nav-link" href="{% url 'polls:list_by_user' %}">My Polls</a>
|
||||
<a class="nav-link" href="{% url 'accounts:logout' %}">Logout</a>
|
||||
{% else %}
|
||||
<a class="nav-link" href="{% url 'accounts:login' %}">Login</a>
|
||||
<a class="nav-link" href="{% url 'accounts:register' %}">Register</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user