From e15727ae21f4e8256a1759253aff932a8f7ef9f5 Mon Sep 17 00:00:00 2001 From: giuliof Date: Tue, 8 Dec 2020 18:26:02 +0100 Subject: [PATCH] Added anchors to first row and swishy animation --- animations.js | 13 +++++++++++++ index.html | 9 ++++++++- style.css | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 animations.js diff --git a/animations.js b/animations.js new file mode 100644 index 0000000000..073e893066 --- /dev/null +++ b/animations.js @@ -0,0 +1,13 @@ +// Automagically nimate clicks to anchors + +function animations() { + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + + document.querySelector(this.getAttribute('href')).scrollIntoView({ + behavior: 'smooth' + }); + }); + }); +} \ No newline at end of file diff --git a/index.html b/index.html index 63c2131524..c0d12e870d 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,9 @@ + - +

GOLEM

@@ -24,12 +25,15 @@

Chi siamo

+

Il GOLEM

«Gruppo Operativo Linux Empoli» è il Linux Users Group di Empoli, ed è un'associazione di promozione sociale.

+
+

Dove siamo

@@ -37,12 +41,15 @@

Mappa

+ +

Quando

Martedì sera
dalle 21.30 alle 24.00

+
diff --git a/style.css b/style.css index caddefc2a0..ea77a895d7 100644 --- a/style.css +++ b/style.css @@ -160,4 +160,9 @@ ul > li { .golem_font { font-family: GOLEM, comfortaa, "Arial", sans-serif; +} + +a:link.anchor, a:visited.anchor { + color: inherit; + text-decoration: inherit; } \ No newline at end of file