port to new django, AI automated

This commit is contained in:
2026-03-30 22:35:36 +02:00
parent e2d166e437
commit 372da3caa9
215 changed files with 9283 additions and 2981 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,228 @@
////////////////////////////////////////////////////////////////////////
// SnowFlakes-Script (c) 2011, Dominik Scholz / go4u.de Webdesign
////////////////////////////////////////////////////////////////////////
var snowflakes = {
///////////////////////////// configuration ////////////////////////////
// amout of flakes
_amount: 70,
// random colors
_color: ['#AAAACC', '#DDDDFF', '#CCCCDD', '#F3F3F3', '#F0FFFF'],
// random fonts
_type: ['Arial Black', 'Arial Narrow', 'Times', 'Comic Sans MS'],
// char used for flake
_flakeChar: '*',
// speed of flakes
_speed: .2,
// minimum flake font size
_minSize: 8,
// maximum flake font size
_maxSize: 22,
// horizontal drift
_drift: 15,
// zIndex of flakes
_zIndex: 20000,
///////////////////////////// private vars /////////////////////////////
_flakes: [],
_bodyWidth: 0,
_bodyHeight: 0,
_range: null,
_count: 0,
_timeout: 20,
_lastInterval: 0,
_eventHandlerResize: window.onresize,
_eventHandlerLoad: window.onload,
////////////////////////////// functions ///////////////////////////////
// start snow
start: function()
{
if (this._eventHandlerLoad != null) this._eventHandlerLoad();
// calculate range
this._range = this._maxSize - this._minSize;
// init window size
this._windowSize();
// add new flakes
while (this._amount > this._flakes.length)
this._createFlake(this._flakes.length);
// start to move snow
this._lastInterval = this._time();
window.setInterval(function() { snowflakes._move(); }, this._timeout);
},
// get current time
_time: function()
{
return +new Date();
},
// return a random number bewtween 0 and range
_random: function(range)
{
return Math.floor(Math.random() * range);
},
// creates a new snowflake
_createFlake: function(i)
{
// select body tag
var insertBody = document.getElementsByTagName('body')[0];
// create span child for flake
var f = document.createElement('div');
f.id = 'flake' + i;
f.style.position = 'absolute';
f.style.left = '0px';
f.style.top = '-' + this._maxSize + 'px';
f.style.color = this._color[this._random(this._color.length - 1)];
f.style.family = this._type[this._random(this._type.length - 1)];
f.style.fontSize = (this._random(this._range) + this._minSize) + 'px';
f.style.zIndex = this._zIndex;
f.innerHTML = this._flakeChar;
insertBody.appendChild(f);
// create array element
this._flakes[i] = {
x: this._random(this._bodyWidth - this._drift - this._maxSize - 3) + this._drift + 1,
y: -this._maxSize - this._random(this._bodyHeight),
size: this._random(this._range) + this._minSize,
count: this._random(10000)
};
},
// restart an existing snow flake
_restartFlake: function(i)
{
this._flakes[i] = {
x: this._random(this._bodyWidth - this._drift - this._maxSize - 3) + this._drift + 1,
y: -this._maxSize,
size: this._random(this._range) + this._minSize,
count: this._random(10000)
};
},
// move existing flakes
_move: function()
{
// calculate movement factor
var dif = this._time() - this._lastInterval;
this._lastInterval = this._time();
var f = dif * this._speed;
this._count += f / 80;
for (var i = 0; i < this._flakes.length; i++)
{
var flake = this._flakes[i];
flake.y += f * this._speed * this._maxSize / flake.size;
// restart existing flake
if (flake.y + flake.size >= this._bodyHeight)
{
this._restartFlake(i);
continue;
}
var flakeDiv = document.getElementById('flake' + i);
flakeDiv.style.left = Math.floor(flake.x + Math.sin(flake.count + this._count) * this._drift) + 'px';
flakeDiv.style.top = Math.floor(flake.y) + 'px';
}
},
// calculate new positions for all flakes
_windowSize: function()
{
// save old width
var oldWidth = this._bodyWidth;
// get new width and height
this._bodyWidth = this._getWindowWidth() - this._maxSize;
this._bodyHeight = this._getWindowHeight() - this._maxSize;
// calculate correction ratio
var ratio = this._bodyWidth / oldWidth;
// for all flakes
for (var i = 0; i < this._flakes.length; i++)
{
var flake = this._flakes[i];
// do width correction
flake.x *= ratio;
// restart existing flake
if ((flake.y + flake.size) >= this._bodyHeight)
this._restartFlake(i);
}
},
// get window width
_getWindowWidth: function()
{
var w = Math.max(self.innerWidth || 0, window.innerWidth || 0);
if (document.documentElement)
w = Math.max(w, document.documentElement.clientWidth || 0);
if (document.body)
{
w = Math.max(w, document.body.clientWidth || 0);
w = Math.max(w, document.body.scrollWidth || 0);
w = Math.max(w, document.body.offsetWidth || 0);
}
return w;
},
// get window height
_getWindowHeight: function()
{
var h = Math.max(self.innerHeight || 0, window.innerHeight || 0);
if (document.documentElement)
h = Math.max(h, document.documentElement.clientHeight || 0);
if (document.body)
{
h = Math.max(h, document.body.clientHeight || 0);
h = Math.max(h, document.body.scrollHeight || 0);
h = Math.max(h, document.body.offsetHeight || 0);
}
return h;
},
// handle resize event
resize: function()
{
if (this._eventHandlerResize != null)
this._eventHandlerResize();
this._windowSize();
}
};
// register window resize event
window.onresize = function() { snowflakes.resize(); }
window.onload = function() { snowflakes.start(); }

