Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.gitignore
.dockerignore
geofsdisplay_logs
docker

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
displaycontent

geofsdisplay_logs
.DS_Store
.vagrant
.vagrant
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM php:7.3-apache

# Installiere GD und Cron
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
inotify-tools \
imagemagick \
supervisor \
# Entferne die explizite --with-freetype und --with-jpeg Konfiguration
# und installiere gd direkt. Dies funktioniert oft besser bei älteren Images.
&& docker-php-ext-install gd

# Apache Rewrite aktivieren
RUN a2enmod rewrite

# imagemagick enable pdf
RUN sed -i 's|<policy domain="coder" rights="none" pattern="PDF" />|<!-- <policy domain="coder" rights="none" pattern="PDF" /> -->|' /etc/ImageMagick-6/policy.xml

# Apache root setzen & Rechte
WORKDIR /var/www/html
COPY . /var/www/html/
RUN chown -R www-data:www-data /var/www/html

# Add user to be used for the resizer.
# this is the first created user -> UID 1000 -> docker host user has access to files created by this user
RUN useradd ResizeUser

# Fehleranzeige im Container
RUN echo "display_errors=On\n" \
"display_startup_errors=On\n" \
"error_reporting=E_ALL\n" \
"log_errors=On\n" \
"error_log=/proc/self/fd/2" \
> /usr/local/etc/php/conf.d/dev.ini

# Start Apache im Vordergrund
CMD ["/usr/bin/supervisord", "-c", "supervisord.conf"]

2 changes: 1 addition & 1 deletion autoresize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ inotifywait -m -e CREATE,MOVE $watchdir --format '%f' |
elif [[ $filename =~ .+\.pdf$ ]]; then
# convert pdf to png
echo "converting '$filename' to png"
convert -density 300 -trim "$filepath" "$watchdir/$filenoext.png"
convert -density 300 "$filepath" "$watchdir/$filenoext.png"
rm -f "$filepath"

else
Expand Down
5 changes: 2 additions & 3 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ p {
}

.newstext {
padding: 5px;
padding-left: 25px;
padding: 20px;
padding-bottom: 10px;
color: black;
font-size: 12pt;
Expand All @@ -252,7 +251,7 @@ p {

/* REGENRADAR */
#regenradar {
margin-right:20px;
margin-right:0px;
}

#regenradar img {
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
geofsdisplay:
build: .
container_name: geofsdisplay
ports:
- "8080:80"
volumes:
- ./displaycontent:/var/www/html/displaycontent
- ./geofsdisplay_logs:/var/log
restart: unless-stopped
environment:
- GEOFS_BASE_PAGE=https://giv-geofs.uni-muenster.de/

Binary file added eggs/bacon/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added eggs/bacon/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions eggs/bacon/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style type="text/css">
html, body {
margin:0;
padding:0;
}
canvas {
z-index:1;
}
#seealso {
position:absolute;
padding:5px;
background:#000;
color:#fff;
bottom:0px;
left:0px;
z-index:2;
font-size:12px;
font-family:Verdana, Geneva, sans-serif;
}
#seealso a {
color:#fff;
}
</style>
</head>
<body>
<script type="text/javascript">

var images = [];
var width = [];
var height = [];
var folder = '';
var total = 1;

var canvas = document.createElement( 'canvas' );
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
canvas.style.display = 'block';
document.body.appendChild( canvas );

var context = canvas.getContext( '2d' );

var bg = document.createElement( 'img' );
bg.addEventListener('load', function() {
context.drawImage(bg , 0, 0, canvas.width, canvas.height);
}, false );
bg.src = 'bg.jpg';



var loaded = 0;


for(var i = 0; i < total; i++) {
images[i] = document.createElement( 'img' );
images[i].addEventListener('load', function() {
width[this.rel] = Math.floor( this.width / 2 );
height[this.rel] = Math.floor( this.height / 2 );

if(loaded == (total-1)) {

document.addEventListener( 'mousemove', onMouseEvent, false );
document.addEventListener( 'touchstart', onTouchEvent, false );
document.addEventListener( 'touchmove', onTouchEvent, false );
loaded = true;
} else {
loaded++;
}

}, false );
images[i].rel = i;
images[i].src = folder+(i+1)+".png";
}

var currentIndex = 0;
function onMouseEvent( event ) {
context.drawImage( images[currentIndex], event.clientX - width[currentIndex], event.clientY - height[currentIndex] );

if(currentIndex == (total-1)) currentIndex = 0;
else currentIndex++;

}

