Compare commits

..

No commits in common. "651d0de0295e7c441bd0ce17bc8567f612e27e47" and "f7f45160d6e2c2a4de0398764f7e4354b2c0d00a" have entirely different histories.

12 changed files with 104 additions and 1949 deletions

View File

@ -1,28 +1,33 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<article class="max-w-5xl mx-auto my-4 px-8"> <article>
<h3 class="text-6xl font-extrabold">{{ article.title }}</h3> <h3>{{ article.title }}</h3>
{% if article.subtitle %} {% if article.subtitle %}
<h5 class="text-4xl italic font-medium">{{ article.subtitle }}</h5> <h5>{{ article.subtitle }}</h5>
{% endif %} {% endif %}
<p class="text-sm">Added on the {{ article.created | date:'jS \o\f F, Y' }} <p>Added on the {{ article.created|date:'jS \o\f F, Y' }}
{% if article.created.date != article.updated.date %} {% if article.created.date != article.updated.date %}
and updated on the {{ article.updated | date:'jS \o\f F, Y' }} and updated on the {{ article.updated|date:'jS \o\f F, Y' }}
{% endif %} {% endif %}
</p> </p>
<hr class="my-2"> <hr>
{% if article.introduction %} {% if article.introduction %}
<p class="text-justify italic">{{ article.introduction|linebreaksbr }}</p> <p>{{ article.introduction|linebreaksbr }}</p>
<hr class="my-2"> <hr>
{% endif %} {% endif %}
<div class="prose md:prose-lg lg:prose-xl max-w-none prose-img:rounded-2xl"> <div>
{{ article.body_as_markdown|safe }} {{ article.body_as_markdown|safe }}
</div> </div>
<hr class="my-2"> <hr>
<div class="flex justify-between text-neutral-400"> <div>
<span>Posted in the <a class="hover:text-red-400" href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }}</a> category</span> <span>Posted in the <a
{# <span>{% include 'articles/includes/display_tags.html' %}</span>#} href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }}</a> category</span>
<span>
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if tag != article.tags.last %},{% endif %}
{% endfor %}
</span>
</div> </div>
</article> </article>
{% endblock %} {% endblock %}

View File

@ -4,45 +4,51 @@
<main> <main>
{% if object_list %} {% if object_list %}
{% if category %} {% if category %}
<h3 class="text-xl sm:text-4xl lg:text-6xl my-4 text-center">{{ category }} Articles</h3> <h3>{{ category }} Articles</h3>
{% if category.introduction %} {% if category.introduction %}
<div class="flex justify-center mb-4"> <div>
<p class="sm:w-1/2 lg:w-1/3 mx-8 text-justify">{{ category.introduction }}</p> <p>{{ category.introduction }}</p>
</div> </div>
{% endif %} {% endif %}
{% elif tag %} {% elif tag %}
<h3 class="text-xl sm:text-4xl lg:text-6xl my-4 text-center">Articles for tag: {{ tag }}</h3> <h3>Articles for tag: {{ tag }}</h3>
{% else %} {% else %}
<h3 class="text-xl sm:text-4xl lg:text-6xl my-4 text-center">Recent Articles</h3> <h3>Recent Articles</h3>
{% endif %} {% endif %}
<hr class="mx-8"> <hr>
<div class="grid gap-12 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 m-8"> <div>
{% for article in object_list %} {% for article in object_list %}
<div class="pb-8 break-inside-avoid-column"> <div>
<a class="text-3xl font-semibold hover:text-red-400" href="{{ article.get_absolute_url }}">{{ article.title }}</a> <a href="{{ article.get_absolute_url }}">{{ article.title }}</a>
{% if article.subtitle %} {% if article.subtitle %}
<h5 class="text-xl italic font-medium">{{ article.subtitle }}</h5> <h5>{{ article.subtitle }}</h5>
{% endif %} {% endif %}
{% if article.introduction %} {% if article.introduction %}
<hr class="my-2"> <hr>
<p class="text-justify">{{ article.introduction|linebreaksbr }}</p> <p>{{ article.introduction|linebreaksbr }}</p>
{% endif %} {% endif %}
<hr class="my-2"> <hr>
<div class="flex justify-between text-neutral-400"> <div>
<span> <span>
<a class="hover:text-red-400" href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }} </a> <a href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }} </a>
&bull; {{ article.created | date:'jS \o\f F, Y' }} &bull; {{ article.created|date:'jS \o\f F, Y' }}
</span>
<span>
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if tag != article.tags.last %},
{% endif %}
{% endfor %}
</span> </span>
<span>{% include 'articles/includes/display_tags.html' %}</span>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% else %} {% else %}
<div class="text-center m-8"> <div>
<h3 class="text-4xl mb-4">Oops!</h3> <h3>Oops!</h3>
<h5 class="text-lg">It looks like there are no articles for that {% if category %}category{% elif tag %}tag{% endif %} yet.</h5> <h5>It looks like there are no articles for that {% if category %}category{% elif tag %} tag{% endif %}
<p class="text-neutral-400">(sorry not sorry)</p> yet.</h5>
<p>(sorry not sorry)</p>
</div> </div>
{% endif %} {% endif %}
{% if page_obj.has_previous or page_obj.has_next %} {% if page_obj.has_previous or page_obj.has_next %}

