zuzak/gov.zk

View on GitHub
views/about.pug

Summary

Maintainability
Test Coverage
extends skeleton
block title
  title #{__('about-header')}
block breadcrumb
  li
    a(href=__('/about-this-website')) #{__('about-header')}
block content
  h1.heading-large #{__('about-header')}
  p.lede
    span The code for this website is available on 
    a(href="//github.com/zuzak/gov.zk") GitHub
    span .
  .grid-row
    .column-two-thirds
      h2.heading-medium #{__('about-credits')}
      details
        summary
          span.summary #{__('about-codebase-licence')}
        .panel.panel-border-narrow
          h3.heading-small #{__('about-mit-licence')}
          p Copyright © 2016 Douglas Gardner
          p.
            Permission is hereby granted, free of charge to any person
            obtaining a copy of this software and associated documentation
            files (the "Software"), to deal in the Software without restriction,
            including without limitation the rights to use, copy, modify, merge,
            publish, distribute, sublicense, and/or sell copies of the Software,
            and to permit persons to whom the Software is furnished to do so,
            subject to the following conditions:
          ul.list.list-bullet
            li.
              The above copyright notice and this permission notice
              shall be included in all copies or substantial portions
              of the Software.
          strong.bold-xsmall.
            The Software is provided "as is", without warranty
            of any kind, express or implied, including but not
            limited to the warranties of merchantability,
            fitness for a particular purpose and
            noninfringement. In no event shall the authors or
            copyright holders be liable for any claim, damages
            or other liability, whether in an action of
            contract, tort or otherwise, arising from, out of
            or in connection with the Software or the use or
            other dealings in the Software.
      if contributors.length > 0
        h3.heading-small #{__('about-contributors')}
        p #{__('about-contributors-lede')}
        ul.list.list-bullet
          for contributor in contributors
            li #{contributor}
        p #{__('about-contributors-calltoaction')}
      h2.heading-medium #{__('about-credits-thirdparty')}
      p #{__('about-credits-govuk')}

      details
        summary
          span.summary #{__('about-dep-dropdown', {'count': Object.keys(dependencies).length, 'direct': coreDeps.length})}
        table.table-font-xsmall
          thead
            tr
              th #{__('about-dep-name')}
              th #{__('about-dep-version')}
              th #{__('about-dep-licence')}
              th #{__('about-dep-desc')}
          tbody
            for dependency in dependencies
              if typeof dependency !== 'undefined'
                if dependency.name
                  tr
                    td
                      if dependency.repositories.length > 0
                        for repo in dependency.repositories
                          if repo.substring(0, 4) === 'git+'
                            - repo = repo.substring(4)
                          if coreDeps.indexOf(dependency.name) !== -1
                            strong
                              a(href=repo)= dependency.name
                          else
                            a(href=repo)= dependency.name
                      else
                        =dependency.name
                    td= dependency.versions.join(' / ')
                    if dependency.licenses.length > 0
                      td= dependency.licenses.join('/')
                    else
                      td —
                    td= dependency.description
      h3.heading-medium #{__('about-privacy-heading')}
      if req.get('DNT') === '1'
        p #{__('about-privacy-dnt')}
      else
        p #{__('about-privacy-ganalytics')}
      p #{__('about-privacy-cookies')}
      h3.heading-medium #{__('about-git-heading')}
      if state.ahead === 0
        a(style="float:right",href='//travis-ci.org/zuzak/gov.zk')
          img(src='//travis-ci.org/zuzak/gov.zk.svg?branch='+state.branch)
      p #{__('about-git-branch', {branch: state.branch})}
      p
        span #{__('about-git-hash')}  
        if state.ahead === 0
          a.code(href='https://github.com/zuzak/gov.zk/commit/' + hash)= hash
        else
          span.code= hash
      if state.issues
        .grid-row
          .column.column-one-third
              p.data
                .bold-xlarge #{state.dirty}
                .bold-xsmall #{__('about-stat-dirty')}
          .column.column-one-third
              p.data
                .bold-xlarge #{state.untracked}
                .bold-xsmall #{__('about-stat-untracked')}
          .column.column-one-third
              p.data
                .bold-xlarge #{state.ahead}
                .bold-xsmall #{__('about-stat-ahead')}
      else
        p #{__('about-nochanges')}
      h3.heading-medium #{__('about-i18n-header')}
      - catalog = getCatalog()
      table
        thead
          tr
            th #{__('about-i18n-table-language')}
            th #{__('about-i18n-table-keys')}
            th(colspan="2") #{__('about-i18n-table-progress')}
        - max = Object.keys(catalog['en']).length
        for lang, code in catalog
          - curr = Object.keys(lang).length
          tr
            td
              a(href=__('/about-this-website/internationalization/:code').replace(':code',code)) #{__('about-i18n-language', {name: __('about-i18n-lang-'+code), code})}
            td #{__('about-i18n-progress', {curr, max})}
            td
              meter(min=0,max=max,value=curr)
            td.numeric #{__('about-i18n-percentage', {percentage: Math.round(100*curr/max)})}
    .column-one-third
      img(src='/arms.png')