diff --git a/config/layouts/default.json b/config/layouts/default.json index 1c45345f18dc9dc8fab933a893f5b1af0ef60c4e..58a22e758b4aefeb7032490e516dfac727c5366a 100755 --- a/config/layouts/default.json +++ b/config/layouts/default.json @@ -24,6 +24,10 @@ { "type": "panel", "name": "mensaPlan" + }, + { + "type": "panel", + "name": "werbung" } ] } diff --git a/panels/werbung/img/reality1.png b/panels/werbung/img/reality1.png new file mode 100644 index 0000000000000000000000000000000000000000..5921e91324d5412fab044123e4d4bfecc4a695c2 Binary files /dev/null and b/panels/werbung/img/reality1.png differ diff --git a/panels/werbung/img/reality2.png b/panels/werbung/img/reality2.png new file mode 100644 index 0000000000000000000000000000000000000000..90e74c2772a316c240c2990ef5f7c6aefcd13c9f Binary files /dev/null and b/panels/werbung/img/reality2.png differ diff --git a/panels/werbung/script.js b/panels/werbung/script.js new file mode 100644 index 0000000000000000000000000000000000000000..086da00b5604727c07c736b537f13fe245d5601f --- /dev/null +++ b/panels/werbung/script.js @@ -0,0 +1,23 @@ +var lastWerbung=0; +var werbung_img = ["reality1.png", "reality2.png"]; +var werbung_img_display = null; +this.loaded=function(panel,config) { +werbung_display= $(panel).find("#werbung_display"); +} + +this.show=function() { + if (lastWerbung+1==werbung_img.length) { + lastWerbung=0; + } else { + lastWerbung += 1; + } + var img = "/panels/werbung/img/" + werbung_img[lastWerbung]; + werbung_display.attr("src", img); +} + +this.resize=function() { +} + +this.checkShowCondition=function() { + return 0; +} diff --git a/panels/werbung/style.less b/panels/werbung/style.less new file mode 100644 index 0000000000000000000000000000000000000000..ac616ecd1c739acd7ae4bcc26baa078cfe46894a --- /dev/null +++ b/panels/werbung/style.less @@ -0,0 +1,16 @@ +#werbung_container{ + height: 100%; + width: 100%; + position:relative; +} + +#werbung_display{ + height: 100%; + width: auto; + max-height: 100%; + max-width: 100%; + position: absolute; + left: 0; + right: 0; + margin: auto; +} \ No newline at end of file diff --git a/panels/werbung/template.html b/panels/werbung/template.html new file mode 100644 index 0000000000000000000000000000000000000000..aed18f893da4f43eb004035f7bf362d33373cfb1 --- /dev/null +++ b/panels/werbung/template.html @@ -0,0 +1,3 @@ +<div id="werbung_container"> + <img id="werbung_display"/> +</div>