View File

@@ -1,72 +1,65 @@
{% load sekizai_tags staticfiles %}
{% load sekizai_tags static %}
{% include "bootstrapTheme/bootstrapTheme.html" %}
<!DOCTYPE html>
<html>
<head>
<title>Blechreiz</title>
<title>Blechreiz</title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.ico' %}"/>
{% render_block "css" %}
{% render_block "js" %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% render_block "css" %}
</head>
<body class="pull_top">
<!-- Menu -->
<div class="{% block navbar_options %}navbar navbar-inverse navbar-static-top {% endblock %}">
<div class="navbar-inner">
<div class="container">
{% if not request.device.android %}
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
{% endif %}
<a class="brand" href="/">
<img alt="Blechreiz" src="{{STATIC_URL}}img/blechreiz_logo.png">
</a>
<div {% if not request.device.android %}class="nav-collapse collapse"{% endif %}>
<ul class="nav pull-right">
{% block menu_contents %}
<li><a href="/">HOME</a></li>
<li><a href="/events"> Termine</a></li>
<li><a href="/messages">Forum</a></li>
<li><a href="/musicians">Adressbuch</a></li>
<!-- <li><a href="/scores"> Noten</a></li> -->
{% endblock %}
{% if user.is_authenticated %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{user.username|capfirst}}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/musicians/profile">Eigenes Profil</a></li>
<li><a href="/eventplanner_gcal/manage">Google Kalender</a></li>
<li><a href="/musicians/changePassword">Passwort ändern</a> </li>
<li><a href="/musicians/logout">Logout</a></li>
</ul>
</li>
{% endif %}
</ul>
<!-- Menu -->
<div class="{% block navbar_options %}navbar navbar-inverse navbar-static-top {% endblock %}">
<div class="navbar-inner">
<div class="container">
{% if not request.device.android %}
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
{% endif %}
<a class="brand" href="/">
<img alt="Blechreiz" src="{% static 'img/blechreiz_logo.png' %}">
</a>
<div {% if not request.device.android %}class="nav-collapse collapse"{% endif %}>
<ul class="nav pull-right">
{% block menu_contents %}
<li><a href="/">HOME</a></li>
<li><a href="/events/">Termine</a></li>
<li><a href="/messages/">Forum</a></li>
<li><a href="/musicians/">Adressbuch</a></li>
<!-- <li><a href="/scores/">Noten</a></li> -->
{% endblock %}
{% if user.is_authenticated %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{ user.username|capfirst }}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/musicians/profile/">Eigenes Profil</a></li>
<li><a href="/eventplanner_gcal/manage/">Google Kalender</a></li>
<li><a href="/musicians/changePassword/">Passwort ändern</a></li>
<li><a href="/musicians/logout/">Logout</a></li>
</ul>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- End Menu -->
<!-- End Menu -->
{% block content %} {% endblock %}
{% block content %}{% endblock %}
<!-- footer -->
<footer id="footer">
@@ -75,24 +68,15 @@
<div class="span12">
<div class="row copyright">
<div class="span12">
© 2018 Blechreiz, Martin Bauer
© 2014 Blechreiz, Martin Bauer
</div>
</div>
</div>
</div>
</div>
</div>
</footer>
{% render_block "js" %}
</body>
</html>

