zuzak/gov.zk

View on GitHub
views/bucket.pug

Summary

Maintainability
Test Coverage
//- Used for testing: [squeamish ossifrage]
extends skeleton
block title
  title #{__('cs-title')}
block breadcrumb
  li= __('cs-title')
block js
  script(src="bucket.js")
block content
  .grid-row
    .column-two-thirds
      h1.heading-xlarge #{__('cs-title')}
  .grid-row
    .column-two-thirds
      if (scram !== 'ok')
        .error-summary
          span.error-summary-heading.heading-medium #{__('cs-scram-alert-heading', scram)}
          p #{__('cs-scram-alert-text', scram)}
      h2.heading-medium #{__('cs-bucket-header')}
      h3.heading-small #{__('cs-bucket-header-current')}
      ol.list.list-number
        - let i = 0
        each item in inventory.current
          - i++
          li
            span.bucket-item= item.item
            if item.nick
              span.text-secondary  (#{item.nick})
        while i < 20
          - i++
          li.text-secondary.bucket-empty= __('cs-bucket-emptyslot')
      h3.heading-small #{__('cs-bucket-header-previous')}
      ol.list.list-number.truncateable
        each item in inventory.old
          li
            span.bucket-item= item.item
            if item.nick
              span.text-secondary &nbsp;(#{item.nick})
      h2.heading-medium #{__('cs-quotes-header')}
      each category in Object.keys(quotes)
        if req.user && req.user === category
          div.panel.panel-border-wide
            h3.heading-small= category
            ul.list.list-bullet
              each quote in quotes[category]
                li !{__('cs-quote-wrapper', {quote})}
        else
          div.panel.panel-border-wide(style="border-color: transparent")
            h3.heading-small= category
            ul.list.list-bullet
              each quote in quotes[category]
                li !{__('cs-quote-wrapper', {quote})}
    .column-one-third
      .grid-row
        .data
          span.data-item.bold-xxlarge= ofn.toLocaleString('en-GB')
          span.data-item.bold-xsmall= __('cs-urlcount')
        .data
          span.data-item.bold-xxlarge= scrabble.length.toLocaleString('en-GB')
          span.data-item.bold-xsmall= __('cs-scrabble-count')
      .grid-row
        a(href=__('/civilservant/console')) Get console
      .grid-row
        a(href=__('/civilservant/scram')) Emergency shutdown
  .grid-row
    .column-full
      h2.heading-medium #{__('cs-scrabble-header')}
      ol.list.list-number.columns
        each word in scrabble
          li: span.code= word