function onTouchEvent( event ) {

event.preventDefault();

for ( var i = 0; i < event.touches.length; i++ ) {

context.drawImage( images[currentIndex], event.touches[i].pageX - width[currentIndex], event.touches[i].pageY - height[currentIndex] );

if(currentIndex == (total-1)) currentIndex = 0;
else currentIndex++;

}

}

</script>

</body>
</html>

Binary file added eggs/zwiebel/1-orig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added eggs/zwiebel/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added eggs/zwiebel/bacon-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added eggs/zwiebel/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions eggs/zwiebel/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style type="text/css">
html, body {
margin:0;
padding:0;
}
canvas {
z-index:1;
}
#seealso {
position:absolute;
padding:5px;
background:#000;
color:#fff;
bottom:0px;
left:0px;
z-index:2;
font-size:12px;
font-family:Verdana, Geneva, sans-serif;
}
#seealso a {
color:#fff;
}
</style>
</head>
<body>
<script type="text/javascript">

var images = [];
var width = [];
var height = [];
var folder = '';
var total = 1;

var canvas = document.createElement( 'canvas' );
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
canvas.style.display = 'block';
document.body.appendChild( canvas );

var context = canvas.getContext( '2d' );

var bg = document.createElement( 'img' );
bg.addEventListener('load', function() {
context.drawImage(bg , 0, 0, canvas.width, canvas.height);
}, false );
bg.src = 'bg.png';



var loaded = 0;


for(var i = 0; i < total; i++) {
images[i] = document.createElement( 'img' );
images[i].addEventListener('load', function() {
width[this.rel] = Math.floor( this.width / 2 );
height[this.rel] = Math.floor( this.height / 2 );

if(loaded == (total-1)) {

document.addEventListener( 'mousemove', onMouseEvent, false );
document.addEventListener( 'touchstart', onTouchEvent, false );
document.addEventListener( 'touchmove', onTouchEvent, false );
loaded = true;
} else {
loaded++;
}

}, false );
images[i].rel = i;
images[i].src = folder+(i+1)+".png";
}

var currentIndex = 0;
function onMouseEvent( event ) {
context.drawImage( images[currentIndex], event.clientX - width[currentIndex], event.clientY - height[currentIndex] );

if(currentIndex == (total-1)) currentIndex = 0;
else currentIndex++;

}

function onTouchEvent( event ) {

event.preventDefault();

for ( var i = 0; i < event.touches.length; i++ ) {

context.drawImage( images[currentIndex], event.touches[i].pageX - width[currentIndex], event.touches[i].pageY - height[currentIndex] );

if(currentIndex == (total-1)) currentIndex = 0;
else currentIndex++;

}

}

</script>

</body>
</html>

4 changes: 2 additions & 2 deletions js/eastereggs.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ function showEasterEgg(url) {
}

function EASTERbaconandEGGs() {
showEasterEgg("https://geofs.uni-muenster.de/zeugs/bacon/");
showEasterEgg("eggs/bacon/index.htm");
}

function EASTERzwiebelandGEEK() {
showEasterEgg("https://geofs.uni-muenster.de/zeugs/zwiebel/");
showEasterEgg("eggs/zwiebel/index.htm");
}

function hockenpong() {
Expand Down
4 changes: 2 additions & 2 deletions php/GIFEncoder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: GIFEncoder Version 2.0 by L�szl� Zsidi, http://gifs.hu
:: GIFEncoder Version 2.0 by L�szl� Zsidi, http://gifs.hu
::
:: This class is a rewritten 'GifMerge.class.php' version.
::
Expand Down Expand Up @@ -47,7 +47,7 @@
:: GIFEncoder...
::
*/
function GIFEncoder (
function __construct (
$GIF_src, $GIF_dly, $GIF_lop, $GIF_dis,
$GIF_red, $GIF_grn, $GIF_blu, $GIF_mod
) {
Expand Down
4 changes: 2 additions & 2 deletions php/fahrplan.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
echo "<div id='einwaerts'>";
echo file_get_contents('https://www.stadtwerke-muenster.de/fis/ajaxrequest.php?mastnr=4599102');
echo file_get_contents('https://fis.stadtwerke-muenster.de/ajaxrequest.php?mastnr=4599102');
echo "</div><div id='auswaerts'>";
echo file_get_contents('https://www.stadtwerke-muenster.de/fis/ajaxrequest.php?mastnr=4599101');
echo file_get_contents('https://fis.stadtwerke-muenster.de/ajaxrequest.php?mastnr=4599101');
echo "</div>";
// echo "<br>";
// echo file_get_contents('http://www.stadtwerke-muenster.de/fis/ajaxrequest.php?mastnr=5202');
Expand Down
Loading