utenti.html: Aggiunte sezioni, lista di test

main-old
Antonio De Lucreziis 4 years ago
parent 168ef97460
commit 77c73713d4

@ -4,261 +4,61 @@
{{define "body"}}
 
<section>
<h2>
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/find-user-male.png" />
Utenti
</h2>
<h2>
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/find-user-male.png" />
Utenti
</h2>
<p>
Questa è la lista di tutti gli utenti con un account su Poisson. Scrivi nome, cognome o username di un utente
per filtrare la lista in tempo reale.
</p>
<p>
Questa è la lista di tutti gli utenti con un account su Poisson. Scrivi nome, cognome o username di un utente per filtrare la lista in tempo reale.
</p>
<div class="search">
<input type="text" id="search-field" placeholder="Cerca...">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/search.png"/>
</div>
<div class="user-list">
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 1</h3>
<h4 class="username">persona1</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 2</h3>
<h4 class="username">persona2</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 3</h3>
<h4 class="username">persona3</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 4</h3>
<h4 class="username">persona4</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 5</h3>
<h4 class="username">persona5</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 6</h3>
<h4 class="username">persona6</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 7</h3>
<h4 class="username">persona7</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 8</h3>
<h4 class="username">persona8</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 9</h3>
<h4 class="username">persona9</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 10</h3>
<h4 class="username">persona10</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
<div class="search">
<input type="text" id="search-field" placeholder="Cerca...">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/search.png" />
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 11</h3>
<h4 class="username">persona11</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 12</h3>
<h4 class="username">persona12</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 13</h3>
<h4 class="username">persona13</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 14</h3>
<h4 class="username">persona14</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 15</h3>
<h4 class="username">persona15</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 16</h3>
<h4 class="username">persona16</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
<div class="user">
<div class="contact">
<h3 class="fullname">Persona 17</h3>
<h4 class="username">persona17</h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png"/>
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
<div class="user-list">
<!-- Dummy data -->
</div>
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', ({ }) => {
const $userList = document.querySelector('.user-list');
const $user = document.createElement('div');
$user.innerHTML = `
<div class="user">
<div class="contact">
<h3 class="fullname"></h3>
<h4 class="username"></h4>
</div>
<div class="links">
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/web.png" />
</a>
<a href="#">
<img class="icons8" src="https://img.icons8.com/ios-filled/50/000000/git.png" />
</a>
</div>
</div>
`;
// Per mostrare che la pagina regge molti utenti senza laggare troppo
Array(1400).fill(0).map(({ }, i) => {
setTimeout(() => {
// Pare che questa riga sia la più dispendiosa
const $newUser = $user.cloneNode(true);
$newUser.querySelector('.fullname').innerHTML = `Persona ${i + 1}`;
$newUser.querySelector('.username').innerHTML = `persona${i + 1}`;
$userList.appendChild($newUser.firstElementChild);
}, 0)
});
})
</script>
{{end}}
Loading…
Cancel
Save