Compare commits

..

No commits in common. "c30f39ca2460369dc66d22dd86bfcd7dccb2365a" and "6aec5a5659785d160160b0f14b0d29d254861537" have entirely different histories.

13 changed files with 0 additions and 127 deletions

View File

@ -39,7 +39,6 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'core.apps.CoreConfig',
'articles.apps.ArticlesConfig', 'articles.apps.ArticlesConfig',
'markdownx', 'markdownx',
] ]

View File

View File

@ -1 +0,0 @@
# Register your models here.

View File

@ -1,6 +0,0 @@
from django.apps import AppConfig
class CoreConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'core'

View File

@ -1 +0,0 @@
# Create your models here.

View File

@ -1,18 +0,0 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Drulum{% endblock %}</title>
{# <link rel="stylesheet" href="{% static 'css/base.css' %}">#}
</head>
<body>
{% block page %}
{% block header %}{% include 'header.html' %}{% endblock %}
{% block content %}{% endblock %}
{% block footer %}{% include 'footer.html' %}{% endblock %}
{% endblock %}
</body>
</html>

View File

@ -1,47 +0,0 @@
{% extends 'base.html' %}
{% block content %}
<main>
<div>
<h1>Oh my word, this is basic!</h1>
<p>I got bored and decided to develop this site from scratch, again. See the <a
href="{% url 'core:about-website' %}">About This Website</a> page if you're at all interested in
what I'm doing and why. The short version is that I'll be developing features for the website as I
create content for it. In other words, it's going to take a long time before it's <em>pretty</em>.</p>
<p>Longer term this site will present my own photographs and photography tuition services along with
articles on photography, philosophy, politics, health & mental health, and whatever else I feel
like.</p>
</div>
<hr>
{% if featured_articles %}
<h1>Featured Articles</h1>
<hr>
<div>
{% for article in featured_articles %}
<div>
<a href="{{ article.get_absolute_url }}">{{ article.title }}</a>
{% if article.subtitle %}
<h5>{{ article.subtitle }}</h5>
{% endif %}
{% if article.introduction %}
<hr>
<p>{{ article.introduction|linebreaksbr }}</p>
{% endif %}
<hr>
<div>
<span>
<a href="{% url 'articles:list_category' category=article.category.slug %}">{{ article.category }} </a>&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>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</main>
{% endblock %}

View File

@ -1,3 +0,0 @@
<footer>
<p>All content &copy; Calum Andrew Morrell</p>
</footer>

View File

@ -1,19 +0,0 @@
<header>
<div>
<h3><a href="{% url 'core:homepage' %}">the digital home of</a></h3>
<h1><a href="{% url 'core:homepage' %}">Calum Andrew Morrell</a></h1>
</div>
<div>
<nav>
<a href="{% url 'core:about-me' %}">about me</a>
<a href="{% url 'core:about-website' %}">about this website</a>
<a href="{% url 'core:contact-me' %}">contact me</a>
</nav>
<nav>
<a href="{% url 'core:homepage' %}">Home</a>
{# <a href="#">Photography</a>#}
<a href="{% url 'articles:list' %}">Articles</a>
{# <a href="{% url 'articles:categories' %}">Categories</a>#}
</nav>
</div>
</header>

View File

@ -1,16 +0,0 @@
<nav>
<hr>
<ul>
{% if page_obj.has_previous %}
<li><a href="?page=1">&laquo; first</a></li>
<li><a href="?page={{ page_obj.previous_page_number }}">previous</a></li>
{% endif %}
{% for page in page_obj.paginator.page_range %}
<li><a href="?page={{ page }}">{{ page }}</a></li>
{% endfor %}
{% if page_obj.has_next %}
<li><a href="?page={{ page_obj.next_page_number }}">next</a></li>
<li><a href="?page={{ page_obj.paginator.num_pages }}">last &raquo;</a></li>
{% endif %}
</ul>
</nav>

View File

@ -1 +0,0 @@
# Create your tests here.

View File

@ -1,14 +0,0 @@
from django.views.generic import TemplateView
from articles.models import Article
class Homepage(TemplateView):
template_name = 'core/homepage.html'
def get_context_data(self, **kwargs):
context = super(Homepage, self).get_context_data()
context['featured_articles'] = Article.objects.filter(is_featured=True)
return context
# TODO: place a random website link on the homepage