View File

@@ -1,14 +1,8 @@
{% extends "website/base.html" %}
{% load sekizai_tags staticfiles %}
{% block navbar_options %} navbar transparent navbar-inverse navbar-fixed-top {% endblock %}
{% load sekizai_tags static %}
{% block navbar_options %} navbar transparent navbar-inverse navbar-fixed-top {% endblock %}
{% block content %}
{% include "website/slider_intern_area.html" %}
{% include "eventplanner/countdown.inc.html" %}
{% include "eventplanner/routeToEventMap.inc.html" %}
{% include "website/slider_intern_area.html" %}
{% include "eventplanner/countdown.inc.html" %}
{% include "eventplanner/routeToEventMap.inc.html" %}
{% endblock %}

View File

@@ -1,32 +1,121 @@
{% addtoblock "css" strip %} <link id="base-style" href="{{STATIC_URL}}css/perfectum-style.css" rel="stylesheet"> {% endaddtoblock %}
{% addtoblock "css" strip %} <link id="base-style-responsive" href="{{STATIC_URL}}css/perfectum-style-responsive.css" rel="stylesheet"> {% endaddtoblock %}
{% load sekizai_tags static %}
{% addtoblock "css" strip %}
<link
id="base-style"
href="{{STATIC_URL}}/css/perfectum-style.css"
rel="stylesheet"
/>
{% endaddtoblock %} {% addtoblock "css" strip %}
<link
id="base-style-responsive"
href="{{STATIC_URL}}/css/perfectum-style-responsive.css"
rel="stylesheet"
/>
{% endaddtoblock %}
<div class="span2 main-menu-span">
<div class="nav-collapse sidebar-nav">
<ul class="nav nav-tabs nav-stacked main-menu">
<li><a href="index.html"><i class="icon-home icon-white"></i><span class="hidden-tablet"> Dashboard</span></a></li>
<li><a href="ui.html"><i class="icon-eye-open icon-white"></i><span class="hidden-tablet"> UI Features</span></a></li>
<li><a href="form.html"><i class="icon-edit icon-white"></i><span class="hidden-tablet"> Forms</span></a></li>
<li><a href="chart.html"><i class="icon-list-alt icon-white"></i><span class="hidden-tablet"> Charts</span></a></li>
<li>
<a class="dropmenu" href="#"><i class="fa-icon-folder-close-alt"></i><span class="hidden-tablet"> Dropdown</span></a>
<ul>
<li><a class="submenu" href="submenu.html"><i class="fa-icon-file-alt"></i><span class="hidden-tablet"> Sub Menu 1</span></a></li>
<li><a class="submenu" href="submenu.html"><i class="fa-icon-file-alt"></i><span class="hidden-tablet"> Sub Menu 2</span></a></li>
<li><a class="submenu" href="submenu.html"><i class="fa-icon-file-alt"></i><span class="hidden-tablet"> Sub Menu 3</span></a></li>
</ul>
</li>
<li><a href="typography.html"><i class="icon-font icon-white"></i><span class="hidden-tablet"> Typography</span></a></li>
<li><a href="gallery.html"><i class="icon-picture icon-white"></i><span class="hidden-tablet"> Gallery</span></a></li>
<li><a href="table.html"><i class="icon-align-justify icon-white"></i><span class="hidden-tablet"> Tables</span></a></li>
<li><a href="calendar.html"><i class="icon-calendar icon-white"></i><span class="hidden-tablet"> Calendar</span></a></li>
<li><a href="grid.html"><i class="icon-th icon-white"></i><span class="hidden-tablet"> Grid</span></a></li>
<li><a href="file-manager.html"><i class="icon-folder-open icon-white"></i><span class="hidden-tablet"> File Manager</span></a></li>
<li><a href="icon.html"><i class="icon-star icon-white"></i><span class="hidden-tablet"> Icons</span></a></li>
<li><a href="login.html"><i class="icon-lock icon-white"></i><span class="hidden-tablet"> Login Page</span></a></li>
</ul>
</div><!--/.well -->
</div><!--/span-->
<div class="nav-collapse sidebar-nav">
<ul class="nav nav-tabs nav-stacked main-menu">
<li>
<a href="index.html"
><i class="icon-home icon-white"></i
><span class="hidden-tablet"> Dashboard</span></a
>
</li>
<li>
<a href="ui.html"
><i class="icon-eye-open icon-white"></i
><span class="hidden-tablet"> UI Features</span></a
>
</li>
<li>
<a href="form.html"
><i class="icon-edit icon-white"></i
><span class="hidden-tablet"> Forms</span></a
>
</li>
<li>
<a href="chart.html"
><i class="icon-list-alt icon-white"></i
><span class="hidden-tablet"> Charts</span></a
>
</li>
<li>
<a class="dropmenu" href="#"
><i class="fa-icon-folder-close-alt"></i
><span class="hidden-tablet"> Dropdown</span></a
>
<ul>
<li>
<a class="submenu" href="submenu.html"
><i class="fa-icon-file-alt"></i
><span class="hidden-tablet"> Sub Menu 1</span></a
>
</li>
<li>
<a class="submenu" href="submenu.html"
><i class="fa-icon-file-alt"></i
><span class="hidden-tablet"> Sub Menu 2</span></a
>
</li>
<li>
<a class="submenu" href="submenu.html"
><i class="fa-icon-file-alt"></i
><span class="hidden-tablet"> Sub Menu 3</span></a
>
</li>
</ul>
</li>
<li>
<a href="typography.html"
><i class="icon-font icon-white"></i
><span class="hidden-tablet"> Typography</span></a
>
</li>
<li>
<a href="gallery.html"
><i class="icon-picture icon-white"></i
><span class="hidden-tablet"> Gallery</span></a
>
</li>
<li>
<a href="table.html"
><i class="icon-align-justify icon-white"></i
><span class="hidden-tablet"> Tables</span></a
>
</li>
<li>
<a href="calendar.html"
><i class="icon-calendar icon-white"></i
><span class="hidden-tablet"> Calendar</span></a
>
</li>
<li>
<a href="grid.html"
><i class="icon-th icon-white"></i
><span class="hidden-tablet"> Grid</span></a
>
</li>
<li>
<a href="file-manager.html"
><i class="icon-folder-open icon-white"></i
><span class="hidden-tablet"> File Manager</span></a
>
</li>
<li>
<a href="icon.html"
><i class="icon-star icon-white"></i
><span class="hidden-tablet"> Icons</span></a
>
</li>
<li>
<a href="login.html"
><i class="icon-lock icon-white"></i
><span class="hidden-tablet"> Login Page</span></a
>
</li>
</ul>
</div>
<!--/.well -->
</div>
<!--/span-->

