zuzak/gov.zk

View on GitHub
views/books/index.pug

Summary

Maintainability
Test Coverage
extends ../skeleton
block title
  title #{__('book-club')}
block breadcrumb
  li
    a(href=__('/book-club')) #{__('book-club')}
block content
  .grid-row
    .column-two-thirds
      h1.heading-xlarge #{__('book-club')}
      p.lede #{__('book-club-lede')}

      if state.advertise == 'LONGLIST'
        a(href=__('/book-club/long-list')).button.button-start #{__('long-list-link')}
        p

        p.
          The first step is to create a long list of books so we have something to work with.
          We can then work on narrowing them down.
      else
        if state.advertise == 'SHORTLIST'
          p #{__('shortlist-voting-open')}
          p #{__('shortlist-voting-anonwarning')}
          p #{__('shortlist-voting-instructions')}
          a(href=__('/book-club/short-list')).button.button-start #{__('short-list-link')}
        else if state.advertise == 'READING_LIST'
          a(href=__('/book-club/reading-list')).button.button-start #{__('reading-list-link')}


        if state.allowVoting && state.advertise !== 'SHORTLIST'
          p
          p.
            If you haven't already, you may also <a href="/book-club/short-list">vote on the long list</a>.
        if state.addToLonglist
          p
          if state.allowVoting
            p.
              You may also <a href="/book-club/long-list">add books to the long list</a> to be voted on.
          else
            p.
              You may also <a href="/book-club/long-list">add books to the long list</a>
              ready for the next voting round.


    .column-one-third
      p.data
        .bold-xlarge #{longlist}
        .bold-xsmall #{__('stat-longlisted-books')}
      p.data
        .bold-xlarge #{longlistProblemCount}
        .bold-xsmall #{__('stat-longlist-problems')}
      p.data
        .bold-xlarge #{participants.length}
        .bold-xsmall participants over #{networkCount} IRC networks
      p.data
        .bold-xlarge #{shortlistVotes}
        .bold-xsmall #{__('stat-shortlist-votes')}
      if readingListCount
        p.data
        .bold-xlarge #{readingListCount}
        .bold-xsmall #{__('stat-readinglist-count')}
  .grid-row
    .column-two-thirds
      if state.advertise == 'LONGLIST'
        h2.heading-small #{__('other-actions')}
        ul
          if state.advertise !== 'SHORTLIST'
            if !state.allowVoting
              li.font-small
                a(href=__('/book-club/short-list')) #{__('short-list-link-ro')}
          if state.advertise !== 'READING_LIST'
            li.font-small
              a(href=__('/book-club/reading-list')) #{__('reading-list-link')}