From 7743b9ff7b9eb85ea9502e401529f10fed83a0f6 Mon Sep 17 00:00:00 2001 From: JoelHMikael Date: Thu, 30 Dec 2021 21:30:53 +0200 Subject: Footer --- index.css | 28 ++++++++++++++++++++++++++-- index.html | 6 ++++++ parse.js | 51 --------------------------------------------------- 3 files changed, 32 insertions(+), 53 deletions(-) diff --git a/index.css b/index.css index 5e09566..d71e3f3 100644 --- a/index.css +++ b/index.css @@ -56,6 +56,11 @@ body { margin: .5em; } +/*** the input field & choose ***/ +#input[type="text"], select { + background-color: white; +} + /*** the send-button ***/ #send { background: blue; @@ -74,6 +79,25 @@ body { box-shadow: .25em .25em; } +/*** Footer ***/ +footer { + position: fixed; + top: calc(100% - 3em); + left: 0; + + width: 100%; + margin: 0; + padding: 1em; + line-height: 1em; + box-sizing: border-box; + + background-color: #0d0d0d; +} + +footer > a { + color: #b3b3b3; +} + /*** The shadowed elements ***/ .highlight { border: 1px solid black; @@ -88,7 +112,7 @@ img.info { vertical-align: middle; } -img.info ~ span { +img.info + span { position: relative; vertical-align: middle; left: -1em; @@ -120,7 +144,7 @@ p.infoblock { opacity: 0; } -img.info:hover ~ span > p.infoblock { +img.info:hover + span > p.infoblock { animation-name: fade-in; animation-duration: var(--fadetime); visibility: visible; diff --git a/index.html b/index.html index b66abad..eba1547 100644 --- a/index.html +++ b/index.html @@ -53,5 +53,11 @@ + + diff --git a/parse.js b/parse.js index c3b7684..77e7b52 100644 --- a/parse.js +++ b/parse.js @@ -1,54 +1,3 @@ -/*let i = 0; - let foodShiftNames = []; - let db = []; // first level array: days - second level array: shifts - third level dict: course/teacher - fourth level array: indexes - while (db.length < weekdays.length) - { - i = findExpression(data, weekdays[db.length], i); - let end = i; - if (db.length === weekdays.length) - end = data.length; - else - end = findExpression(data, weekdays[db.length + 1], i + 1); - - db.push([]); // add the day - let shifts = 0; - - do - { - let teachers = []; - let courses = []; - i = findExpression(data, "RUOKAILUVUORO", i); - let nextLineStart = getNextChar(data, i, "\n"); - foodShiftNames.push(data.substring(i, nextLineStart)); - db[db.length - 1].push([]); // add the food shift - nextLineStart = getNextChar(data, nextLineStart + 1, "\n"); - while (!((nextLineStart - i) > 2)) - { - i = nextLineStart; - nextLineStart = getNextChar(data, i + 1, "\n"); - } - let parsedLine = data.substring(i, nextLineStart).replaceAll(",", "").replaceAll("ja ", ""); - let parse_i = 0; - let nextSpace = getNextChar(parsedLine, parse_i, " "); - while (parse_i !== -1) - { - courses.push(parsedLine.substring(parse_i, nextSpace)); - parse_i = nextSpace + 1; - nextSpace = getNextChar(parsedLine, parse_i, " "); - teachers.push(parsedLine.substring(parse_i, nextSpace)); - parse_i = nextSpace + 1; - nextSpace = getNextChar(parsedLine, parse_i, " "); - } - i = nextLineStart; - db[db.length - 1][shifts][0] = courses; - db[db.length - 1][shifts][1] = teachers; - shifts++; - } while ((i < end) && (i !== -1)) - - i = getNextChar("\n"); - } - return [db, foodShiftNames];*/ - function getCharAmount(s, c) { let n = 0; -- cgit v1.2.3