Difference between revisions of "Template:RUM-UPRM/Nav"

Line 1: Line 1:
{{RUM-UPRM}}
+
 
  
 
<html>
 
<html>
Line 83: Line 83:
 
             </div>
 
             </div>
 
         </nav>
 
         </nav>
 
        <!-- Bootstrap core JS-->
 
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
 
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"></script>
 
        <!-- Third party plugin JS-->
 
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
 
 
        <!-- jquery script -->
 
        <!-- <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>-->
 
 
        <!-- Core theme JS-->
 
        <script>
 
 
            /*!
 
              * Start Bootstrap - Grayscale v6.0.2 (https://startbootstrap.com/themes/grayscale)
 
              * Copyright 2013-2020 Start Bootstrap
 
              * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-grayscale/blob/master/LICENSE)
 
              */
 
 
            (function ($) {
 
                "use strict"; // Start of use strict
 
 
                // Smooth scrolling using jQuery easing
 
                $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function () {
 
                    if (
 
                        location.pathname.replace(/^\//, "") ==
 
                            this.pathname.replace(/^\//, "") &&
 
                        location.hostname == this.hostname
 
                    ) {
 
                        var target = $(this.hash);
 
                        target = target.length
 
                            ? target
 
                            : $("[name=" + this.hash.slice(1) + "]");
 
                        if (target.length) {
 
                            $("html, body").animate(
 
                                {
 
                                    scrollTop: target.offset().top - 70,
 
                                },
 
                                1000,
 
                                "easeInOutExpo"
 
                            );
 
                            return false;
 
                        }
 
                    }
 
                });
 
 
                // Closes responsive menu when a scroll trigger link is clicked
 
                $(".js-scroll-trigger").click(function () {
 
                    $(".navbar-collapse").collapse("hide");
 
                });
 
 
                // Activate scrollspy to add active class to navbar items on scroll
 
                $("body").scrollspy({
 
                    target: "#mainNav",
 
                    offset: 100,
 
                });
 
 
                // Collapse Navbar
 
                var navbarCollapse = function () {
 
                    if ($("#mainNav").offset().top > 100) {
 
                        $("#mainNav").addClass("navbar-shrink");
 
                    } else {
 
                        $("#mainNav").removeClass("navbar-shrink");
 
                    }
 
                };
 
                // Collapse now if page is not at top
 
                navbarCollapse();
 
                // Collapse the navbar when page is scrolled
 
                $(window).scroll(navbarCollapse);
 
            })(jQuery); // End of use strict
 
 
            // When video ends...
 
            $('#globalView').bind('ended', function(){
 
              //Fade out video
 
              $(this).parent().fadeOut();;
 
              //Typewrite subtitle
 
              setTimeout(typeWriter,150);
 
            });
 
 
        </script>
 
        <!--Preloader scripts-->
 
        <script src="https://2020.igem.org/wiki/index.php?
 
title=Template:RUM-UPRM/jquery.min.js&action=raw&ctype=text/javascript"></script>
 
        <script src="https://2020.igem.org/wiki/index.php?
 
title=Template:RUM-UPRM/modernizr.js&action=raw&ctype=text/javascript"></script>
 
        <script>
 
 
              //Preloader
 
              // Wait for window load
 
              $(window).load(function() {
 
                  // Animate loader off screen
 
                  $(".se-pre-con").fadeOut("slow");;
 
                  document.getElementById("globalView").play();
 
                  // Initiate subtitle space
 
                  document.getElementById("autoTyper").innerHTML += ' ';
 
              });
 
 
        </script>
 
        <script>
 
 
            var i = 0;
 
            var txt = 'Synthesizing a better world. ';
 
            var speed = 75;
 
 
            function typeWriter() {
 
              if (i < txt.length) {
 
                document.getElementById("autoTyper").innerHTML += txt.charAt(i);
 
                i++;
 
                setTimeout(typeWriter, speed);
 
              }
 
            }
 
 
        </script>
 
        <script>
 
            $("#HQ_page").attr('id','');
 
        </script>
 
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 23:21, 27 October 2020


RUM-UPRM Wiki Source Code