View File

@ -3,15 +3,15 @@
{% block content %} {% block content %}
<main> <main>
{% if object_list %} {% if object_list %}
<h3 class="text-6xl my-4 text-center">Category List</h3> <h3>Category List</h3>
<hr class="mx-8"> <hr>
<ul class="grid gap-12 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 m-8"> <ul>
{% for category in object_list %} {% for category in object_list %}
<li> <li>
<a class="text-2xl font-semibold hover:text-red-400" href="{{ category.get_absolute_url }}">{{ category.title }}</a> <a href="{{ category.get_absolute_url }}">{{ category.title }}</a>
{% if category.introduction %} {% if category.introduction %}
<hr class="my-2"> <hr>
<p class="text-justify">{{ category.introduction }}</p> <p>{{ category.introduction }}</p>
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}

View File

@ -1,3 +0,0 @@
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if tag != article.tags.last %},{% endif %}
{% endfor %}

View File

@ -3,12 +3,12 @@
{% block content %} {% block content %}
<main> <main>
{% if object_list %} {% if object_list %}
<h3 class="text-6xl my-4 text-center">List of Tags</h3> <h3>List of Tags</h3>
<hr class="mx-8"> <hr>
<ul class="grid gap-12 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 m-8"> <ul>
{% for tag in object_list %} {% for tag in object_list %}
<li> <li>
<a class="text-2xl font-semibold hover:text-red-400" href="{{ tag.get_absolute_url }}">{{ tag }}</a> <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

File diff suppressed because it is too large Load Diff

View File

@ -6,9 +6,9 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Drulum{% endblock %}</title> <title>{% block title %}Drulum{% endblock %}</title>
<link rel="stylesheet" href="{% static 'css/base.css' %}"> {# <link rel="stylesheet" href="{% static 'css/base.css' %}">#}
</head> </head>
<body class="font-serif"> <body>
{% block page %} {% block page %}
{% block header %}{% include 'header.html' %}{% endblock %} {% block header %}{% include 'header.html' %}{% endblock %}
{% block content %}{% endblock %} {% block content %}{% endblock %}

View File

@ -2,41 +2,42 @@
{% block content %} {% block content %}
<main> <main>
<div class="max-w-3xl mx-auto my-8"> <div>
<h1 class="text-xl sm:text-4xl lg:text-6xl my-4 text-center">Oh my word, this is basic!</h1> <h1>Oh my word, this is basic!</h1>
<p class="text-justify mx-8">I got bored and decided to develop this site from scratch, again. See the <a <p>I got bored and decided to develop this site from scratch, again. See the <a
class="hover:text-red-400" href="{% url 'core:about-website' %}">About This Website</a> page if href="{% url 'core:about-website' %}">About This Website</a> page if you're at all interested in
you're at all interested in what I'm doing and why. The short version is that I'll be developing what I'm doing and why. The short version is that I'll be developing features for the website as I
features for the website as I create content for it. In other words, it's going to take a long time create content for it. In other words, it's going to take a long time before it's <em>pretty</em>.</p>
before it's <em>pretty</em>.</p> <p>Longer term this site will present my own photographs and photography tuition services along with
<p class="text-justify mx-8 mt-4">Longer term this site will present my own photographs and photography articles on photography, philosophy, politics, health & mental health, and whatever else I feel
tuition services along with articles on photography, philosophy, politics, health & mental health, and like.</p>
whatever else I feel like.</p>
</div> </div>
<hr class="mx-8"> <hr>
{% if featured_articles %} {% if featured_articles %}
<h1 class="text-xl sm:text-4xl lg:text-6xl my-4 text-center">Featured Articles</h1> <h1>Featured Articles</h1>
<hr class="mx-8"> <hr>
<div class="grid gap-12 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 m-8"> <div>
{% for article in featured_articles %} {% for article in featured_articles %}
<div class="pb-8 break-inside-avoid-column"> <div>
<a class="text-3xl font-semibold hover:text-red-400" <a href="{{ article.get_absolute_url }}">{{ article.title }}</a>
href="{{ article.get_absolute_url }}">{{ article.title }}</a>
{% if article.subtitle %} {% if article.subtitle %}
<h5 class="text-xl italic font-medium">{{ article.subtitle }}</h5> <h5>{{ article.subtitle }}</h5>
{% endif %} {% endif %}
{% if article.introduction %} {% if article.introduction %}
<hr class="my-2"> <hr>
<p class="text-justify">{{ article.introduction|linebreaksbr }}</p> <p>{{ article.introduction|linebreaksbr }}</p>
{% endif %} {% endif %}
<hr class="my-2"> <hr>
<div class="flex justify-between text-neutral-400"> <div>
<span> <span>
<a class="hover:text-red-400" <a href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }} </a>&bull; {{ article.created|date:'jS \o\f F, Y' }}
href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }} </a> </span>
&bull; {{ article.created | date:'jS \o\f F, Y' }} <span>
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if tag != article.tags.last %},
{% endif %}
{% endfor %}
</span> </span>
<span>{% include 'articles/includes/display_tags.html' %}</span>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}

