From d383f9304a6cddd2aa58a6174747ae227ce67a9d Mon Sep 17 00:00:00 2001 From: vv2529 Date: Mon, 8 Mar 2021 01:21:31 +0200 Subject: [PATCH 1/2] Revamp the homepage --- index.html | 68 +++++++++++++++++++++++++++++++++++------------------- script.js | 46 ++++++++++++++++++++++++++++++++++++ style.css | 30 ++++++++++++++++++++++++ 3 files changed, 120 insertions(+), 24 deletions(-) create mode 100644 script.js create mode 100644 style.css diff --git a/index.html b/index.html index 7db6483..4c373c2 100644 --- a/index.html +++ b/index.html @@ -4,31 +4,51 @@ Kottans practice - + + -

Online part:

- -

Offline part:

- + +
+

Home

+
+

+ This is my collection of projects created as a part of the Kottans frontend course 2019: http://github.com/kottans/frontend. +

+
+ +
+

An application that uses the Random User API and displays user profiles, which then can be sorted and filtered.

+
+
+

A simple game.

+
+
+

An exercise to solidify the understanding of OOP in JS.

+
+
+

The Frogger game, built on the prototype-based OOP.

+
+
+

A world of objects, where classes do not exist yet.

+
+
+

A page which fetches its content from JSON files. The look of it might be a bit familiar ;)

+
+ +
+ + diff --git a/script.js b/script.js new file mode 100644 index 0000000..0b0c247 --- /dev/null +++ b/script.js @@ -0,0 +1,46 @@ +const navbar = document.getElementById('navbar'); + +/* + * Events + */ + +document.getElementById('navbar-toggle').addEventListener('click', function() { + navbar.classList.toggle('shown'); +}); + +navbar.addEventListener('click', function(event) { + // delegate clicks from
  • s to