Skip to content

Commit

Permalink
removed loader from page changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Agnano committed Jul 16, 2019
1 parent 3d66fac commit 8dfe1d6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 104 deletions.
47 changes: 0 additions & 47 deletions cafebabel/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -775,53 +775,6 @@ a.logo:after {
}
}

/* Preloader */

#preloader-layer {
position: fixed;
top: 7.9rem;
right: 0;
bottom: 0;
left: 0;
height: 100%;
box-shadow: 0 1rem 1rem 0 rgba(0, 0, 0, 0.1);
background: white;
transition: all 0.3s ease-in-out;
z-index: 5;
}

#preloader-layer img {
position: absolute;
left: 50%;
top: 40%;
transform: translate(-50%, -50%);
}

.tag-page-edit #preloader-layer img {
margin-left: 0;
}

#preloader-layer.slideup {
top: -110%;
bottom: auto;
}

#preloader-layer.slidedown {
top: 7.9rem;
bottom: 0;
}

@media screen and (min-width: 750px) {
#preloader-layer,
#preloader-layer.slidedown {
top: 9rem;
}
}

#preloader-layer.hidden {
display: none;
}

/* Menu */

button.menu,
Expand Down
38 changes: 0 additions & 38 deletions cafebabel/static/js/loader.js

This file was deleted.

10 changes: 0 additions & 10 deletions cafebabel/static/js/script.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/* Preloader slide down when input:submit is clicked */
const inputSubmited = document.querySelector('input[type="submit"]')
if (inputSubmited) {
inputSubmited.addEventListener('click', () => {
preloader.classList.remove('slideup')
preloader.classList.remove('hidden')
preloader.classList.add('slidedown')
})
}

/* open menu */
Array.from(document.querySelectorAll('button.menu')).forEach(button => {
button.addEventListener('click', () => {
Expand Down
10 changes: 1 addition & 9 deletions cafebabel/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
<link rel=stylesheet href={{ ASSET_URL }}>
{% endassets %}
{% block extra_head %}{% endblock %}
<noscript>
<style>#preloader-layer {display:none;}</style>
</noscript>
<!--[if IE]><style>#preloader-layer {display:none;}</style><![endif]-->

<body class="{% block body_class %}{% endblock %}">

Expand Down Expand Up @@ -76,7 +72,7 @@
</li>
</ul>
</nav>

<a href={{ lang_url_for('proposals.create') }} id=participate title=Participate>Participate</a>
<a href={{ lang_url_for('articles.to_translate') }} id=translate title=Translate>Translate</a>
<a href=https://www.helloasso.com/associations/babel-international/collectes/soutenez-cafebabel id=donate title=Donate>Donate</a>
Expand Down Expand Up @@ -171,10 +167,6 @@ <h4>Want our bi-monthly newsletter in your inbox? Then type in your email addres
<iframe src="https://app.mailjet.com/widget/iframe/2iD4/4zE" height=270></iframe>
<p>© Cafébabel — {{ get_year() }}</p>
</footer>
<div id=preloader-layer>
<img src={{ url_for('static', filename='img/preloader-A.gif') }} alt="loading...">
</div>
<script src="/static/js/loader.js"></script>
{% assets filters='jsmin', output='build/common.js', 'js/utils.js', 'js/script.js', 'js/lazyload.min.js', 'js/lazyload-setup.js' %}
<script src={{ ASSET_URL }}></script>
{% endassets %}
Expand Down

0 comments on commit 8dfe1d6

Please sign in to comment.