Add files via upload
This commit is contained in:
1 parent
e3817f7356
commit
244a3b4e9d
13 files changed
+329
No files matched your search
@@ -0,0 +1,63 @@
|
||||
{% load bootstrap4 %}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1,
|
||||
shrink-to-fit=no">
|
||||
<title>Learning Log</title>
|
||||
|
||||
{% bootstrap_css %}
|
||||
{% bootstrap_javascript jquery='full' %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-light mb-4 border">
|
||||
|
||||
<a class="navbar-brand" href="{% url 'learning_logs:index'%}">
|
||||
Learning Log</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
||||
data-target="#navbarCollapse" aria-controls="navbarCollapse"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'learning_logs:topics'%}">
|
||||
Topics</a></li>
|
||||
</ul>
|
||||
<ul class="navbar-nav ml-auto">
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<span class="navbar-text"}">Hello, {{ user.username }}.</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'users:logout' %}">Log out</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'users:register' %}">Register</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'users:login' %}">Log in</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<main role="main" class="container">
|
||||
<div class="pb-2 mb-2 border-bottom">
|
||||
{% block page_header %}{% endblock page_header %}
|
||||
</div>
|
||||
<div>
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends "learning_logs/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p><a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a></p>
|
||||
|
||||
<p>Edit entry:</p>
|
||||
|
||||
<form action="{% url 'learning_logs:edit_entry' entry.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button name="submit">Save changes</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "learning_logs/base.html" %}
|
||||
|
||||
{% block page_header %}
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-3">Track your learning.</h1>
|
||||
|
||||
<p class="lead">Make your own Learning Log, and keep a list of the
|
||||
topics you're learning about. Whenever you learn something new
|
||||
about a topic, make an entry summarizing what you've learned.</p>
|
||||
|
||||
<a class="btn btn-lg btn-primary" href="{% url 'users:register' %}"
|
||||
role="button">Register »</a>
|
||||
</div>
|
||||
{% endblock page_header %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends "learning_logs/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p><a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a></p>
|
||||
|
||||
<p>Add a new entry:</p>
|
||||
|
||||
<form action="{% url 'learning_logs:new_entry' topic.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button name="submit">Add entry</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends "learning_logs/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<p>Add a new topic:</p>
|
||||
|
||||
<form action="{% url 'learning_logs:new_topic' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button name="submit">Add topic</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,28 @@
|
||||
{% extends 'learning_logs/base.html' %}
|
||||
|
||||
{% block page_header %}
|
||||
<h3>{{ topic }}</h3>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
<a href="{% url 'learning_logs:new_entry' topic.id %}">Add new entry</a>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{% for entry in entries %}
|
||||
<div class="card mb-3">
|
||||
<h4 class="card-header">
|
||||
{{ entry.date_added|date:'M d, Y H:i' }}
|
||||
<small><a href="{% url 'learning_logs:edit_entry' entry.id %}">
|
||||
edit entry</a></small>
|
||||
</h4>
|
||||
<div class="card-body">
|
||||
{{ entry.text|linebreaks }}
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<p>There are no entries for this topic yet.</p>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends "learning_logs/base.html" %}
|
||||
|
||||
{% block page_header %}
|
||||
<h1>Topics</h1>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for topic in topics %}
|
||||
<li><h3>
|
||||
<a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a>
|
||||
</h3></li>
|
||||
{% empty %}
|
||||
<li><h3>No topics have been added yet.</h3></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h3><a href="{% url 'learning_logs:new_topic' %}">Add a new topic</a></h3>
|
||||
|
||||
{% endblock content %}
|
||||
Reference in new issue
Block a user