doctype html
html(lang="en")
  head
    meta(charset="utf-8")
    meta(name="viewport", content="width=device-width, initial-scale=1.0")
    meta(name="version", content="#{pkg.version}")

    link(rel="stylesheet", href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css")
    link(rel="stylesheet", href="app/dist/ng-alertify.css")
    link(rel="stylesheet", href="app/dist/ng-http-estimate.css")

    style(type="text/css").
      .smaller {
        font-size: smaller;
      }
      footer {
        position: absolute;
        bottom: 0;
      }
      .faint {
        color: #aaa;
      }


    script(src="//code.jquery.com/jquery-2.1.4.min.js")
    script(src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js")
    script(src="//cdn.rawgit.com/philbooth/check-types.js/7c156cc34f43dbfdd8d4ae873b27700b311b7483/src/check-types.min.js")
    script(src="//cdn.rawgit.com/bahmutov/lazy-ass/gh-pages/index.js")
    script(src="//cdn.rawgit.com/kensho/check-more-types/master/check-more-types.min.js")
    script(src="app/dist/ng-alertify.js")
    script(src="app/dist/ng-http-estimate.js")
    script(src="app/git-pages-app.js")
    title git-pages
  body(ng-app="git-pages")
    http-estimate
    .row
      .small-12.large-centered.columns
        h1 git-pages
        table(ng-controller="pullController")
          thead
            tr
              td(width="200") name
              td is git
              td(width="300") git or folder
              td branch
              td link
              td pull
              td pulled commit
          tbody
            each repo, name in repos
              tr
                td= name
                if repo.git
                  td yes
                else
                  td no
                td
                  if repo.git
                    a(href="https://github.com/#{repo.git}/tree/#{repo.branch}",
                      target="_blank",
                      title="Open the git page") #{repo.git}
                  else if repo.folder
                    span #{repo.folder}
                td= repo.branch
                td
                  a(href="./#{repo.path}/", target="_blank", title="Open the static page in the new tab") open
                td
                  a(title="Pull latest code from the repo", ng-click="pull('#{name}')") pull
                td
                  if repo.commit
                    #{repo.commit.hash.substr(0, 7)} (#{repo.commit.committerDateRel})
    .row
      include partials/footer


