opengovernment/askthem

View on GitHub
app/views/pages/index.html.erb

Summary

Maintainability
Test Coverage
<section>
  <div class="blurb-featureds-and-form">
    <%- if @blurb %>
      <%= render @blurb %>
    <%- end %>

    <%- if @featured_answer %>
      <%= render partial: "answers/featured", object: @featured_answer %>
    <%- end %>

    <%- if @national_person %>
        <%= render partial: "people/featured", object: @national_person %>
    <%- end %>

    <form action="/locator" class="locator-form">
      <input type="text" name="q" id="q" placeholder="Enter City and State, or ZIP code" />
      <input type="submit" value="Search" class="cta-pill" />
    </form>
  </div>
  <header>
    <h2>How It Works</h2>
  </header>
  <ol class="how_it_works">
    <li>
      <img src="/assets/how_1@2x.png" alt="" />
      <p><span class="num">1</span>Find your elected officials and ask them a question.</p>
    </li>
    <li>
      <img src="/assets/how_2@2x.png" alt="" />
      <p><span class="num">2</span>Get your family, friends, and neighbors to support it.</p>
    </li>
    <li>
      <img src="/assets/how_3@2x.png" alt="" />
      <p><span class="num">3</span>The elected official's answer will be publicly displayed.</p>
    </li>
  </ol>

  <ul style="display:none;">
    <% @jurisdictions.each do |jurisdiction| %>
      <li>
        <%= link_to jurisdiction['name'], questions_path(jurisdiction.abbreviation) %>
      </li>
    <% end %>
  </ul>
</section>