Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
design:snippets [19.09.2015 14:14] – angelegt Manuela v.d.Decken | design:snippets [21.09.2015 12:13] (aktuell) – Manuela v.d.Decken | ||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
~~FAQ~~ | ~~FAQ~~ | ||
+ | =?=== Verschiedenes ===== | ||
+ | |||
??? Hinweis auf die Benutzung von Cookies? | ??? Hinweis auf die Benutzung von Cookies? | ||
- | Wie baue ich einen Button | + | Damit meine Seite rechtssicher (nach der EU-Cookie-Richtlinie) wird, möchte |
- | What if I want to put some text after the block and that text doesn't | + | !!! Hierfür sind mehrere Schritte/ |
- | belong to the answer? | + | Zuallererst wird natürlich der Button sowie eine entsprechende Meldung benötigt. Dieser wird ganz unten in der // |
- | !!! Put triple question mark at the start of a line. | + | < |
- | =?=== Installation | + | <!-- |
- | ??? How to migrate from WebsiteBaker 2.9.x? | + | |
- | !!! The upgrade scenarios from an existing WebsiteBaker version to a newer one is explained in more detail here. | + | |
+ | | ||
+ | | ||
+ | | ||
+ | --> | ||
+ | <div id=" | ||
+ | < | ||
+ | <span id=" | ||
+ | <span id=" | ||
+ | </ | ||
+ | </ | ||
+ | <script charset=" | ||
+ | </ | ||
+ | Da hier ein JScript aufgerufen wird, sollte man das natürlich auch noch in den /js/ Ordner des Templates packen. | ||
+ | <file java CookieNotice.min.js> | ||
+ | /** CookieNotice.min.js | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | Gut, das ist jetzt natürlich hervorragend lesbar. Deshalb hier der Code noch einmal, jedoch in Klartext: | ||
+ | <file java CookieNotice.js> | ||
+ | /* | ||
+ | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
+ | * | ||
+ | * This program is free software: you can redistribute it and/or modify | ||
+ | * it under the terms of the GNU General Public License as published by | ||
+ | * the Free Software Foundation, either version 3 of the License, or | ||
+ | * (at your option) any later version. | ||
+ | * | ||
+ | * This program is distributed in the hope that it will be useful, | ||
+ | * but WITHOUT ANY WARRANTY; without even the implied warranty | ||
+ | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
+ | * GNU General Public License for more details. | ||
+ | * | ||
+ | * You should have received | ||
+ | * along with this program. | ||
+ | */ | ||
+ | /** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
+ | * | ||
+ | * CookieNotice.js | ||
+ | * | ||
+ | * @category | ||
+ | * @copyright | ||
+ | * @author | ||
+ | * @license | ||
+ | * @version | ||
+ | * @lastmodified 19.09.2015 | ||
+ | * @since | ||
+ | * @description | ||
+ | (by default after 7 days the cookie will be removed again) | ||
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | ||
+ | |||
+ | function CookieNotice(NoticeAreaId) { | ||
+ | |||
+ | var CookieLifetime | ||
+ | var thisObject | ||
+ | this.Box | ||
+ | |||
+ | this.hideNotice | ||
+ | e = e || window.event; | ||
+ | var target | ||
+ | if (target.id | ||
+ | thisObject.Box.style.display | ||
+ | thisObject.setCookie(" | ||
+ | if (e.stopPropagation) { | ||
+ | e.stopPropagation(); | ||
+ | } else { | ||
+ | e.cancelBubble = true; | ||
+ | } | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | this.setCookie = function(cname, | ||
+ | var d = new Date(); | ||
+ | d.setTime(d.getTime() + (exdays*86400000)); | ||
+ | var expires = " | ||
+ | document.cookie = cname+" | ||
+ | }; | ||
+ | |||
+ | this.getCookie = function(cname) { | ||
+ | var name = cname + " | ||
+ | var ca = document.cookie.split(';' | ||
+ | for(var i=0; i< | ||
+ | var c = ca[i]; | ||
+ | while (c.charAt(0)==' | ||
+ | if (c.indexOf(name) === 0) { | ||
+ | return c.substring(name.length, | ||
+ | } | ||
+ | } | ||
+ | return ""; | ||
+ | }; | ||
+ | |||
+ | this.start = function() { | ||
+ | var value = thisObject.getCookie(' | ||
+ | if (value != ' | ||
+ | thisObject.Box.style.display = ' | ||
+ | } | ||
+ | }; | ||
+ | this.Box.onclick = thisObject.hideNotice; | ||
+ | this.start(); | ||
+ | } | ||
+ | / | ||
+ | show the cookie notice if needed | ||
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | ||
+ | new CookieNotice(' | ||
+ | </ | ||
+ | Jetzt fehlt nur noch die Optik. Dazu wird die nachfolgende CSS-Datei einfach als letztes CSS im **< | ||
+ | <file css CookieNotice.css> | ||
+ | /** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
+ | * | ||
+ | * CookieNotice.css | ||
+ | * | ||
+ | * @category | ||
+ | * @copyright | ||
+ | * @author | ||
+ | * @license | ||
+ | * @version | ||
+ | * @lastmodified 19.09.2015 | ||
+ | * @since | ||
+ | * @description | ||
+ | (by default after 7 days the cookie will be removed again) | ||
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | ||
+ | |||
+ | / | ||
+ | format the cookie notice | ||
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | ||
+ | # | ||
+ | box-sizing: border-box; | ||
+ | position: fixed; | ||
+ | left: 0; top: 0; right: 0; bottom: 0; | ||
+ | padding: 15px; | ||
+ | background-color: | ||
+ | display: none; | ||
+ | z-index: 9999; | ||
+ | } | ||
+ | # | ||
+ | position: relative; | ||
+ | top: 30%; | ||
+ | background-color: | ||
+ | text-align: center; | ||
+ | color: #777; | ||
+ | font-size: 0.9em; | ||
+ | padding: 6px 4px; | ||
+ | border-radius: | ||
+ | border: solid 1px red; | ||
+ | } | ||
+ | # | ||
+ | float: | ||
+ | background: #ff0000; | ||
+ | color: #ffffff; | ||
+ | font-weight: | ||
+ | width: 1.525em; | ||
+ | cursor: pointer; | ||
+ | border-radius: | ||
+ | } | ||
+ | # | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ??? ..nächste Frage | ||
+ | !!! ..nächste Antwort |