Commit 801b781b authored by Silje Odland's avatar Silje Odland
Browse files

adds user app, base template and frontpage

parent b99e7504
<!DOCTYPE html>
<html lang="en" xmlns:margin-left="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Rød tråd</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</head>
<body style="background-color:lightblue;">
{% load static%}
<nav class="navbar fixed-top navbar-expand-md bg-light navbar-light">
<!-- Brand -->
<a class="" href=" "><img src="{% static 'img/knitting.png' %}" width="40" height="40"></a>
<!-- Toggler/collapsibe Button -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Navbar links -->
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="#">Hjem</a>
</li>
</ul>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#">Registrer</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Logg inn</a>
</li>
</ul>
</div>
</nav>
{% block body %}
{% endblock body %}
</div>
</body>
</html>
{% extends 'base.html' %}
{% load static %}
{% block body %}
<div style="padding-top: 150px">
<h1 style="font-size:300%; font-weight: bold; position: absolute; margin-left: 10%; ">Rød tråd</h1>
<p style="font-size:150%; position: absolute; margin-left:10%; margin-top: 5%"><br><br> Registrer ny bruker <br> eller logg inn for å se <br> utfordringer og innhold <br> fra andre brukere </p>
<img src="{% static 'img/profil.png' %}" alt="" style=" width: 38%; margin-left: 45%; margin-top: 12%; transform: translateY(-50%) rotate(-10deg);">
</div>
{% endblock %}
\ No newline at end of file
from django.shortcuts import render from django.shortcuts import render
# Create your views here. # Create your views here.
def index(request):
return render(request, "index.html")
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class UsersConfig(AppConfig):
name = 'apps.users'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.shortcuts import render
# Create your views here.
...@@ -119,3 +119,7 @@ USE_TZ = True ...@@ -119,3 +119,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.0/howto/static-files/ # https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]
...@@ -15,7 +15,12 @@ Including another URLconf ...@@ -15,7 +15,12 @@ Including another URLconf
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path
from apps.staticpages.views import index
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('', index),
#path('login/',)
] ]
Supports Markdown
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