Compare commits
No commits in common. "c063e7cebc40032364dfa3363090c2de3a9d0b79" and "6c22fa70de4bddd53991adc5fafc2247450eee21" have entirely different histories.
c063e7cebc
...
6c22fa70de
5 changed files with 5 additions and 14 deletions
|
|
@ -41,7 +41,7 @@ def announce_items():
|
||||||
preview_description=description,
|
preview_description=description,
|
||||||
)
|
)
|
||||||
if getattr(settings, "TELEGRAM_ANNOUNCE_CHANNEL"):
|
if getattr(settings, "TELEGRAM_ANNOUNCE_CHANNEL"):
|
||||||
message = f'{item.title}<br><a href="{link}">{link}</a>'
|
message = f'<a href="{link}">{item.title}</a>'
|
||||||
r = telegram_rpc.send(
|
r = telegram_rpc.send(
|
||||||
message,
|
message,
|
||||||
channel=settings.TELEGRAM_ANNOUNCE_CHANNEL,
|
channel=settings.TELEGRAM_ANNOUNCE_CHANNEL,
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ def index(request):
|
||||||
return render(request, 'index.html', context)
|
return render(request, 'index.html', context)
|
||||||
|
|
||||||
|
|
||||||
def archive(request, week=None):
|
def archive(request):
|
||||||
context = default_context(request)
|
context = default_context(request)
|
||||||
qs = models.Item.public()
|
qs = models.Item.public()
|
||||||
week, archive = models.Item.public()
|
week, archive = models.Item.public()
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,3 @@ nav.overlay {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2.week {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,10 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="index">
|
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% ifchanged item.week %}
|
{% ifchanged item.week %}
|
||||||
<h2 class="week">{{ item.year }} week {{ item.week }}</h2>
|
<h2>{{ item.year }} week {{ item.week }}</h2>
|
||||||
{% endifchanged %}
|
{% endifchanged %}
|
||||||
{% include "listitem.html" with item=item %}
|
{% include "listitem.html" with item=item %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if archive %}
|
|
||||||
<div class="archive">
|
|
||||||
<a href="{{ archive }}">previous weeks</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
<title>{{ settings.SITENAME }}</title>
|
<title>{{ settings.SITENAME }}</title>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
<div class="index">
|
<div class="index">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% include "listitem.html" with item=item %}
|
{% include "listitem.html" with item=item %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue