pretty animations for login/register
This commit is contained in:
parent
35a61859b2
commit
8e986c15b2
4 changed files with 145 additions and 12 deletions
|
@ -60,3 +60,12 @@
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#particles-js{
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 99%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: 50% 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
108
assets/static/js/particle.json
Normal file
108
assets/static/js/particle.json
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
{
|
||||||
|
"particles": {
|
||||||
|
"number": {
|
||||||
|
"value": 20,
|
||||||
|
"density": {
|
||||||
|
"enable": true,
|
||||||
|
"value_area": 500
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color": {
|
||||||
|
"value": "#ffffff"
|
||||||
|
},
|
||||||
|
"shape": {
|
||||||
|
"type": "circle",
|
||||||
|
"stroke": {
|
||||||
|
"width": 0,
|
||||||
|
"color": "#000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"opacity": {
|
||||||
|
"value": 0.3,
|
||||||
|
"random": false,
|
||||||
|
"anim": {
|
||||||
|
"enable": false,
|
||||||
|
"speed": 1,
|
||||||
|
"opacity_min": 0.1,
|
||||||
|
"sync": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"value": 0,
|
||||||
|
"random": true,
|
||||||
|
"anim": {
|
||||||
|
"enable": false,
|
||||||
|
"speed": 40,
|
||||||
|
"size_min": 0.1,
|
||||||
|
"sync": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"line_linked": {
|
||||||
|
"enable": true,
|
||||||
|
"distance": 250,
|
||||||
|
"color": "#ffffff",
|
||||||
|
"opacity": 0.5,
|
||||||
|
"width": 1
|
||||||
|
},
|
||||||
|
"move": {
|
||||||
|
"enable": true,
|
||||||
|
"speed": 0.3,
|
||||||
|
"direction": "none",
|
||||||
|
"random": false,
|
||||||
|
"straight": false,
|
||||||
|
"out_mode": "out",
|
||||||
|
"attract": {
|
||||||
|
"enable": false,
|
||||||
|
"rotateX": 600,
|
||||||
|
"rotateY": 1200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interactivity": {
|
||||||
|
"detect_on": "window",
|
||||||
|
"events": {
|
||||||
|
"onhover": {
|
||||||
|
"enable": false,
|
||||||
|
"mode": "repulse"
|
||||||
|
},
|
||||||
|
"onclick": {
|
||||||
|
"enable": true,
|
||||||
|
"mode": "bubble"
|
||||||
|
},
|
||||||
|
"resize": true
|
||||||
|
},
|
||||||
|
"modes": {
|
||||||
|
"grab": {
|
||||||
|
"distance": 800,
|
||||||
|
"line_linked": {
|
||||||
|
"opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bubble": {
|
||||||
|
"distance": 0,
|
||||||
|
"size": 40,
|
||||||
|
"duration": 2,
|
||||||
|
"opacity": 8,
|
||||||
|
"speed": 3
|
||||||
|
},
|
||||||
|
"repulse": {
|
||||||
|
"distance": 100
|
||||||
|
},
|
||||||
|
"push": {
|
||||||
|
"particles_nb": 4
|
||||||
|
},
|
||||||
|
"remove": {
|
||||||
|
"particles_nb": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"retina_detect": true,
|
||||||
|
"config_demo": {
|
||||||
|
"hide_card": false,
|
||||||
|
"background_color": "#b61924",
|
||||||
|
"background_image": "",
|
||||||
|
"background_position": "50% 50%",
|
||||||
|
"background_repeat": "no-repeat",
|
||||||
|
"background_size": "cover"
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="hero is-primary is-fullheight auth-background">
|
<div class="hero is-primary is-fullheight auth-background">
|
||||||
|
<div id="particles-js"></div>
|
||||||
<div class="hero-body">
|
<div class="hero-body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control has-icons-left">
|
<div class="control has-icons-left">
|
||||||
<input id="" placeholder="Email" class="input" type="text" name="" autofocus="autofocus">
|
<input id="" placeholder="Email" class="input is-primary" type="text" name="" autofocus="autofocus">
|
||||||
<span class="icon is-small is-left">
|
<span class="icon is-small is-left">
|
||||||
<i class="material-icons">mail_outline</i>
|
<i class="material-icons">mail_outline</i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control has-icons-left">
|
<div class="control has-icons-left">
|
||||||
<input placeholder="Password" type="password" name="" id="" class="input">
|
<input placeholder="Password" type="password" name="" id="" class="input is-primary">
|
||||||
<span class="icon is-small is-left">
|
<span class="icon is-small is-left">
|
||||||
<i class="material-icons">lock_outline</i>
|
<i class="material-icons">lock_outline</i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -75,10 +76,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<button class="button is-medium is-fullwidth is-dark" value="authorize"
|
<a disabled class="button is-medium is-fullwidth is-dark">
|
||||||
type="submit">
|
|
||||||
Log in with external
|
Log in with external
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,8 +100,11 @@
|
||||||
$notification.parentNode.removeChild($notification);
|
$notification.parentNode.removeChild($notification);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
particlesJS.load('particles-js', '{{ static "js/particle.json" }}');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js" integrity="sha512-Kef5sc7gfTacR7TZKelcrRs15ipf7+t+n7Zh6mKNJbmW+/RRdCW9nwfLn4YX0s2nO6Kv5Y2ChqgIakaC6PW09A==" crossorigin="anonymous"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="hero is-primary is-fullheight auth-background">
|
<div class="hero is-primary is-fullheight auth-background">
|
||||||
|
<div id="particles-js"></div>
|
||||||
<div class="hero-body">
|
<div class="hero-body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
<form class="form" method="POST" action="{{ url "/signup" }}">
|
<form class="form" method="POST" action="{{ url "/signup" }}">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control has-icons-left">
|
<div class="control has-icons-left">
|
||||||
<input type="text" name="name" id="name" class="input" placeholder="Your display name">
|
<input type="text" name="name" id="name" class="input is-primary" placeholder="Your display name">
|
||||||
<span class="icon is-small is-left">
|
<span class="icon is-small is-left">
|
||||||
<i class="material-icons">person_outline</i>
|
<i class="material-icons">person_outline</i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control has-icons-left">
|
<div class="control has-icons-left">
|
||||||
<input type="text" name="email" id="email" class="input" placeholder="Email">
|
<input type="text" name="email" id="email" class="input is-primary" placeholder="Email">
|
||||||
<span class="icon is-small is-left">
|
<span class="icon is-small is-left">
|
||||||
<i class="material-icons">mail_outline</i>
|
<i class="material-icons">mail_outline</i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -39,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="field mb-3">
|
<div class="field mb-3">
|
||||||
<div class="control has-icons-left">
|
<div class="control has-icons-left">
|
||||||
<input type="password" name="password" id="password" class="input" placeholder="Password">
|
<input type="password" name="password" id="password" class="input is-primary" placeholder="Password">
|
||||||
<span class="icon is-small is-left">
|
<span class="icon is-small is-left">
|
||||||
<i class="material-icons">lock_outline</i>
|
<i class="material-icons">lock_outline</i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -77,10 +78,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<button class="button is-medium is-fullwidth is-dark" value="authorize"
|
<a disabled class="button is-medium is-fullwidth is-dark">
|
||||||
type="submit">
|
|
||||||
Sign up with external
|
Sign up with external
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,6 +93,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
(document.querySelectorAll('.notification .delete') || []).forEach(($delete) => {
|
||||||
|
$notification = $delete.parentNode;
|
||||||
|
$delete.addEventListener('click', () => {
|
||||||
|
$notification.parentNode.removeChild($notification);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
particlesJS.load('particles-js', '{{ static "js/particle.json" }}');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js" integrity="sha512-Kef5sc7gfTacR7TZKelcrRs15ipf7+t+n7Zh6mKNJbmW+/RRdCW9nwfLn4YX0s2nO6Kv5Y2ChqgIakaC6PW09A==" crossorigin="anonymous"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue