var fanxheTeam = {
students: 'Fany', 'Anxhe',
coaches: 'Tapia', 'Nacho',
crowdContact: 'Vic',
coachCompany: 'Crowd Interactive',
supervisor: 'Katrin',
livingStyleGuide: 'Haguenburger', 'Jen',
team: function(){
return 'Fanxhe Team is : ' + this.students + ', ' + this.coaches + ', ' + this.crowdContact + ', ' + this.coachCompany + ', '
+ this.supervisor + ' ' + this.livingStyleGuide + ' ^_^';
}
}

More examples.

Sep 15, 2015

Today we started our day with a standup and we planned our day and we accomplish the following:

We researched how to load the page with LSG examples (the source code and the result) , we triggered an ajax request on page load sending the data loaded in the form to generate the style guide.

var ajax = function(){
  var req = new XMLHttpRequest();
  req.open('POST', '/lsg', true);
  req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
  req.onreadystatechange = function (e) {
    if(req.readyState == 4){
      if(req.status == 200){
        createIframe(req.response);
      }
      else{
        console.error("Error loading page\n");
        createDivError();
      }
    }
  }
  req.send("code_lsg=" + encodeURI(document.querySelector('textarea').value));
}
document.addEventListener('DOMContentLoaded', function() {
  ajax();
});

We added more examples that are shown randomly, now we have:

EXAMPLES = %w{ colors fonts markdown }

get '/' do
  doc = LivingStyleGuide::Document.new do
    ERB.new(File.read("#{File.dirname(__FILE__)}/templates/#{EXAMPLES.sample}.lsg.erb")).result
  end
  erb :index, :locals => { :doc => doc }
end

      var students = ["Fany", "Anxhe"]
var coaches = ["Tapia", "Nacho"];
var crowdContact = "Vic";
var coachCompany ="Crowd Interactive";
var supervisor = "Katrin";
var livingStyleGuide = ["Haguenburger", "Jen"];
fanxheTeam = [students, coaches,crowdContact, coachCompany, supervisor, mentor, livingStyleGuide];
console.log('We are the FanxheTeam: ' + fanxheTeam + 'We participating in Rails Girls Summer of COde 2015.');
>We are the FanxheTeam: Fany, Anxhe, Tapia, Nacho, Vic, Crowd Interactive, Katrin, Haguenburguer.
We participating in Rails Girls Summer of Code 2015.