From 6e8b62d8c38f6ca366f240ea45ad738ebfd62943 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 27 Jan 2020 20:37:10 -0500 Subject: abstracted breadcrumbs into seperate template --- design/templates/archives/books.html | 58 -------- design/templates/base.html | 1 + design/templates/details/book.html | 66 --------- design/templates/details/note.html | 22 ++- design/templates/details/page.html | 42 ------ design/templates/details/page.txt | 8 -- design/templates/jrnl/entry_detail.html | 240 -------------------------------- design/templates/jrnl/entry_detail.txt | 8 -- design/templates/jrnl/entry_list.html | 40 ------ design/templates/lib/breadcrumbs.html | 14 ++ design/templates/src/post_detail.html | 104 -------------- design/templates/src/post_list.html | 36 ----- design/templates/src/topic_list.html | 35 ----- 13 files changed, 36 insertions(+), 638 deletions(-) delete mode 100644 design/templates/archives/books.html delete mode 100644 design/templates/details/book.html delete mode 100644 design/templates/details/page.html delete mode 100644 design/templates/details/page.txt delete mode 100644 design/templates/jrnl/entry_detail.html delete mode 100644 design/templates/jrnl/entry_detail.txt delete mode 100644 design/templates/jrnl/entry_list.html create mode 100644 design/templates/lib/breadcrumbs.html delete mode 100644 design/templates/src/post_detail.html delete mode 100644 design/templates/src/post_list.html delete mode 100644 design/templates/src/topic_list.html (limited to 'design') diff --git a/design/templates/archives/books.html b/design/templates/archives/books.html deleted file mode 100644 index 1862563..0000000 --- a/design/templates/archives/books.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load html5_datetime %} -{% load pagination_tags %} -{% block pagetitle %} Books | luxagraf {% endblock %} -{% block metadescription %}Books I've read and thoughts on them. {% endblock %} -{%block bodyid%}class="archive" id="books-archive"{%endblock%} - -{% block primary %} - -
{% autopaginate object_list 24 %} -

Books

-
-

I wear glasses because as a child I would stay up late, covers pulled over my head, reading by the dim light of a dying flashlight. At least that's what an eye doctor told me when I was younger. Probably a load of crap, but I still love reading and I still often do it by poor light far later in the night than is reasonable.

-

I've always taken notes while reading, usually with a pen and paper, but sometimes as highlights in the Kindle. And of course since I have all this stuff in text files I thought might as well put it online. So here you have it, books I've read and things I've thought about them.

-
- -
{% for object in object_list %} -
- {% if object.image %}
cover art for {{object.title}} by {{object.author_name}}
{%endif%} -

{{object.title|amp|smartypants|widont|safe}}

- -
- {% if object.rating %}{% for i in object.ratings_range %}{% if i <= object.get_rating%}★{%else%}☆{%endif%}{%endfor%}{%endif%} - - Read in: {{object.read_date|date:"F Y"}}
-
- {% endfor %}
- -
-{% endblock %} - - - title = models.CharField(max_length=200) - author_name = models.CharField(max_length=200) - slug = models.CharField(max_length=50) - year_pub = models.CharField(max_length=4, blank=True, null=True) - read_date = models.DateTimeField() - isbn = models.CharField(max_length=100, blank=True, null=True) - body_html = models.TextField(null=True, blank=True) - url = models.CharField(max_length=200, blank=True, null=True) - tags = TaggableManager() - RATINGS = ( - ('1', "1 Star"), - ('2', "2 Stars"), - ('3', "3 Stars"), - ('4', "4 Stars"), - ('5', "5 Stars"), - ) - rating = models.CharField(max_length=1, choices=RATINGS, null=True) - enable_comments = models.BooleanField(default=False) - image = models.FileField(upload_to='book-covers/', null=True, blank=True) - diff --git a/design/templates/base.html b/design/templates/base.html index 67edd7a..2bdd7c0 100644 --- a/design/templates/base.html +++ b/design/templates/base.html @@ -41,6 +41,7 @@ + {% block breadcrumbs %}{% endblock %} {% block primary %}{% endblock %} {% block extrabody %}{% endblock %} {% block disclaimer %}{% endblock%} diff --git a/design/templates/details/book.html b/design/templates/details/book.html deleted file mode 100644 index 8a87ae5..0000000 --- a/design/templates/details/book.html +++ /dev/null @@ -1,66 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{%block bodyid%}class="detail"{%endblock%} -{% block primary %} -
-
-

{{object.title|smartypants|widont|safe}}

- - - -
-
- {{object.title}} cover -
-
- -
- {% if object.isbn %}Borrow{%endif%} - {% if object.afflink %}Buy{%endif%} -
-
{%if object.body_html%} -
-
Notes
- {{object.rating}} - - -
{{object.body_html|safe|smartypants|widont}}
-
{%endif%} - {% if object.bookhighlight_set.all %} -
-

Highlights:

- {% for object in object.bookhighlight_set.all %} -
- -
- {{object.body_html|safe|amp|smartypants}} -
-

– Page: {{object.page}} {% if object.location %}(Kindle location: {{object.location|cut:"["|cut:"]"}}){%endif%}

-
- {% endfor %} -
- {%endif%} -
-{% endblock %} -{% block disclaimer %} -
-

When you buy a book using the link above, I may earn a small affiliate commission.

-
-{% endblock %} diff --git a/design/templates/details/note.html b/design/templates/details/note.html index 583d50b..4b52537 100644 --- a/design/templates/details/note.html +++ b/design/templates/details/note.html @@ -13,7 +13,27 @@ {%endblock%} {% block bodyid %}class="notes--permalin detail" id="archive-{% if month %}{{month|month_number_to_name}}{%endif%}{{year}}"{%endblock%} - +{% block breadcrumbs %}{% endblock %} {% block primary %}