diff --git a/cms/decorators.py b/cms/decorators.py
index 35fa940..62ccc59 100644
--- a/cms/decorators.py
+++ b/cms/decorators.py
@@ -1,4 +1,3 @@
-import uuid
import inspect
from django.template.loader import render_to_string
diff --git a/cms/models.py b/cms/models.py
index 344b769..a97b43b 100644
--- a/cms/models.py
+++ b/cms/models.py
@@ -190,7 +190,7 @@ class Post (models.Model, Routable):
if not self.title:
self.title = _('{name} // {date}').format(
name = self.thread.title,
- date = self.date
+ date = self.date.strftime('%d %B %Y')
)
if not self.content:
self.content = self.thread.content
diff --git a/cms/sections.py b/cms/sections.py
index 6afe65c..160be3f 100644
--- a/cms/sections.py
+++ b/cms/sections.py
@@ -530,9 +530,9 @@ class Calendar(Section):
) for day in range(1, count+1)
],
- 'month': date,
+ 'today': tz.datetime.today(),
'prev_month': date - tz.timedelta(days=10),
- 'next_month': date + tz.timedelta(days=31),
+ 'next_month': date + tz.timedelta(days=count),
})
return context
diff --git a/cms/static/aircox/cms/styles.css b/cms/static/aircox/cms/styles.css
index 98bf44e..713a090 100644
--- a/cms/static/aircox/cms/styles.css
+++ b/cms/static/aircox/cms/styles.css
@@ -80,5 +80,76 @@ main .section {
}
+/** calendar **/
+.section_calendar header {
+ border-bottom: 1px black solid;
+ width: 100%;
+}
+ .section_calendar header h3,
+ .section_calendar header a {
+ display: inline-block;
+ width: 2em;
+ padding: 0;
+ margin: 0;
+ font-size: 1em;
+ }
+
+ .section_calendar header h3 {
+ width: calc(100% - 4em);
+ text-align: center;
+ }
+
+ .section_calendar header a:last-child {
+ text-align: right;
+ }
+
+.section_calendar .content {
+ padding: 0.2em;
+ margin: 0;
+ font-size: 0.9em;
+}
+
+.section_calendar .content > * {
+ padding: 0;
+ margin: 0;
+ text-align: right;
+ display: inline-block;
+}
+
+ .section_calendar .content a {
+ width: calc(100% / 7);
+ }
+
+ .section_calendar .content a.today {
+ font-style: italic;
+ }
+
+ .section_calendar div[first_weekday] {
+ width: 0;
+ }
+
+ .section_calendar div[first_weekday="1"] {
+ width: calc(100% / 7);
+ }
+
+ .section_calendar div[first_weekday="2"] {
+ width: calc(100% / 7 * 2);
+ }
+
+ .section_calendar div[first_weekday="3"] {
+ width: calc(100% / 7 * 3);
+ }
+
+ .section_calendar div[first_weekday="4"] {
+ width: calc(100% / 7 * 4);
+ }
+
+ .section_calendar div[first_weekday="5"] {
+ width: calc(100% / 7 * 5);
+ }
+
+ .section_calendar div[first_weekday="6"] {
+ width: calc(100% / 7 * 6);
+ }
diff --git a/cms/templates/aircox/cms/calendar.html b/cms/templates/aircox/cms/calendar.html
index b080863..8f1f415 100644
--- a/cms/templates/aircox/cms/calendar.html
+++ b/cms/templates/aircox/cms/calendar.html
@@ -1,25 +1,28 @@
{% extends "aircox/cms/website.html" %}
{% block header %}
+{% spaceless %}
{{ today|date:'F Y' }}
>