mikel333 / restylegc

Automatically exported from code.google.com/p/restylegc
0 stars 0 forks source link

Examples of restylegc in Action #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hey just wanted to get a thread going to see if folks would like to link to 
examples of how they've employed restylegc. I'll start:

http://clevelandfmc.org
(click on "Calendar")

This one took quite a bit of work. To make the Google Calendar responsive, i 
ultimately embedded both a "month" view and an "agenda" view, which display 
according to the device size. This post was my inspiration:

https://profromgo.com/blog/google-calendar-responsive/

The site is built with Bootstrap 3, so this bit of jquery seems to be working 
well:

<pre><code>var monthSRC = '/restylegc.php?src=[insert-month-src]';
var agendaSRC = '/restylegc.php?src=[insert-agenda-src];';

if ($(".hidden-xs").css("display") != "none" ){
  $('iframe#month').attr('src', monthSRC);
}
if ($(".visible-xs").css("display") != "none" ){
  $('iframe#agenda').attr('src', agendaSRC);
}

$(window).resize(function(){    
  if ($(".hidden-xs").css("display") != "none" ){
    $('iframe#month').attr('src', monthSRC);
  }
    if ($(".visible-xs").css("display") != "none" ){
      $('iframe#agenda').attr('src', agendaSRC);
  }
});</code></pre>

Original issue reported on code.google.com by stephen....@gmail.com on 21 Oct 2014 at 5:51