From f90bb997ea1207e99531cee5f90928bd7d964b7e Mon Sep 17 00:00:00 2001 From: Christian Berg Date: Tue, 13 Sep 2016 23:11:00 +0200 Subject: [PATCH] Aktuelle Fassung der Kasu.at Homepage. Kleine kosmetische Optimierungen. --- .gitignore | 7 +- Gruntfile.js | 2 +- src/events/models.py | 8 +- .../templates/events/event_archive.html | 2 +- src/kasu/static/css/kasu.css | 3173 ++++++++++++++++- .../static/img/android-chrome-144x144.png | Bin 0 -> 12189 bytes .../static/img/android-chrome-192x192.png | Bin 0 -> 16902 bytes src/kasu/static/img/android-chrome-36x36.png | Bin 0 -> 2560 bytes src/kasu/static/img/android-chrome-48x48.png | Bin 0 -> 3570 bytes src/kasu/static/img/android-chrome-72x72.png | Bin 0 -> 5576 bytes src/kasu/static/img/android-chrome-96x96.png | Bin 0 -> 7777 bytes .../static/img/apple-touch-icon-114x114.png | Bin 0 -> 9463 bytes .../static/img/apple-touch-icon-120x120.png | Bin 0 -> 10026 bytes .../static/img/apple-touch-icon-144x144.png | Bin 0 -> 12189 bytes .../static/img/apple-touch-icon-152x152.png | Bin 0 -> 12974 bytes .../static/img/apple-touch-icon-180x180.png | Bin 0 -> 15707 bytes .../static/img/apple-touch-icon-57x57.png | Bin 0 -> 4313 bytes .../static/img/apple-touch-icon-60x60.png | Bin 0 -> 4559 bytes .../static/img/apple-touch-icon-72x72.png | Bin 0 -> 5576 bytes .../static/img/apple-touch-icon-76x76.png | Bin 0 -> 5951 bytes .../img/apple-touch-icon-precomposed.png | Bin 0 -> 15707 bytes src/kasu/static/img/apple-touch-icon.png | Bin 0 -> 15707 bytes src/kasu/static/img/favicon-16x16.png | Bin 0 -> 1351 bytes src/kasu/static/img/favicon-32x32.png | Bin 0 -> 2224 bytes src/kasu/static/img/favicon-96x96.png | Bin 0 -> 7777 bytes src/kasu/static/img/mstile-144x144.png | Bin 0 -> 12189 bytes src/kasu/static/img/mstile-150x150.png | Bin 0 -> 11475 bytes src/kasu/static/img/mstile-310x150.png | Bin 0 -> 12251 bytes src/kasu/static/img/mstile-310x310.png | Bin 0 -> 27017 bytes src/kasu/static/img/mstile-70x70.png | Bin 0 -> 7880 bytes src/kasu/static/img/safari-pinned-tab.svg | 35 + src/kasu/static/less/common.less | 5 +- src/kasu/static/less/desktop.less | 8 +- src/kasu/static/less/header_nav.less | 3 +- src/kasu/static/less/mobile.less | 6 +- src/kasu/templates/base.html | 23 +- src/kasu/templates/index.html | 4 +- src/kasu/templates/manifest.json | 46 + src/kasu/urls.py | 1 + .../mahjong_ranking/seasonranking_list.html | 2 +- 40 files changed, 3291 insertions(+), 34 deletions(-) create mode 100644 src/kasu/static/img/android-chrome-144x144.png create mode 100644 src/kasu/static/img/android-chrome-192x192.png create mode 100644 src/kasu/static/img/android-chrome-36x36.png create mode 100644 src/kasu/static/img/android-chrome-48x48.png create mode 100644 src/kasu/static/img/android-chrome-72x72.png create mode 100644 src/kasu/static/img/android-chrome-96x96.png create mode 100644 src/kasu/static/img/apple-touch-icon-114x114.png create mode 100644 src/kasu/static/img/apple-touch-icon-120x120.png create mode 100644 src/kasu/static/img/apple-touch-icon-144x144.png create mode 100644 src/kasu/static/img/apple-touch-icon-152x152.png create mode 100644 src/kasu/static/img/apple-touch-icon-180x180.png create mode 100644 src/kasu/static/img/apple-touch-icon-57x57.png create mode 100644 src/kasu/static/img/apple-touch-icon-60x60.png create mode 100644 src/kasu/static/img/apple-touch-icon-72x72.png create mode 100644 src/kasu/static/img/apple-touch-icon-76x76.png create mode 100644 src/kasu/static/img/apple-touch-icon-precomposed.png create mode 100644 src/kasu/static/img/apple-touch-icon.png create mode 100644 src/kasu/static/img/favicon-16x16.png create mode 100644 src/kasu/static/img/favicon-32x32.png create mode 100644 src/kasu/static/img/favicon-96x96.png create mode 100644 src/kasu/static/img/mstile-144x144.png create mode 100644 src/kasu/static/img/mstile-150x150.png create mode 100644 src/kasu/static/img/mstile-310x150.png create mode 100644 src/kasu/static/img/mstile-310x310.png create mode 100644 src/kasu/static/img/mstile-70x70.png create mode 100644 src/kasu/static/img/safari-pinned-tab.svg create mode 100644 src/kasu/templates/manifest.json diff --git a/.gitignore b/.gitignore index b358153..f29c400 100644 --- a/.gitignore +++ b/.gitignore @@ -66,8 +66,5 @@ target/ /node_modules/ /static/ /templates/ -.idea/ -.gitignore -.project -.pydevproject -.settings/ +.[a-zA-Z]* +/src/kasu/settings/production.py diff --git a/Gruntfile.js b/Gruntfile.js index cf5c44c..55ce42a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,7 @@ module.exports = function(grunt) { }, kasu: { src: 'src/kasu/static/less/kasu.less', - dest: 'static/css/kasu.css', + dest: 'src/kasu/static/css/kasu.css', } }, more_css: { diff --git a/src/events/models.py b/src/events/models.py index 2958f30..3ca2f93 100644 --- a/src/events/models.py +++ b/src/events/models.py @@ -3,6 +3,7 @@ import os from django.conf import settings from django.core.urlresolvers import reverse +from django.core.exceptions import ValidationError from django.db import models from django.db.models import Q from django.template.defaultfilters import slugify @@ -10,7 +11,6 @@ from django.utils.timezone import now from django.utils.translation import ugettext as _ from ckeditor.fields import RichTextField from easy_thumbnails.fields import ThumbnailerImageField - from utils import COUNTRIES, OverwriteStorage @@ -125,6 +125,12 @@ class Event(models.Model): except: return "New Event Model" + def clean(self): + if self.end < self.start: + raise ValidationError({ + 'end': _("A event can't end before it had started") + }) + def get_absolute_url(self): kwargs = { 'pk': self.id, diff --git a/src/events/templates/events/event_archive.html b/src/events/templates/events/event_archive.html index 706dfcd..2e02e83 100644 --- a/src/events/templates/events/event_archive.html +++ b/src/events/templates/events/event_archive.html @@ -52,7 +52,7 @@ {% endif %}

-

{{event.description|truncatewords_html:20}}

+

{{event.description|truncatewords_html:20|safe}}