extends ../layout

//- http://fullcalendar.io/docs/usage/

block content
  if !error
    .row.page-header
      h3 All Events
    .row
      p
        #events-calendar
    script.
      // make this object available to frontend js for rendering in calendar
      window._events = !{JSON.stringify(events).replace(/<\//g, "<\\/")}
    h1 Upcoming events list
    table.table
      thead
        tr
          th Event name
          th Date & time
          th Venue
          th Address
          th Meetup page link
      tbody
        each event in upcomingevents
          tr
            td #{event.title}
            td #{event.start}
            td #{event.venue}
            td #{event.address}, #{event.city}
            td
              a(href='#{event.url_page}', target='_blank') Event Meetup Page

  else
    h3 There was a problem fetching your events from Meetup
extends ../layout

//- http://fullcalendar.io/docs/usage/

block content
  if !error
    .row.page-header
      h3 All Events
    .row
      p
        #events-calendar
    script.
      // make this object available to frontend js for rendering in calendar
      window._events = !{JSON.stringify(events).replace(/<\//g, "<\\/")}
    h1 Upcoming events list
    table.table
      thead
        tr
          th Event name
          th Date & time
          th Venue
          th Address
          th
      tbody
        each event in upcomingevents
          tr
            td #{event.title}
            td #{event.start}
            td #{event.venue}
            td #{event.address}, #{event.city}
            td
              a(href='#{event.url_page}', class="mu-rsvp-btn") RSVP

  else
    h3 There was a problem fetching your events from Meetup

  script.
    ! function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (!d.getElementById(id)) {
          js = d.createElement(s);
          js.id = id;
          js.async = true;
          js.src = "https://a248.e.akamai.net/secure.meetupstatic.com/s/script/2012676015776998360572/api/mu.btns.js?id=hrb1idk1jr1295hel65ak1ku9";
          fjs.parentNode.insertBefore(js, fjs);
      }
    }(document, "script", "mu-bootjs");

Embed Meetup.com RSVP onto event page for each event. NOTE: must change API secret when page is deployed.
Embed Meetup.com RSVP onto event page for each event. NOTE: must change API secret when page is deployed.
