diff --git a/README.md b/README.md new file mode 100644 index 0000000..c6cc5cb --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Giving Grid Widget for WordPress + +A super simple WordPress widget for Giving Grid. + +Made with love in Knoxville, TN by Right Click Design, LLC \ No newline at end of file diff --git a/givinggrid-widget-plugin.php b/givinggrid-widget-plugin.php new file mode 100644 index 0000000..a1a7b69 --- /dev/null +++ b/givinggrid-widget-plugin.php @@ -0,0 +1,68 @@ + 'givinggrid_widget', 'description' => 'This is the Giving Grid Widget' ); + parent::__construct( 'givinggrid_widget', 'Giving Grid Widget', $widget_options ); + } + + public function widget( $args, $instance ) { + $title = apply_filters( 'widget_title', $instance[ 'title' ] ); + $givinggrid_id = $instance[ 'givinggrid_id' ]; + $blog_title = get_bloginfo( 'name' ); + $tagline = get_bloginfo( 'description' ); + + echo $args['before_widget'] . $args['before_title'] . $title . $args['after_title']; ?> + +
+ + +

+
+ +

+

+
+ +

+ \ No newline at end of file diff --git a/js/givinggrid.js b/js/givinggrid.js new file mode 100644 index 0000000..af7317d --- /dev/null +++ b/js/givinggrid.js @@ -0,0 +1,5 @@ +var widgetContainer=document.getElementById("givinggrid-widget"); +if(widgetContainer){var gid=widgetContainer.getAttribute("data-gid"),wol=widgetContainer.getAttribute("data-wol");if(gid){var widgetContainerWidth=widgetContainer.offsetWidth,frameHeight=800,frameScroll="auto",frameWidth="100%";179>widgetContainerWidth?(frameHeight=390,frameScroll="no"):221>widgetContainerWidth?(frameHeight=430,frameScroll="no"):232>widgetContainerWidth?(frameHeight=560,frameScroll="no"):248>widgetContainerWidth?(frameHeight=540,frameScroll="no"):269>widgetContainerWidth?(frameHeight= +540,frameScroll="no"):309>widgetContainerWidth?(frameHeight=575,frameScroll="no"):321>widgetContainerWidth?(frameHeight=570,frameScroll="no"):412>widgetContainerWidth?(frameHeight=575,frameScroll="no"):531>widgetContainerWidth?(frameHeight=560,frameScroll="no"):550>widgetContainerWidth?(frameHeight=555,frameScroll="no"):560>widgetContainerWidth?(frameHeight=520,frameScroll="no"):594>widgetContainerWidth?(frameHeight=300,frameScroll="no"):717>widgetContainerWidth?(frameHeight=325,frameScroll="no"): +755>widgetContainerWidth?(frameHeight=320,frameScroll="no",381592==gid&&(frameHeight=800,frameScroll="yes")):frameHeight=800;widgetContainer.innerHTML=1==wol&&370>widgetContainerWidth?'Wall of Love':1==wol&&755>widgetContainerWidth?'Wall of Love':''}}; \ No newline at end of file