weather update
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 20 Oct 2014 20:58:47 +0000 (16:58 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 20 Oct 2014 20:58:47 +0000 (16:58 -0400)
footer.php
js/app.js
js/custom/weather-widget.js
library/enqueue-scripts.php
library/widget-areas.php

index 22c3f0d..0673707 100644 (file)
@@ -37,8 +37,8 @@
 <?php do_action('foundationPress_before_closing_body'); ?>
 <div style="display: none;">
   <div class="weather-widget">
-    <div class="weather-widget-inner">
-      <iframe scrolling="no" frameborder="0" src="<?php echo home_url(); ?>/wp-content/themes/VisitAlpena/parts/weather.php"></iframe>
+    <div class="weather-widget-inner" style="background-color: lightblue;">
+        <?php dynamic_sidebar("weather-widget"); ?>
     </div>
   </div>
 </div>
index 51fa8b9..fea8051 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -49,10 +49,13 @@ function get_footer_position() {
   if ($('.weather-widget').length && $('.weather-widget-popup').length) {
     $('.weather-widget').appendTo($('.weather-widget-popup'));
     $('.weather-widget-popup > a').on('click', function(){
-      if ('.weather-widget').is(':visible') {
+        console.log('toggle me');
+      if ($('.weather-widget').is(':visible')) {
+          console.log('hidden now showing');
         $('.weather-widget').css({'display': 'none'});
       }
       else {
+          console.log('shown now hiding');
         $('.weather-widget').css({'display': 'block'});
       }
       return false;
index 782cda2..3d5ab00 100644 (file)
@@ -2,10 +2,13 @@ $(function(){
   if ($('.weather-widget').length && $('.weather-widget-popup').length) {
     $('.weather-widget').appendTo($('.weather-widget-popup'));
     $('.weather-widget-popup > a').on('click', function(){
-      if ('.weather-widget').is(':visible') {
+        console.log('toggle me');
+      if ($('.weather-widget').is(':visible')) {
+          console.log('hidden now showing');
         $('.weather-widget').css({'display': 'none'});
       }
       else {
+          console.log('shown now hiding');
         $('.weather-widget').css({'display': 'block'});
       }
       return false;
index 84ac28e..75ba8de 100644 (file)
@@ -11,13 +11,13 @@ if (!function_exists('FoundationPress_scripts')) :
     wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false );
     wp_register_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true );
     wp_register_script( 'custom', get_template_directory_uri() . '/js/custom/sticky-footer.js', array(), '1.0.0', true );
-    wp_register_script( 'custom-weather', get_template_directory_uri() . '/js/custom/weather-widget.js', array(), '1.0.0', true );
+//    wp_register_script( 'custom-weather', get_template_directory_uri() . '/js/custom/weather-widget.js', array(), '1.0.0', true );
 
     // enqueue scripts
     wp_enqueue_script('modernizr');
     wp_enqueue_script('jquery');
     wp_enqueue_script('custom');
-    
+
     wp_enqueue_script('foundation');
     wp_enqueue_script('custom-weather');
 
index 160cb40..0529875 100644 (file)
@@ -18,16 +18,16 @@ function foundationpress_sidebar_widgets() {
       'before_widget' => '<article id="%1$s" class="large-4 columns widget %2$s">',
       'after_widget' => '</article>',
       'before_title' => '<h6>',
-      'after_title' => '</h6>'      
+      'after_title' => '</h6>'
   ));
 
   register_sidebar(array(
     'id' => 'weather-widget',
     'name' => __('Weather widget', 'Foundation Press'),
     'description' => __('Container for pop-up weather widget.', 'FoundationPress'),
-    // The plugin doesn't use these arguments, ugh... Put them in the template
-    //'before_widget' => '<div class="weather-widget">',
-    //'after_widget' => '</div>'
+     //The plugin doesn't use these arguments, ugh... Put them in the template
+    'before_widget' => '<div class="weather-widget">',
+    'after_widget' => '</div>'
   ));
 }