View File

@ -1,8 +1,8 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<h1 class="text-xl sm:text-4xl lg:text-6xl my-4 text-center">{{ flatpage.title }}</h1> <h1>{{ flatpage.title }}</h1>
<div class="text-center mb-4"> <div>
{{ flatpage.content }} {{ flatpage.content }}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,3 +1,3 @@
<footer class="bg-blue-900 p-8 text-white font-mono"> <footer>
<p class="text-center">All content &copy; Calum Andrew Morrell</p> <p>All content &copy; Calum Andrew Morrell</p>
</footer> </footer>

View File

@ -1,32 +1,19 @@
<header class="grid grid-cols-1 md:grid-cols-[400px_1fr] md:gap-x-4 bg-blue-900 p-8 text-white"> <header>
<div class="row-span-3"> <div>
<h3 class="font-sans text-sm"><a href="{% url 'core:homepage' %}">the digital home of</a></h3> <h3><a href="{% url 'core:homepage' %}">the digital home of</a></h3>
<h1 class="text-4xl font-bold"><a href="{% url 'core:homepage' %}">Calum Andrew Morrell</a></h1> <h1><a href="{% url 'core:homepage' %}">Calum Andrew Morrell</a></h1>
{# <h2 class="font-mono">Photography · Writing · Audio · Video</h2>#}
</div> </div>
<div class="font-sans md:row-span-3 md:grid md:grid-cols-1"> <div>
<nav class="flex gap-x-4 md:justify-end"> <nav>
<a class="{% if 'about-me' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400" <a href="{% url 'core:about-me' %}">about me</a>
href="{% url 'core:about-me' %}">about me</a> <a href="{% url 'core:about-website' %}">about this website</a>
<a class="{% if 'about-website' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400" <a href="{% url 'core:contact-me' %}">contact me</a>
href="{% url 'core:about-website' %}">about this website</a>
<a class="{% if 'contact-me' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400"
href="{% url 'core:contact-me' %}">contact me</a>
</nav> </nav>
<nav class="flex gap-x-4 md:row-span-2 md:items-end text-lg"> <nav>
<a class="{% if request.path == '/' %}text-cyan-400 uppercase{% endif %} hover:text-red-400" <a href="{% url 'core:homepage' %}">Home</a>
href="{% url 'core:homepage' %}">Home</a> {# <a href="#">Photography</a>#}
<a class="{% if 'articles' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400" <a href="{% url 'articles:list' %}">Articles</a>
href="{% url 'articles:list' %}">Articles</a> {# <a href="{% url 'articles:categories' %}">Categories</a>#}
{# <a class="{% if 'photography' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400"#}
{# href="{% url 'showcase:project_list' %}">Photography</a>#}
{# <a class="{% if 'bear' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400"#}
{# href="{% url 'bear:latest' %}">A Bear Aware</a>#}
{# <a class="{% if 'websites' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400"#}
{# href="{% url 'links:list' %}">Websites</a>#}
{# <a class="{% if 'categories' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400" href="{% url 'articles:categories' %}">Categories</a>#}
{# <a class="{% if 'showcase' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400" href="#">Showcase</a>#}
{# <a class="{% if 'locations' in request.path %}text-cyan-400 uppercase{% endif %} hover:text-red-400" href="#">Locations</a>#}
</nav> </nav>
</div> </div>
</header> </header>

View File

@ -1,13 +1,12 @@
<nav> <nav>
<hr> <hr>
<ul class="flex gap-x-2 justify-center"> <ul>
{% if page_obj.has_previous %} {% if page_obj.has_previous %}
<li><a href="?page=1">&laquo; first</a></li> <li><a href="?page=1">&laquo; first</a></li>
<li><a href="?page={{ page_obj.previous_page_number }}">previous</a></li> <li><a href="?page={{ page_obj.previous_page_number }}">previous</a></li>
{% endif %} {% endif %}
{% for page in page_obj.paginator.page_range %} {% for page in page_obj.paginator.page_range %}
<li {% if page == page_obj.number %}class="font-bold text-blue-600"{% endif %}><a <li><a href="?page={{ page }}">{{ page }}</a></li>
href="?page={{ page }}">{{ page }}</a></li>
{% endfor %} {% endfor %}
{% if page_obj.has_next %} {% if page_obj.has_next %}
<li><a href="?page={{ page_obj.next_page_number }}">next</a></li> <li><a href="?page={{ page_obj.next_page_number }}">next</a></li>