diff --git a/90s.css b/90s.css new file mode 100644 index 0000000..50f01d5 --- /dev/null +++ b/90s.css @@ -0,0 +1,119 @@ +* { box-sizing: border-box } + +body { + font-family: arial, sans-serif; + background: url(bliss.jpg) no-repeat fixed center/cover; +} + + +.window { + max-width: 50em; + margin: 1em auto; + margin-bottom: 3em; + padding-top: 0; + border: 1px solid darkgrey; + background-color: lightgrey; +} + +.window h1, .window h2 { + display: block; + background-color: darkblue; + color: white; + font-weight: bold; + font-size: 100%; + margin: 0; + padding: 2px; +} + +.window h1::after, .window h2::after { + content: "×"; + float: right; + background-color: lightgrey; + color: black; + border: 1px solid darkgrey; +} + +.window h1 img, .window h2 img { + height: 16px; + margin-right: 3px; +} + +.window a { + color: blue; + text-decoration: none; +} + +.window a:hover { + text-decoration: underline; +} + +.window .menu, .window .menubar { + padding: 2px; + margin: 0; + border-bottom: 1px solid darkgrey; +} + +.window .menu li, .window .menubar li { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; + padding-right: 3px; +} + +.window .menu li a, .window .menubar li a { + color: black; +} + +.window .menu li a:hover { + background-color: darkblue; + color: white; + text-decoration: none; +} + +.window .menubar li a { + border: 1px solid darkgrey; + height: 34px; + line-height: 34px; + display: block; + margin: 2px; +} + +.window .menubar li a:hover { + text-decoration: none; + outline: 1px dotted black; +} + +.window .menubar li a img { + vertical-align: middle; +} + +.window .pad { + padding: 1em; +} + +.window img { + max-width: 100%; +} + +.window hr { + border: none; + border-bottom: 1px solid darkgrey; +} + +#clippy { + position: fixed; + bottom: 20px; + right: 20px; + z-index: -1; +} + + +.maindlg { + display: block; + height: 20ex; +} + +.hidden { + display: none; +} diff --git a/bliss.jpg b/bliss.jpg new file mode 100644 index 0000000..7b6657d Binary files /dev/null and b/bliss.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..88ed790 --- /dev/null +++ b/index.html @@ -0,0 +1,166 @@ + + + + + Tísňová linka + + + + + + +
+

Dispečink 1.0

+
+ +
+ +
+

+

+
    +
+ + +
+ +
+Poslat: + + +kam: + + + + +co se děje: + + + + + +
+
+ + +
+

Internet exploder - Butter

+
+ + + +
+
+ + + + + + + + + \ No newline at end of file diff --git a/msagent-4.png b/msagent-4.png new file mode 100644 index 0000000..009bf07 Binary files /dev/null and b/msagent-4.png differ diff --git a/msie2-1.png b/msie2-1.png new file mode 100644 index 0000000..0a33722 Binary files /dev/null and b/msie2-1.png differ diff --git a/msie2-5.png b/msie2-5.png new file mode 100644 index 0000000..4fcb670 Binary files /dev/null and b/msie2-5.png differ diff --git a/uboot.js b/uboot.js new file mode 100644 index 0000000..ca25830 --- /dev/null +++ b/uboot.js @@ -0,0 +1,138 @@ +// base javascript library + +// protects programmer from javascript insanity, browser inconsitences and typing long strings + +// (c) Severák 2019 +// WTFPL licensed + +// kudos to lua team for inspiration +// and http://bonsaiden.github.io/JavaScript-Garden/ for wonderful docs on insanities of JS + +// guess type of x +function type(v) { + return Object.prototype.toString.call(v).slice(8, -1); +} + +// issues error when v is false-y +function assert(v, message) { + if (!message) message = 'assertion failed'; + if (!v) { + throw message; + } +} + +// shorthand to throwing exceptions +function error(message) { + throw message; +} + +// iterates over array calling fun(i, v) +function ipairs(arr, fun) { + for (var i = 0; i < arr.length; i++) { + fun(i, arr[i]); + } +} + +// iterates over object calling fun(k, v) +function pairs(obj, fun) { + for(var k in obj) { + if (obj.hasOwnProperty(k)) { + fun(k, obj[k]); + } + } +} + +function tostring(v) { + // TODO +} + +function tonumber(v, base) { + if (!base) base = 10; + return parseFloat(v, base); +} + + +// and now some DOM stuff + +// kudos to https://plainjs.com/ + +function gebi(id) { + return document.getElementById(id); +} + +function makeElem(tag, attr, text) { + // console.log('call makeElem:', tag, attr, text); + var newElem = document.createElement(tag); + if (attr) { + pairs(attr, function(atr,val){ + newElem.setAttribute(atr, val); + }); + } + if (text) newElem.innerText = text; + return newElem; +} + + +var addEvent = function(el, type, handler) { + if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler); +}; + +// matches polyfill + this.Element && function(ElementPrototype) { + ElementPrototype.matches = ElementPrototype.matches || + ElementPrototype.matchesSelector || + ElementPrototype.webkitMatchesSelector || + ElementPrototype.msMatchesSelector || + function(selector) { + var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1; + while (nodes[++i] && nodes[i] != node); + return !!nodes[i]; + } +}(Element.prototype); + + +function on(elem, eventName, fun, fun2) { + assert(arguments.length>2, 'Wrong number of arguments to function on.'); + if (type(elem)=='String') elem = gebi(elem); + if (arguments.length==4) { + var selector = fun; + var context = elem; + addEvent(context || document, eventName, function(e) { + var found, el = e.target || e.srcElement; + while (el && el.matches && el !== context && !(found = el.matches(selector))) el = el.parentElement; + if (found) fun2.call(el, e); + }); + } else { + addEvent(elem, eventName, fun); + } +} +// sub variant with on(elem, eventName, subselector, fun) + +function hasClass(elem, className) { + if (type(elem)=='String') elem = gebi(elem); + return elem.classList ? elem.classList.contains(className) : new RegExp('\\b'+ className+'\\b').test(elem.className); +} + +function addClass(elem, className) { + if (type(elem)=='String') elem = gebi(elem); + if (elem.classList) elem.classList.add(className); + else if (!hasClass(elem, className)) elem.className += ' ' + className; +} + +function delClass(elem, className) { + if (type(elem)=='String') elem = gebi(elem); + if (elem.classList) elem.classList.remove(className); + else elem.className = elem.className.replace(new RegExp('\\b'+ className+'\\b', 'g'), ''); +} + +// jQuery-like DOM ready +function whenReady(fun) { + // in case the document is already rendered + if (document.readyState!='loading') fun(); + // modern browsers + else if (document.addEventListener) document.addEventListener('DOMContentLoaded', fun); + // IE <= 8 + else document.attachEvent('onreadystatechange', function(){ + if (document.readyState=='complete') fun(); + }); +} \ No newline at end of file