team178 / team178.github.io

The 2nd Law Enforcers' Website
http://farmingtonrobotics.org
Mozilla Public License 2.0
14 stars 17 forks source link

Make link to raffle not show up on raffle page #112

Closed TJScalzo closed 8 years ago

TJScalzo commented 8 years ago

I think something like this would work: (?)

      $("#percent").html("Tickets sold: " + soldPercentShort + "% | $" + money + "+ earned | "+ timeLeft +"{% if page.layout != 'raffle' %}| <a class='raffle-link' href='/raffle'>About the raffle >></a>{% endif %}");

I'm not sure if using Liquid would work in Javascript but I feel like it should.

gisellegk commented 8 years ago

@TJScalzo I'm not sure if Liquid will work in Javascript. I feel like it won't, but it's definitely worth a shot.

TJScalzo commented 8 years ago

@gisellegk Yeah, I'm not sure. I feel like it should because it's injecting the Liquid into the HTML. The problem it probably will run into is the HTML loads after the Liquid runs through it to check for stuff to do. I'm going to test it and see.

TJScalzo commented 8 years ago

I've found a solution!