Files @ 448aa7255869
Branch filter:

Location: symposion_app/static/src/pyconau2017/js/pycon-main.js

448aa7255869 2.0 KiB application/javascript Show Annotation Show as Raw Download as Raw
Nick Seidenman (N6)
Added favicon and special events pdf to bring this up to look/feel of wooden site.

Removed additional (and completely superfluous) styling in app.css that was otherwise making
our site look gluggy.

Mod'd fixtures (and updated db) to reflect PyCon rather than PinaxCon.
$(document).ready(function(){

    // Place background menu so it extends to one side of the page only.
    function positionBackground(){
        var position = $('.nav').offset();
        var height = $('.nav').height();
        var width = $('html').width() - position.left -20;

        $('.nav-bg').height(height).css({
            left: position.left + 20,
            width: width
        });
    }

    positionBackground();


    // Place dark footer

    function positionFooter(){
        var position = $('.cc-credit').offset();
        var width = $('html').width() - position.left - 40;

        $('.dark-bottom-footer').css({
            left: position.left + 40,
            width: width
        });
    }

    positionFooter();


    $(window).resize(function(){
        positionBackground();
        positionFooter();
    });


    // Toggle mobile menu

    $('.toggle-mobile-menu').click(function(e){
        e.preventDefault();
        $('.mobile-nav').slideToggle();
    });


    // Enable Carousels

    $("#speakers").owlCarousel({
        items: 4,
        autoPlay: 3000
    });

    $("#sponsors").owlCarousel({
        items: 4,
        autoPlay: 3000
    });



    // Embed Google Map

    function initialize() {

        var myLatLng = new google.maps.LatLng(-27.468301, 153.023122)

        var mapOptions = {
            zoom: 14,
            center: myLatLng
        };

        var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

        var infowindow = new google.maps.InfoWindow({
            content: 'Hotel Pullman Brisbane - King George Square'
        });

        var marker = new google.maps.Marker({
            position: myLatLng,
            map: map,
            title: 'Hotel Pullman Brisbane - King George Square'
        });

        google.maps.event.addListener(marker, 'click', function() {
            infowindow.open(map,marker);
        });
    }

    google.maps.event.addDomListener(window, 'resize', initialize);
    google.maps.event.addDomListener(window, 'load', initialize);

});