1
Fork 0
mirror of https://github.com/Steffo99/estus.git synced 2024-10-16 06:17:27 +00:00

IT'S THE FINAL 🐟

This commit is contained in:
Steffo 2017-09-22 12:48:34 +02:00
parent ede896afea
commit 62f65a1ac2
2 changed files with 25 additions and 4 deletions

View file

@ -226,7 +226,8 @@ class Pesce:
self.name = str(origin_obj)
self.size = random.gauss(avgsize, variation)
self.color = "{:02x}".format(random.randrange(0, 16777216))
self.position = (random.randrange(0, 1423), random.randrange(52, 600))
self.position = (random.randrange(0, 1260 - int(100 * self.size)), random.randrange(72, 620))
self.delay = random.random() * 10
self.link = link
def __repr__(self):

View file

@ -2,18 +2,38 @@
{% block title %}Acquario • estus{% endblock %}
{% block extrahead %}
<style>
@keyframes fish {
0% {
transform: translate(0px, 0px);
}
50% {
transform: translate(0px, 20px);
}
100% {
transform: translate(0px, 0px);
}
}
.fish {
animation: fish 5s infinite;
animation-direction: alternate;
animation-timing-function: cubic-bezier(.46,.03,.52,.96);
}
{% for fish in pheesh %}
#fish{{ loop.index }}
{
color: #{{ fish.color }};
position: absolute;
top: {{ fish.position[1] }};
left: {{ fish.position[0] }};
top: {{ fish.position[1] }}px;
left: {{ fish.position[0] }}px;
animation-delay: -{{ fish.delay }}s;
}
{% endfor %}
body {
background-color: royalblue !important;
backround-repeat: no-repeat;
background: linear-gradient(#003366, darkblue) fixed;
}
</style>
<script>