index.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {% extends "base.html" %}
  2. {% block title %}Renako{% endblock %}
  3. {% block content %}
  4. <!-- Animación de entrada inicial -->
  5. <div id="initialAnimation" class="fixed inset-0 bg-gray-50 flex items-center justify-center z-50">
  6. <h1 id="initialText" class="text-6xl font-bold text-gray-900 opacity-0 transform scale-95">
  7. Acorta tus <span class="text-primary">enlaces</span>
  8. </h1>
  9. </div>
  10. <!-- Contenido principal (inicialmente oculto) -->
  11. <div id="mainContent" class="space-y-12 opacity-0">
  12. <!-- Hero Section -->
  13. {% include 'components/hero_section.html' %}
  14. <!-- URL Shortener Form -->
  15. {% include 'components/url_shortener_form.html' %}
  16. <!-- Quick Access to My Links -->
  17. <div class="text-center">
  18. <a
  19. href="{{ url_for('my_links') }}"
  20. class="inline-flex items-center px-6 py-3 bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium rounded-xl transition-all duration-200"
  21. >
  22. <i class="fas fa-list mr-2"></i>
  23. Ver mis enlaces
  24. </a>
  25. </div>
  26. </div>
  27. <script>
  28. // Animación de entrada de la página
  29. document.addEventListener('DOMContentLoaded', function() {
  30. const initialAnimation = document.getElementById('initialAnimation');
  31. const initialText = document.getElementById('initialText');
  32. const mainContent = document.getElementById('mainContent');
  33. const header = document.querySelector('header');
  34. // Ocultar header inicialmente
  35. if (header) {
  36. header.style.opacity = '0';
  37. header.style.transform = 'translateY(-20px)';
  38. }
  39. // Secuencia de animación
  40. setTimeout(() => {
  41. // Mostrar texto inicial
  42. initialText.style.transition = 'all 1s ease-out';
  43. initialText.style.opacity = '1';
  44. initialText.style.transform = 'scale(1)';
  45. }, 300);
  46. setTimeout(() => {
  47. // Desvanecer texto inicial
  48. initialText.style.transition = 'all 0.8s ease-in';
  49. initialText.style.opacity = '0';
  50. initialText.style.transform = 'scale(1.1)';
  51. }, 2500);
  52. setTimeout(() => {
  53. // Ocultar overlay de animación inicial
  54. initialAnimation.style.transition = 'opacity 0.5s ease-out';
  55. initialAnimation.style.opacity = '0';
  56. setTimeout(() => {
  57. initialAnimation.style.display = 'none';
  58. }, 500);
  59. // Mostrar header
  60. if (header) {
  61. header.style.transition = 'all 0.8s ease-out';
  62. header.style.opacity = '1';
  63. header.style.transform = 'translateY(0)';
  64. }
  65. // Mostrar contenido principal
  66. mainContent.style.transition = 'all 1s ease-out';
  67. mainContent.style.opacity = '1';
  68. }, 3500);
  69. });
  70. </script>
  71. {% endblock %}