Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"/> | |
<title> | |
Automatically animate your SVG logo | |
</title> | |
<meta name="description" content="Simple landind page"/> | |
<meta name="keywords" content=""/> | |
<meta name="author" content=""/> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/tailwind.min.css"/> | |
<!--Replace with your tailwind.css once created--> | |
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet"/> | |
<!-- Define your gradient here - use online tools to find a gradient matching your branding--> | |
<style> | |
.gradient { | |
background: linear-gradient(90deg, #d53369 0%, #daae51 100%); | |
} | |
</style> | |
</head> | |
<body class="leading-normal tracking-normal text-white gradient" style="font-family: 'Source Sans Pro', sans-serif;"> | |
<!-- Nav --> | |
<nav class="fixed w-full z-30 top-0 text-white" id="header"> | |
<div class="w-full container mx-auto flex flex-wrap items-center justify-between mt-0 py-2"> | |
<div class="pl-4 flex items-center"> | |
<a class="toggleColour no-underline hover:no-underline font-bold text-2xl text-gray-800 lg:text-4xl" | |
href="/"> | |
SVG Logo Animation | |
</a> | |
</div> | |
<div class="block lg:hidden pr-4"> | |
<button class="flex items-center p-1 text-pink-800 hover:text-gray-900 focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
id="nav-toggle"> | |
<svg class="fill-current h-6 w-6" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> | |
<title>Menu</title> | |
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/> | |
</svg> | |
</button> | |
</div> | |
<div class="w-full flex-grow lg:flex lg:items-center lg:w-auto hidden mt-2 lg:mt-0 bg-white lg:bg-transparent text-black p-4 lg:p-0 z-20" | |
id="nav-content"> | |
<ul class="list-reset lg:flex justify-end flex-1 items-center"> | |
<li class="mr-3"> | |
</li> | |
<li class="mr-3"> | |
</li> | |
<li class="mr-3"> | |
</li> | |
</ul> | |
<button | |
class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full mt-4 lg:mt-0 py-4 px-8 shadow opacity-75 focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
id="navAction" | |
method="POST" | |
onclick="location.href = '{{ url_for('redirect_button') }}';" | |
> | |
Animate another logo | |
</button> | |
</div> | |
</div> | |
<hr class="border-b border-gray-100 opacity-25 my-0 py-0"/> | |
</nav> | |
<!-- Animated Logos --> | |
<section class="bg-white border-b py-8"> | |
<div class="container max-w-5xl mx-auto m-8"> | |
<h1 class="w-full my-2 text-5xl font-bold leading-tight text-center text-gray-800"> | |
Animated logos | |
</h1> | |
<p class="text-xl text-gray-800 leading-none mb-3 text-center"> | |
(Please note: Animation models are temporarily disabled. Try again later.) | |
</p> | |
<div class="w-full mb-4"> | |
<div class="h-1 mx-auto gradient w-64 opacity-25 my-0 py-0 rounded-t"></div> | |
</div> | |
<div class="flex flex-wrap"> | |
<div class="w-5/6 sm:w-1/2 p-6"> | |
<h3 class="text-3xl text-gray-800 font-bold leading-none mb-3"> | |
Animation 1 | |
</h3> | |
<p class="text-xl text-gray-800 leading-none mb-3"> | |
Please rate this animation using the buttons below. | |
</p> | |
<button class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
onclick="repeat_animated_entmoot()" | |
> | |
(Re)play animation | |
</button> | |
<a download="animation_optimizer.svg" | |
href="{{ url_for('animated_svg_entmoot', animation_filename_entmoot=animation_filename_entmoot) }}" | |
target="blank"> | |
<button class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out"> | |
Download animation | |
</button> | |
</a> | |
</div> | |
</div> | |
<div class="flex flex-wrap"> | |
<div class="w-full sm:w-1/2 p-6"> | |
<object data="{{ url_for('animated_svg_entmoot', animation_filename_entmoot=animation_filename_entmoot) }}" | |
id="animated_entmoot" | |
type="image/svg+xml"></object> | |
</div> | |
</div> | |
<form enctype=multipart/form-data method=post> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#ff0000" | |
name="optimizer" | |
value="Very bad"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#ff6600" | |
name="optimizer" | |
value="Bad"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#FFFF00" | |
name="optimizer" | |
value="Okay"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#80ff00" | |
name="optimizer" | |
value="Good"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#15ff00" | |
name="optimizer" | |
value="Very good"> | |
</form> | |
<div class="flex flex-wrap"> | |
<div class="w-5/6 sm:w-1/2 p-6"> | |
<h3 class="text-3xl text-gray-800 font-bold leading-none mb-3"> | |
Animation 2 | |
</h3> | |
<p class="text-xl text-gray-800 leading-none mb-3"> | |
Please rate this animation using the buttons below. | |
</p> | |
<button class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
onclick="repeat_animated_genetic()" | |
> | |
(Re)play animation | |
</button> | |
<a download="animation_generator.svg" | |
href="{{ url_for('animated_svg_genetic', animation_filename_genetic=animation_filename_genetic) }}" | |
target="blank"> | |
<button class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out"> | |
Download animation | |
</button> | |
</a> | |
</div> | |
</div> | |
<div class="flex flex-wrap"> | |
<div class="w-full sm:w-1/2 p-6"> | |
<object data="{{ url_for('animated_svg_genetic', animation_filename_genetic=animation_filename_genetic) }}" | |
id="animated_genetic" | |
type="image/svg+xml"></object> | |
</div> | |
</div> | |
<form enctype=multipart/form-data method=post> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#ff0000" | |
name="generator" | |
value="Very bad"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#ff6600" | |
name="generator" | |
value="Bad"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#FFFF00" | |
name="generator" | |
value="Okay"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#80ff00" | |
name="generator" | |
value="Good"> | |
<input class="mx-auto lg:mx-0 hover:underline bg-white text-gray-800 font-bold rounded-full my-6 py-4 px-8 shadow-lg focus:outline-none focus:shadow-outline transform transition hover:scale-105 duration-300 ease-in-out" | |
type=submit | |
style="background-color:#15ff00" | |
name="generator" | |
value="Very good"> | |
</form> | |
</div> | |
</section> | |
<!-- Change the colour #f8fafc to match the previous section colour --> | |
<svg class="wave-top" viewBox="0 0 1439 147" version="1.1" xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | |
<g transform="translate(-1.000000, -14.000000)" fill-rule="nonzero"> | |
<g class="wave" fill="#f8fafc"> | |
<path | |
d="M1440,84 C1383.555,64.3 1342.555,51.3 1317,45 C1259.5,30.824 1206.707,25.526 1169,22 C1129.711,18.326 1044.426,18.475 980,22 C954.25,23.409 922.25,26.742 884,32 C845.122,37.787 818.455,42.121 804,45 C776.833,50.41 728.136,61.77 713,65 C660.023,76.309 621.544,87.729 584,94 C517.525,105.104 484.525,106.438 429,108 C379.49,106.484 342.823,104.484 319,102 C278.571,97.783 231.737,88.736 205,84 C154.629,75.076 86.296,57.743 0,32 L0,0 L1440,0 L1440,84 Z" | |
></path> | |
</g> | |
<g transform="translate(1.000000, 15.000000)" fill="#FFFFFF"> | |
<g transform="translate(719.500000, 68.500000) rotate(-180.000000) translate(-719.500000, -68.500000) "> | |
<path d="M0,0 C90.7283404,0.927527913 147.912752,27.187927 291.910178,59.9119003 C387.908462,81.7278826 543.605069,89.334785 759,82.7326078 C469.336065,156.254352 216.336065,153.6679 0,74.9732496" | |
opacity="0.100000001"></path> | |
<path | |
d="M100,104.708498 C277.413333,72.2345949 426.147877,52.5246657 546.203633,45.5787101 C666.259389,38.6327546 810.524845,41.7979068 979,55.0741668 C931.069965,56.122511 810.303266,74.8455141 616.699903,111.243176 C423.096539,147.640838 250.863238,145.462612 100,104.708498 Z" | |
opacity="0.100000001" | |
></path> | |
<path d="M1046,51.6521276 C1130.83045,29.328812 1279.08318,17.607883 1439,40.1656806 L1439,120 C1271.17211,77.9435312 1140.17211,55.1609071 1046,51.6521276 Z" | |
opacity="0.200000003"></path> | |
</g> | |
</g> | |
</g> | |
</g> | |
</svg> | |
<!-- Upper title --> | |
<!-- Lower title --> | |
<!-- Pricing --> | |
<!--Call to Action--> | |
<!--Footer--> | |
<!-- jQuery if you need it | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
--> | |
<script> | |
var scrollpos = window.scrollY; | |
var header = document.getElementById("header"); | |
var navcontent = document.getElementById("nav-content"); | |
var navaction = document.getElementById("navAction"); | |
var brandname = document.getElementById("brandname"); | |
var toToggle = document.querySelectorAll(".toggleColour"); | |
document.addEventListener("scroll", function () { | |
/*Apply classes for slide in bar*/ | |
scrollpos = window.scrollY; | |
if (scrollpos > 10) { | |
header.classList.add("bg-white"); | |
navaction.classList.remove("bg-white"); | |
navaction.classList.add("gradient"); | |
navaction.classList.remove("text-gray-800"); | |
navaction.classList.add("text-white"); | |
//Use to switch toggleColour colours | |
for (var i = 0; i < toToggle.length; i++) { | |
toToggle[i].classList.add("text-gray-800"); | |
toToggle[i].classList.remove("text-white"); | |
} | |
header.classList.add("shadow"); | |
navcontent.classList.remove("bg-gray-100"); | |
navcontent.classList.add("bg-white"); | |
} else { | |
header.classList.remove("bg-white"); | |
navaction.classList.remove("gradient"); | |
navaction.classList.add("bg-white"); | |
navaction.classList.remove("text-white"); | |
navaction.classList.add("text-gray-800"); | |
//Use to switch toggleColour colours | |
for (var i = 0; i < toToggle.length; i++) { | |
toToggle[i].classList.add("text-white"); | |
toToggle[i].classList.remove("text-gray-800"); | |
} | |
header.classList.remove("shadow"); | |
navcontent.classList.remove("bg-white"); | |
navcontent.classList.add("bg-gray-100"); | |
} | |
}); | |
</script> | |
<script> | |
</script> | |
<script> | |
/*Toggle dropdown list*/ | |
/*https://gist.github.com/slavapas/593e8e50cf4cc16ac972afcbad4f70c8*/ | |
var navMenuDiv = document.getElementById("nav-content"); | |
var navMenu = document.getElementById("nav-toggle"); | |
document.onclick = check; | |
function check(e) { | |
var target = (e && e.target) || (event && event.srcElement); | |
//Nav Menu | |
if (!checkParent(target, navMenuDiv)) { | |
// click NOT on the menu | |
if (checkParent(target, navMenu)) { | |
// click on the link | |
if (navMenuDiv.classList.contains("hidden")) { | |
navMenuDiv.classList.remove("hidden"); | |
} else { | |
navMenuDiv.classList.add("hidden"); | |
} | |
} else { | |
// click both outside link and outside menu, hide menu | |
navMenuDiv.classList.add("hidden"); | |
} | |
} | |
} | |
function checkParent(t, elm) { | |
while (t.parentNode) { | |
if (t == elm) { | |
return true; | |
} | |
t = t.parentNode; | |
} | |
return false; | |
} | |
</script> | |
</body> | |
</html> | |