<commit_before>var domBuilder = require('dombuilder');
var ui = require('./ui.js');
var data = require('./data.js');

ui.push(repoList());
// var repo = data.repos[1];
// ui.push(historyList(repo));
// var hash = repo.db.refs["refs/heads/master"];
// var commit = repo.db.objects[hash].body;
// ui.push(commitPage(repo, commit));
// var tree = repo.db.objects[commit.tree].body;
// ui.push(filesList(repo, tree));

function onclick(handler) {
  var args = Array.prototype.slice.call(arguments, 1);
  return function (evt) {
    evt.preventDefault();
    return handler.apply(this, args);
  };
}

function repoList() {
  return domBuilder(["section.page", {"data-position": "current"},
    ["header",
      ["button", {onclick:onclick(add)}, "➕"],
      ["h1", "Git Repositories"]
    ],
    ["ul.content.header", data.repos.map(function (repo) {
      return ["li", { href:"#", onclick: onclick(load, repo) },
        [".icon.right", "❱"],
        ["p", repo.name],
        ["p", repo.description]
      ];
    })]
  ]);

  function load(repo) {
    ui.push(historyList(repo));
  }

  function add() {
    ui.push(addPage());
  }
}

function addPage() {
  return domBuilder(["section.page",
    ["header",
      ["button.back", {onclick: ui.pop}, "❰"],
      ["h1", "Clone Repository"]
    ],
    ["content.header",
      ["h2", "TODO: Implement me"]
    ]<commit_msg>Use unicode plus that the device actually has<commit_after>var domBuilder = require('dombuilder');
var ui = require('./ui.js');
var data = require('./data.js');

ui.push(repoList());
// var repo = data.repos[1];
// ui.push(historyList(repo));
// var hash = repo.db.refs["refs/heads/master"];
// var commit = repo.db.objects[hash].body;
// ui.push(commitPage(repo, commit));
// var tree = repo.db.objects[commit.tree].body;
// ui.push(filesList(repo, tree));

function onclick(handler) {
  var args = Array.prototype.slice.call(arguments, 1);
  return function (evt) {
    evt.preventDefault();
    return handler.apply(this, args);
  };
}

function repoList() {
  return domBuilder(["section.page", {"data-position": "current"},
    ["header",
      ["button", {onclick:onclick(add)}, "⊕"],
      ["h1", "Git Repositories"]
    ],
    ["ul.content.header", data.repos.map(function (repo) {
      return ["li", { href:"#", onclick: onclick(load, repo) },
        [".icon.right", "❱"],
        ["p", repo.name],
        ["p", repo.description]
      ];
    })]
  ]);

  function load(repo) {
    ui.push(historyList(repo));
  }

  function add() {
    ui.push(addPage());
  }
}

function addPage() {
  return domBuilder(["section.page",
    ["header",
      ["button.back", {onclick: ui.pop}, "❰"],
      ["h1", "Clone Repository"]
    ],
    ["content.header",
      ["h2", "TODO: Implement me"]
    ]
{'fraction_non_alphanumeric': 0.217485549132948, 'fraction_numerical': 0.0036127167630057803, 'mean_word_length': 3.246932515337423, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3460064', 'n_tokens_mistral': 957, 'n_tokens_neox': 948, 'n_words': 189}