From 85c0341a0813556749bc5d34fe35fe8a18f1f5a8 Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Sun, 30 Oct 2022 15:19:30 +0200 Subject: ajatelg done, add to index --- rannak/mangud/index.html | 2 +- rannak/mangud/uliopilane/ajatelg/index.html | 193 ++++++++++++++++++++++++++-- rannak/mangud/uliopilane/ajatelg/script.js | 72 +++++++++++ rannak/mangud/uliopilane/ajatelg/styles.css | 173 +++++++++++++++++++++++++ 4 files changed, 430 insertions(+), 10 deletions(-) (limited to 'rannak') diff --git a/rannak/mangud/index.html b/rannak/mangud/index.html index fd8a489..c02843c 100644 --- a/rannak/mangud/index.html +++ b/rannak/mangud/index.html @@ -34,7 +34,7 @@

Üliõpilane

    -
  1. +
  2. Ajatelg
diff --git a/rannak/mangud/uliopilane/ajatelg/index.html b/rannak/mangud/uliopilane/ajatelg/index.html index b7e7c2f..5cd5881 100644 --- a/rannak/mangud/uliopilane/ajatelg/index.html +++ b/rannak/mangud/uliopilane/ajatelg/index.html @@ -1,12 +1,187 @@ - - - + + + + Ajatelg - - - - - - + + + + + + + +
+

Ajatelg

+

Pane Sündumsed ajateljel õigsse järjekorda

+ +
+
+ +
+
+ +
+ + + + +
+ +
+
+
Fosforiidi Sõda
+ +
+ 9. Tartu levimuusikapäevad +

(esmakordselt kõlas “Ei ole üksi ükski maa)”

+
+ +
Hirvepargi meeleavaldus
+
Tartu muinsuskaitsepäevad
+
Laulev revolutsioon, öölaulupeod
+
ENSV Keeleseadus, eesti keel riigikeeleks
+
Sinine, must ja valge lipp esimest korda Pika Hermanni tornis
+
Balti kett Tallinnast Vilniuseni
+
Eesti Kongress
+
Interrinne ründab Toompead
+
Augustiputš
+
Ülemnõukogu otsus Eesti riiklikust iseseisvusest
+
+
+ + + + +
+
+
    + +
  • +
    +

    1987

    +
    +
    +
    +
    +
  • + +
  • +
    +

    14.05.1987

    +
    +
    +
    +
    +
  • + +
  • +
    +

    23.08.1987

    +
    +
    +
    +
    +
  • + +
  • +
    +

    14.-17.04.1988

    +
    +
    +
    +
    +
  • + +
  • +
    +

    suvi 1988

    +
    +
    +
    +
    +
  • + +
  • +
    +

    18.01.1989

    +
    +
    +
    +
    +
  • + +
  • +
    +

    24.02.1989

    +
    +
    +
    +
    +
  • + +
  • +
    +

    23.08.1989

    +
    +
    +
    +
    +
  • + +
  • +
    +

    11.-12.03.1990

    +
    +
    +
    +
    +
  • + +
  • +
    +

    15.05 1990

    +
    +
    +
    +
    +
  • + +
  • +
    +

    18.-21.08.1991

    +
    +
    +
    +
    +
  • + +
  • +
    +

    20.08.1991

    +
    +
    +
    +
    +
  • + +