View File

@@ -1,125 +1,118 @@
{% load sekizai_tags staticfiles %}
{% comment %}
Displays a slider linking to
/events
/messages
/addressbook
Requires context "hasParticipationSetForAllEvents"
to diplay if a user has finished the event planning
{% endcomment %}
{% addtoblock "css" %}
{% load sekizai_tags static %} {% comment %} Displays a slider linking to
/events /messages /addressbook Requires context
"hasParticipationSetForAllEvents" to diplay if a user has finished the event
planning {% endcomment %} {% addtoblock "css" %}
<style>
.slide .info {
position: absolute;
top: 260px;
left: 8%;
width: 24%;
display: none;
z-index: 10;
}
.slide .info a {
text-transform: uppercase;
color: rgb(255, 255, 255);
background: none repeat scroll 0% 0% rgb(166, 3, 3);
font-size: 25px;
font-weight: bolder;
padding: 15px 24px;
border: 0px none;
border-radius: 6px 6px 6px 6px;
transition:
background 0.2s linear 0s,
box-shadow 0.2s linear 0s;
}
.slide .info .subtitle {
margin: 25px;
font-size: 20px;
font-style: italic;
}
.slide .info .subtitlebg {
background: none repeat scroll 0% 0% rgb(243, 243, 243);
padding: 10px;
padding-top: 20px;
padding-bottom: 20px;
border-radius: 8px;
}
.slide .info {
position: absolute;
top: 260px;
left: 8%;
width: 24%;
display: none;
z-index: 10;
}
.slide .info a {
text-transform: uppercase;
color: rgb(255, 255, 255);
background: none repeat scroll 0% 0% rgb(166, 3, 3);
font-size: 25px;
font-weight: bolder;
padding: 15px 24px;
border: 0px none;
border-radius: 6px 6px 6px 6px;
transition: background 0.2s linear 0s, box-shadow 0.2s linear 0s;
}
.slide .info .subtitle {
margin: 25px;
font-size: 20px;
font-style: italic;
}
.slide .info .subtitlebg
{
background: none repeat scroll 0% 0% rgb(243, 243, 243);
padding: 10px;
padding-top: 20px;
padding-bottom: 20px;
border-radius: 8px;
}
@media (max-width: 979px) {
.slide .info a {
font-size: 22px;
}
.slide .info .subtitle {
font-size: 16px;
}
.slide .info .subtitlebg {
font-size: 16px;
}
}
@media (max-width: 979px) {
.slide .info a {
font-size: 22px;
}
.slide .info .subtitle {
font-size: 16px;
}
.slide .info .subtitlebg {
font-size: 16px;
}
}
</style>
{% endaddtoblock %}
<section id="feature_slider" class="">
<article
class="slide"
id="slide_news"
style="background: url('{{STATIC_URL}}/img/slides/aqua.jpg') repeat-x top center;"
>
<img
class="asset left-30 sp600 t150 z1"
src="{{STATIC_URL}}/img/google_cal.png"
/>
<div class="info">
<a href="/eventplanner_gcal/manage">GoogleCalendar</a>
<div class="subtitle subtitlebg">
Jetzt auch auf dem Handy im Google Kalender Termine planen
</div>
</div>
</article>
<article class="slide" id="slide_news" style="background: url('{{STATIC_URL}}img/slides/aqua.jpg') repeat-x top center;">
<article
class="slide"
id="slide_eventManagement"
style="background: url('{{STATIC_URL}}/img/slides/andi2.jpg') repeat-x top center;"
>
<div class="info">
<a href="/events">Einsatzplanung</a>
<img class="asset left-30 sp600 t150 z1" src="{{STATIC_URL}}img/google_cal.png" />
<div class="info">
<a href="/eventplanner_gcal/manage">GoogleCalendar</a>
<div class="subtitle subtitlebg">Jetzt auch auf dem Handy im Google Kalender Termine planen</div>
</div>
<div class="subtitle subtitlebg">
{% if hasParticipationSetForAllEvents %} Sehr gut - du hast dich
für alles eingetragen {% else %} Du hast dich noch nicht für
alle Termine eingetragen!! {% endif %}
</div>
</div>
</article>
</article>
<article class="slide" id="slide_eventManagement"
style="background: url('{{STATIC_URL}}img/slides/andi2.jpg') repeat-x top center;">
<div class="info">
<a href="/events">Einsatzplanung</a>
<div class="subtitle subtitlebg">
{% if hasParticipationSetForAllEvents %}
Sehr gut - du hast dich für alles eingetragen
{% else %}
Du hast dich noch nicht für alle Termine eingetragen!!
{% endif %}
</div>
</div>
</article>
<article class="slide" id="slide_messages" style="background: url('{{STATIC_URL}}img/backgrounds/silver.jpg') repeat-x top center;">
<img class="asset left-30 sp600 t120 z1" src="{{STATIC_URL}}img/slides/gruppe.png" />
<div class="info">
<a href="/messages">Forum</a>
<div class="subtitle">Nachricht an alle schreiben...</div>
</div>
</article>
<article class="slide" id="adressbook"
style="background: url('{{STATIC_URL}}img/slides/spielen2.jpg') repeat-x top center;">
<div class="info">
<a href="/musicians">Adressbuch</a>
<div class="subtitle subtitlebg">Geburtstage, Telefonnummern, ...</div>
</div>
</article>
<article
class="slide"
id="slide_messages"
style="background: url('{{STATIC_URL}}/img/backgrounds/silver.jpg') repeat-x top center;"
>
<img
class="asset left-30 sp600 t120 z1"
src="{{STATIC_URL}}/img/slides/gruppe.png"
/>
<div class="info">
<a href="/messages">Forum</a>
<div class="subtitle">Nachricht an alle schreiben...</div>
</div>
</article>
<article
class="slide"
id="adressbook"
style="background: url('{{STATIC_URL}}/img/slides/spielen2.jpg') repeat-x top center;"
>
<div class="info">
<a href="/musicians">Adressbuch</a>
<div class="subtitle subtitlebg">
Geburtstage, Telefonnummern, ...
</div>
</div>
</article>
</section>

