Preview
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{% load static %}
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Django Girls blog - Build %%%BUILDTAG%%%</title>
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
|
||||
<link href='//fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page-header">
|
||||
<div class="top-menu" style="float:right">
|
||||
{% if user.is_authenticated %}
|
||||
<h3> {{ request.user }} | <a href="/admin/logout?next=/">Log out</a> </h3>
|
||||
{% else %}
|
||||
<h3> <a href="/admin/login/?next=/">Log in</a> </h3>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'post_new' %}" class="top-menu"><span class="glyphicon glyphicon-plus"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1><a href="/">Django Girls Blog</a></h1>
|
||||
</div>
|
||||
<div class="content container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends 'blog/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="post">
|
||||
{% if post.published_date %}
|
||||
<div class="date">
|
||||
{{ post.published_date }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
{% endif %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
<p>{{ post.text|linebreaksbr }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4><a href="/">Back</a></h4>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends 'blog/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>New post</h1>
|
||||
<form method="POST" class="post-form">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="save btn btn-default">Save</button>
|
||||
</form>
|
||||
<div>
|
||||
<h4><a href="/">Back</a></h4>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends 'blog/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
<div class="post">
|
||||
<div class="date">
|
||||
{{ post.published_date }}
|
||||
</div>
|
||||
<h1><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h1>
|
||||
<p>{{ post.text|linebreaksbr }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user