+
+
+ + + +
+ + + + + + + diff --git a/rannak/mangud/uliopilane/ajatelg/script.js b/rannak/mangud/uliopilane/ajatelg/script.js index e69de29..5c667a5 100644 --- a/rannak/mangud/uliopilane/ajatelg/script.js +++ b/rannak/mangud/uliopilane/ajatelg/script.js @@ -0,0 +1,72 @@ +const list_items = document.querySelectorAll(".list-item"); +const lists = document.querySelectorAll(".list"); + +let draggedItem = null; + +for (let i=0; i < list_items.length; i++){ + const item = list_items[i]; + + /* Event Listeners */ + item.addEventListener("dragstart", e => { + draggedItem = item; + setTimeout(() => (item.style.display = "none"), 0); + }); + + item.addEventListener("dragend", e => { + setTimeout(() => { + draggedItem.style.display = "block"; + draggedItem = null}, 0); + checkIfAllGood(); + }); + + for (let j=0; j < lists.length; j++){ + const list = lists[j]; + + + /* Event Listeners */ + list.addEventListener("dragenter",e => (e.preventDefault())); + + list.addEventListener("dragover",e => { + e.preventDefault(); + //list.style.backgroundColor = "rgba(0,0,0,0.5)"; + }); + + + list.addEventListener("dragleave",e => { + //list.style.backgroundColor = "rgba(0,0,0,0.3)"; + }); + + + list.addEventListener("drop",e => { + if ((list.children.length == 0 && list.id ==draggedItem.id) || list.className.includes("startBasket")) + list.append(draggedItem); + //list.style.backgroundColor = "rgba(0,0,0,0.5)"; + }) + } + +} + +function checkIfAllGood(){ + let rightDone = []; + + for (let j=0; j < lists.length; j++){ + const list = lists[j]; + if (list.className.includes("startBasket")){ + continue; + } + else if (list.children.length == 1){ + if (list.id == list.children[0].id){ + if (!rightDone.includes(list.id)) + rightDone.push(list.id); + console.log(rightDone.length); + console.log(rightDone); + } + } + } // For loop end + + if (rightDone.length == 12) { + const btn = document.querySelector(".moveOn"); + btn.disabled = false; + btn.onclick = () => location.href = ""; + } +} diff --git a/rannak/mangud/uliopilane/ajatelg/styles.css b/rannak/mangud/uliopilane/ajatelg/styles.css index e69de29..5966c9b 100644 --- a/rannak/mangud/uliopilane/ajatelg/styles.css +++ b/rannak/mangud/uliopilane/ajatelg/styles.css @@ -0,0 +1,173 @@ +@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500&display=swap"); +html { + font-family: "Montserrat"; +} + +* { + margin: 0 !important; + padding: 0 !important; + box-sizing: border-box !important; +} + +body{ + background-color: #111 !important; +} + +.pealkiri { + width: 100vw !important; +} + +/* Green Btn */ +.moveOn{ + display: inline-block; + border: none; + padding: 6px 12px; + margin-botton: 0; + font-size: 1rem; + font-weight: normal; + text-align: center; + cursor: pointer; + border-radius: 4px; + background-color: #4BB543; + color: white; +} + +button:disabled{ + opacity: 0.5; + cursor: not-allowed; +} + +/* Left side Part */ + + + +.list .list-item { + background-color: #1e1f22 !important; + color: white; + font-weight: bold; + height: 3rem; + border-radius: 8px !important; + cursor: pointer; + margin: 5px !important; +} + +.list-item p { + font-size: .9rem; +} + +.startBasket { + height: 100% !important; + min-height: 4rem; +} + + +/* Timeline css part*/ + +.timelineContainer { + min-height: 100vh; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + padding: 100px 0; +} + +.timeline { + width: 80%; + height: auto; + max-width: 800px; + margin: 0 auto; + position: relative; +} + +.timeline ul { + list-style: none; +} + +.timeline ul li { + padding: 20px; + background-color: #1e1f22; + color: white; + margin-bottom: 20px; +} + +.timeline ul li:last-child { + margin-bottom: 0; +} + +.timeline-content .list { + background-color: #1e1f22 !important; + min-height: 4rem; + border-radius: 8px !important; + margin: 10px !important; + text-align: center !important; + vertical-align: middle; +} + +.timeline-content .date { + font-size: 16px; + font-weight: 400; + margin-bottom: 10px; + letter-spacing: 2px; + color: #CFF8F8; +} + +/* Responsivness */ +@media only screen and (min-width: 768px) { + + /* Vertical line */ + .timeline:before { + content: ""; + position: absolute; + top: 0; + left: 50%; + transform: translateX(-50%); + width: 2px; + height: 100%; + background-color: gray; + } + .timeline ul li { + width: 50%; + position: relative; + margin-bottom: 50px; + } + .timeline ul li:nth-child(odd) { + float: left; + clear: right; + transform: translateX(-30px); + border-radius: 20px 0px 20px 20px; + } + .timeline ul li:nth-child(even) { + float: right; + clear: left; + transform: translateX(30px); + border-radius: 0px 20px 20px 20px; + } + + /*Balls*/ + .timeline ul li::before { + content: ""; + position: absolute; + height: 20px; + width: 20px; + border-radius: 50%; + background-color: gray; + top: 0px; + } + .timeline ul li:nth-child(odd)::before { + transform: translate(50%, -50%); + right: -30px; + } + .timeline ul li:nth-child(even)::before { + transform: translate(-50%, -50%); + left: -30px; + } + .timeline-content .date { + position: absolute; + top: -30px; + } + .timeline ul li:hover::before { + background-color: aqua; + } + +} -- cgit v1.2.3