View File

@@ -1,7 +1,9 @@
from django.conf.urls import url
from django.urls import path
from website.views import home_view
from . import views
app_name = "website"
urlpatterns = [
url(r'$^', home_view),
path("", views.home_view, name="home"),
]

View File

@@ -1,21 +1,24 @@
from django.shortcuts import render
from django.conf import settings
from django.contrib.auth.decorators import login_required
from eventplanner.snippets import addEventCountdownForNextEventToContext, addEventRouteForNextEventToContext
from django.shortcuts import render
from eventplanner.models import EventParticipation
from eventplanner.snippets import (
addEventCountdownForNextEventToContext,
addEventRouteForNextEventToContext,
)
@login_required
def home_view(request):
context = dict()
context = {}
# Event participation for slider text
if EventParticipation.isMember(request.user):
context['hasParticipationSetForAllEvents'] = EventParticipation.hasUserSetParticipationForAllEvents(
request.user)
context["hasParticipationSetForAllEvents"] = (
EventParticipation.hasUserSetParticipationForAllEvents(request.user)
)
addEventCountdownForNextEventToContext(context, request.user)
addEventRouteForNextEventToContext(context, request.user, 'Conc')
addEventRouteForNextEventToContext(context, request.user, "Conc")
context['GOOGLE_MAPS_API_KEY'] = settings.GOOGLE_MAPS_API_KEY
return render(request, 'website/mainpage.html', context)
return render(request, "website/mainpage.html", context)