Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Latest commit

 

History

History
63 lines (54 loc) · 2 KB

candidates.md

File metadata and controls

63 lines (54 loc) · 2 KB
permalink title
/candidates
Campaign Statements

{% if site.campaign-2019.size == 0 %}

We're just getting started!

Hey, we just launched the election and are waiting for our first election statements. Interested in joining the race? {% else %}

Here are the campaign statements for our candidates.

Interested in joining the race? Here's how to get started.

Gitter

{% assign candidates = site.campaign-2019 %}

{% for candidate in candidates %} {% unless candidate.appointed %} {{ candidate.appointed }}

{{ candidate.title }}

{% if candidate.image %} {% else %} {% endif %} Learn More {% endunless %} {% endfor %}

{% endif %}

<script type="text/javascript"> document.addEventListener('DOMContentLoaded', function() { var cookieName = 'candidates'; var cookie = Cookies.getJSON(cookieName); var ul = document.querySelector('section.card-container'); var values = new Array(); for (var i = 0; i < ul.children.length; i++) { values.push(Math.random() * i | 0); } console.log(cookie); if (cookie != null && values.length == cookie.values.length) { /* reset if candidate lengths change */ values = cookie.values; } else { Cookies.set(cookieName, { values : values }, { expires: 1 /*days*/ }); } for(var i=0; i < values.length; i++) { ul.appendChild(ul.children[values[i] | 0]); } }, false); </script>