-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from stuartmaxwell/dev
Pages and Template Hierarchy
- Loading branch information
Showing
17 changed files
with
1,119 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.0.6 on 2024-06-12 11:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("djpress", "0002_rename_content_type_post_post_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="post", | ||
name="menu_order", | ||
field=models.IntegerField(default=0), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% load static %} | ||
{% load djpress_tags %} | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{% blog_page_title post_text="| " %}{% blog_title %}</title> | ||
<link rel="stylesheet" href="{% static 'djpress/css/style.css' %}"> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>{% blog_title_link %}</h1> | ||
{% blog_pages %} | ||
</header> | ||
|
||
<main> | ||
|
||
{% block main %}{% endblock main %} | ||
|
||
</main> | ||
|
||
<footer> | ||
<p>Powered by | ||
<a href="https://www.djangoproject.com/" title="The web framework for perfectionists with deadlines">Django</a> | ||
and | ||
<a href="#">DJPress</a> | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,49 @@ | ||
{% load static %} | ||
{% extends "djpress/base.html" %} | ||
{% load djpress_tags %} | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{% blog_title %}</title> | ||
<link rel="stylesheet" href="{% static 'djpress/css/style.css' %}"> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>{% blog_title_link %}</h1> | ||
{% blog_categories %} | ||
</header> | ||
|
||
<main> | ||
|
||
{% have_posts as posts %} | ||
|
||
{% category_name "h1" pre_text="View Posts in the " post_text=" Category" %} | ||
{% author_name "h1" pre_text="View Posts by " %} | ||
|
||
{% for post in posts %} | ||
|
||
<article> | ||
<header> | ||
<h1>{% post_title_link %}</h1> | ||
<p>By {% post_author_link %}. {% post_date_link %}</p> | ||
</header> | ||
<section> | ||
{% post_content %} | ||
</section> | ||
<footer> | ||
<p>Categories: {% post_categories_link "span" "badge" %}</p> | ||
</footer> | ||
</article> | ||
|
||
{% empty %} | ||
|
||
<p>No posts available.</p> | ||
|
||
{% endfor %} | ||
|
||
{% posts_nav_links %} | ||
|
||
<br><br><br> | ||
|
||
</main> | ||
|
||
<footer> | ||
<p>Powered by | ||
<a href="https://www.djangoproject.com/" title="The web framework for perfectionists with deadlines">Django</a> | ||
and | ||
<a href="#">DJPress</a> | ||
</p> | ||
</footer> | ||
</body> | ||
</html> | ||
{% block main %} | ||
|
||
{% category_name "h1" pre_text="View Posts in the " post_text=" Category" %} | ||
{% author_name "h1" pre_text="View Posts by " %} | ||
|
||
{% if post %} | ||
|
||
<article> | ||
<header> | ||
<h1>{% post_title_link %}</h1> | ||
<p>By {% post_author_link %}. {% post_date_link %}</p> | ||
</header> | ||
<section> | ||
{% post_content %} | ||
</section> | ||
<footer> | ||
<p>Categories: {% post_categories_link "span" "badge" %}</p> | ||
</footer> | ||
</article> | ||
|
||
{% else %} | ||
|
||
{% for post in posts %} | ||
|
||
<article> | ||
<header> | ||
<h1>{% post_title_link %}</h1> | ||
<p>By {% post_author_link %}. {% post_date_link %}</p> | ||
</header> | ||
<section> | ||
{% post_content %} | ||
</section> | ||
</article> | ||
|
||
{% empty %} | ||
|
||
<p>No posts available.</p> | ||
|
||
{% endfor %} | ||
|
||
{% endif %} | ||
|
||
|
||
{% posts_nav_links %} | ||
|
||
{% endblock main %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% extends "djpress/base.html" %} | ||
{% load djpress_tags %} | ||
|
||
{% block main %} | ||
|
||
<article> | ||
<header> | ||
<h1>{% post_title_link %}</h1> | ||
<p>By {% post_author_link %}. {% post_date_link %}</p> | ||
</header> | ||
<section> | ||
{% post_content %} | ||
</section> | ||
<footer> | ||
<p>Categories: {% post_categories_link "span" "badge" %}</p> | ||
</footer> | ||
</article> | ||
|
||
{% posts_nav_links %} | ||
|
||
{% endblock main %} |
Oops, something went wrong.