Commit 207468fb authored by Jose Luis Bautista's avatar Jose Luis Bautista

Navibar and basic HTML/CSS stuff

navibar inspired by Zambiart
parent 80256662
from django import forms
class home(forms.Form):
name = forms.CharField(label='', max_length = 25)
......@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......@@ -54,7 +55,7 @@ ROOT_URLCONF = 'BauJo.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'BauJo/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......@@ -118,3 +119,4 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'BauJo/static')]
nav {
height: 80px;
width: 100%;
line-height: 40px;
overflow: auto;
background-color:black;
overflow: hidden;
}
nav ul{
float: center;
}
nav ul li{
display: inline-block;
list-style-type: none;
}
nav ul a{
text-decoration: none;
color: white;
padding: 35px;
}
nav ul a:hover{
background-color: rgb(34, 34, 34);
color: white;
}
nav ul a:active{
background-color: #4CAF50;
color: white;
}
\ No newline at end of file
<!DOCTYPE html>
{% load static %}
{% block styles %}
<link rel=stylesheet href="{% static 'style.css' %}">
{% endblock %}
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<nav>
<ul>
<li><a href="home/">Home</a></li>
<li><a href="profile/">Profile</a></li>
</ul>
</nav>
</head>
<body>
</body>
</html>
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Key{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Key{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Profile{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}This Week{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Today{% endblock %}
\ No newline at end of file
......@@ -16,6 +16,13 @@ Including another URLconf
from django.contrib import admin
from django.urls import path
from .views import index
urlpatterns = [
path('admin/', admin.site.urls),
#path('admin/', admin.site.urls),
path('', index, name = 'index'),
path('home/', index, name = 'index'),
path('profile/', index, name = 'profile'),
]
from django.shortcuts import render
from django.http import HttpResponse
from .forms import home
def index(request):
form = home()
return render(request,'profile.html',{'home' : home})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment