Changeset - 04aed8b082bb
[Not reviewed]
default
0 2 0
Luca Allulli (luca) - 2 years ago 2019-04-07 16:52:48
luca@skeed.it
* Servizi: transition when page is loaded for the first time
2 files changed with 84 insertions and 0 deletions:
0 comments (0 inline, 0 general)
servizi/templates/servizi_new.html
Show inline comments
...
 
@@ -5,6 +5,86 @@
 
{% block NavigationTop %}
 
{% endblock %}
 

 
{% block InternalStyle %}
 
	{% if mar_style_transition %}
 
		<style>
 
			@keyframes mar_transition {
 
			0% {
 
					background-color: #13985F;
 
					color: #ffffff;
 
			}
 
			60% {
 
					background-color: #13985F;
 
					color: #ffffff;
 
			}
 
			100% {
 
					background-color: #FFFFFF;
 
					color: #000000;
 
			}
 
		}
 
		@keyframes mar_transition_h1 {
 
			0% {
 
				color: white;
 
				background-color: #861128;
 
			}
 
			60% {
 
				color: white;
 
				background-color: #861128;
 
			}
 
			100% {
 
				background-color: #f84f00;
 
				color: white;
 
			}
 
		}
 
		@keyframes mar_transition_h2 {
 
			0% {
 
				color: #8e001c;
 
				background-color: white;
 
				filter: alpha(opacity=70);
 
				opacity: .7;
 
			}
 
			60% {
 
				color: #8e001c;
 
				background-color: white;
 
				filter: alpha(opacity=70);
 
				opacity: .7;
 
			}
 
			100% {
 
				color: #ffffff;
 
				background-color: #888888;
 
				filter: alpha(opacity=70);
 
				opacity: .7;
 
			}
 
		}
 
		@keyframes mar_transition_a {
 
			0% {
 
				color: #FFFFFF;
 
			}
 
			60% {
 
				color: #FFFFFF;
 
			}
 
			100% {
 
				color: #f84f00;;
 
			}
 
		}
 

 

 
		body, #main {
 
			animation: 8s ease-out 0s 1 mar_transition;
 
		}
 
		h1 {
 
			animation: 8s ease-out 0s 1 mar_transition_h1;
 
		}
 
		h2 {
 
			animation: 8s ease-out 0s 1 mar_transition_h2;
 
		}
 
		.menulink, a {
 
			animation: 8s ease-out 0s 1 mar_transition_a;
 
		}
 
		</style>
 
	{% endif %}
 
{% endblock %}
 

 
{% block content %}
 
	<div class="right-head">
 
		{% if not request.user|in_group:"readonly" %}
servizi/views.py
Show inline comments
...
 
@@ -326,6 +326,10 @@ def servizi_new(request):
 

 
	error_messages = []
 
	error_fields = []
 

 
	if 'mar_transition_done' not in request.session:
 
		request.session['mar_transition_done'] = True
 
		ctx['mar_style_transition'] = True
 
		
 
	if f.is_bound and 'Avanzate' in request.GET:
 
		cd = f.data
0 comments (0 inline, 0 general)