Move the server code inside server dir
This commit is contained in:
29
server/notes/templates/notes/base.html
Normal file
29
server/notes/templates/notes/base.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="stylesheet" href="{% static "notes/stylesheets/style.css" %}" type="text/css">
|
||||
<title>{% block title %}{% endblock %} | Appunti</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="{% url "home" %}" class="home">Appunti</a>
|
||||
<a href="{% url "post-a-note" %}">
|
||||
<img src="{% static "notes/images/icons/post-a-note.png" %}" alt="Post a note" title="Post a note" />
|
||||
</a>
|
||||
<a href="{% url "profile" %}">
|
||||
<img src="{% static "notes/images/icons/profile.png" %}" alt="Profile" title="Profile" />
|
||||
</a>
|
||||
<form method="post" action="{% url "logout" %}">
|
||||
{% csrf_token %}
|
||||
<button class="logout"><img src="{% static "notes/images/icons/logout.png" %}" alt="Logout" title="Logout" /></button>
|
||||
</form>
|
||||
</header>
|
||||
<main>
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
23
server/notes/templates/notes/home.html
Normal file
23
server/notes/templates/notes/home.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "notes/base.html" %}
|
||||
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Dashboard</h1>
|
||||
{% include "notes/messages.html" %}
|
||||
|
||||
<h2>Notes for you</h2>
|
||||
{% if notes %}
|
||||
<div class="notes">
|
||||
{% for note in notes %}
|
||||
<div class="note">
|
||||
<p>{{ note.note }}</p>
|
||||
<p class="note-from">From {{ note.from_user.visible_name }}</p>
|
||||
<p class="note-at">{{ note.created_at|date:"j M, H:i"}}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card">No Notes found</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
7
server/notes/templates/notes/messages.html
Normal file
7
server/notes/templates/notes/messages.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if messages %}
|
||||
<div class="messages">
|
||||
{% for message in messages %}
|
||||
<div class="card">{{ message }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
12
server/notes/templates/notes/note_form.html
Normal file
12
server/notes/templates/notes/note_form.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "notes/base.html" %}
|
||||
|
||||
{% block title %}Post a Note{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Post a Note</h1>
|
||||
{% include "notes/messages.html" %}
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Post!</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
13
server/notes/templates/notes/user_form.html
Normal file
13
server/notes/templates/notes/user_form.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends "notes/base.html" %}
|
||||
|
||||
{% block title %}Profile{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Profile</h1>
|
||||
{% include "notes/messages.html" %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
18
server/notes/templates/registration/login.html
Normal file
18
server/notes/templates/registration/login.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "notes/base.html" %}
|
||||
{% block title %}Login{% endblock %}
|
||||
{% block body %}
|
||||
<div id="header">
|
||||
<h1>Appunti Login Screen</h1>
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
{% include "notes/messages.html" %}
|
||||
<form action="{% url 'login' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2>Welcome!</h2>
|
||||
<p>Please login to continue</p>
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user