Added anchors to first row and swishy animation
This commit is contained in:
parent
b59b5e5b00
commit
e15727ae21
|
@ -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'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
|
@ -13,8 +13,9 @@
|
||||||
|
|
||||||
<script type="text/javascript" src="lug.js"></script>
|
<script type="text/javascript" src="lug.js"></script>
|
||||||
<script type="text/javascript" src="counters.js"></script>
|
<script type="text/javascript" src="counters.js"></script>
|
||||||
|
<script type="text/javascript" src="animations.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="lugtoscana(); counters();">
|
<body onload="lugtoscana(); counters(); animations();">
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1 class="golem_font" >GOLEM</h1>
|
<h1 class="golem_font" >GOLEM</h1>
|
||||||
|
@ -24,12 +25,15 @@
|
||||||
<main>
|
<main>
|
||||||
<section id="chisiamo" class="bg">
|
<section id="chisiamo" class="bg">
|
||||||
<h2>Chi siamo</h2>
|
<h2>Chi siamo</h2>
|
||||||
|
<a href="#attivita" class="anchor">
|
||||||
<div>
|
<div>
|
||||||
<h3>Il GOLEM</h3>
|
<h3>Il GOLEM</h3>
|
||||||
<p>
|
<p>
|
||||||
«Gruppo Operativo Linux Empoli» è il Linux Users Group di Empoli, ed è un'associazione di promozione sociale.
|
«Gruppo Operativo Linux Empoli» è il Linux Users Group di Empoli, ed è un'associazione di promozione sociale.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="anchor">
|
||||||
<div>
|
<div>
|
||||||
<h3>Dove siamo</h3>
|
<h3>Dove siamo</h3>
|
||||||
<p>
|
<p>
|
||||||
|
@ -37,12 +41,15 @@
|
||||||
</p>
|
</p>
|
||||||
<p><a href="https://www.openstreetmap.org/?mlat=43.72634&mlon=10.92510#map=18/43.72634/10.92510">Mappa</a></p>
|
<p><a href="https://www.openstreetmap.org/?mlat=43.72634&mlon=10.92510#map=18/43.72634/10.92510">Mappa</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
|
<a href="#news" class="anchor">
|
||||||
<div>
|
<div>
|
||||||
<h3>Quando</h3>
|
<h3>Quando</h3>
|
||||||
<p>
|
<p>
|
||||||
Martedì sera<br/>dalle 21.30 alle 24.00
|
Martedì sera<br/>dalle 21.30 alle 24.00
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="news" class="bg">
|
<section id="news" class="bg">
|
||||||
|
|
Loading…
Reference in New Issue