<commit_before>%"""
Base template, with site layout and style.

Template arguments:
  title      page title, if any
  base       main content
  period     period for events, if any (day like "2020-02-20" or month like "2020-02")
  days       list of available days
  input      "mouse"|"keyboard"
  table      events table shown, moves|clicks|scrolls|keys|combos
  dbinfo     [(database info label, value)]

@author      <NAME>
@created     07.04.2015
@modified    21.05.2015
%"""
%WEBROOT = get_url("/")
%period, days = get("period", None), get("days", [])
<!DOCTYPE html>
<html>
<head>
  <title>{{ conf.Title }}{{ " - " + title if get("title") else "" }}</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="Author" content="<NAME>">
  <link rel="icon" type="image/x-icon" href="{{ WEBROOT }}static/icon.ico" />
  <link rel="stylesheet" href="{{ WEBROOT }}static/site.css" />
  <script src="{{ WEBROOT }}static/heatmap.min.js"></script>
</head>
<body>
<div id="header" style="position: relative;">

  <span id="headerlinks">
    <a href="{{ WEBROOT }}" id="indexlink">{{ conf.Title }}</a>
    <span id="inputlinks">
%for x in ["mouse", "keyboard"]:
    <a href="{{ get_url("/<input>", input=x) }}">{{ x }}</a>
%end # for x
    </span>
  </span>

%if days:
<span id="daysection">
    %prevperiod, nextperiod = None, None
    %if period and len(period) < 8:
    %    prevperiod = next((x["day"][:7] for x in days[::-1] if x["day"][:7] < period), None)
    %    nextperiod = next((x["day"][:7] for x in days       if x["day"][:7] > period), None)
    %else:
    %    dayidx = next((i for i, x in enumerate(days) if x["day"] == period), None)
    %    if dayidx is not None:
    %        prevperiod, nextperiod = (days[i]["day"] if 0 <= i < len(days) else None for i in [dayidx-1, dayidx+1])
    %    end # if dayidx is not None
    %    prevperiod = prevperiod or None if period else days[-1]["day"]
    %end # if period and len(period) < 8
    %if prevperiod:
  <a href="{{ get_url("/%s/<table>/<period>" % input, table=table, period=prevperiod) }}">&lt; {{ prevperiod }}</a>
    %end # if prevperiod

  <select id="dayselector">
    %if not period or not events:
    <option>- period -</option>
    %end # if not period
    %prevmonth = None
    %for d in days[::-1]:
        %if prevmonth != d["day"][:7]:
    <option{{! ' selected="selected"' if period == d["day"][:7] else "" }}>{{ d["day"][:7] }}</option>
        %end # if prevmonth != d["day"][:7]
    <option{{! ' selected="selected"' if period == d["day"] else "" }}>{{ d["day"] }}</option>
        %prevmonth = d["day"][:7]
    %end # for d
  </select>

    %if nextperiod:
  <a href="{{ get_url("/%s/<table>/<period>" % input, table=table, period=nextperiod) }}">{{ nextperiod }} &gt;</a>
    %end # if nextperiod
</span>
%end # if days

</div>

<div id="content" style="position: relative;">
{{! base }}
</div>

<div id="overlay">
  <div id="overshadow"></div>
  <div id="overcontent">
    <table>
%for k, v in dbinfo:
      <tr><td>{{ k }}:</td><td>{{ v }}</td></tr>
%end # for k, v
    </table>
    <button id="overlayclose">OK</button>
  </div>
</div>

<div id="footer">
<div>
  <a href="#" id="overlaylink">database info</a>
  Mouse and keyboard input visualizer. &copy; 2015 <NAME>. <a href="{{ conf.HomepageUrl }}" target="_blank">github</a>
</div>
</div>

<script type="text/javascript">
window.addEventListener("load", function() {
  var elm_overlay = document.getElementById("overlay");
  var toggleOverlay = function(evt) {
    elm_overlay.classList.toggle("visible");
    evt && evt.preventDefault();
  };

  document.getElementById("overlaylink").addEventListener("click", toggleOverlay);
  document.getElementById("overlayclose").addEventListener("click", toggleOverlay);
  document.getElementById("overshadow").addEventListener("click", toggleOverlay);
  document.body.addEventListener("keydown", function(evt) {
    if (evt.keyCode == 27 && elm_overlay.classList.contains("visible")) toggleOverlay();
  });
<commit_msg>Removed copyright notice from web UI.<commit_after>%"""
Base template, with site layout and style.

Template arguments:
  title      page title, if any
  base       main content
  period     period for events, if any (day like "2020-02-20" or month like "2020-02")
  days       list of available days
  input      "mouse"|"keyboard"
  table      events table shown, moves|clicks|scrolls|keys|combos
  dbinfo     [(database info label, value)]

@author      <NAME>
@created     07.04.2015
@modified    24.01.2021
%"""
%WEBROOT = get_url("/")
%period, days = get("period", None), get("days", [])
<!DOCTYPE html>
<html>
<head>
  <title>{{ conf.Title }}{{ " - " + title if get("title") else "" }}</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="Author" content="<NAME>jaak">
  <link rel="icon" type="image/x-icon" href="{{ WEBROOT }}static/icon.ico" />
  <link rel="stylesheet" href="{{ WEBROOT }}static/site.css" />
  <script src="{{ WEBROOT }}static/heatmap.min.js"></script>
</head>
<body>
<div id="header" style="position: relative;">

  <span id="headerlinks">
    <a href="{{ WEBROOT }}" id="indexlink">{{ conf.Title }}</a>
    <span id="inputlinks">
%for x in ["mouse", "keyboard"]:
    <a href="{{ get_url("/<input>", input=x) }}">{{ x }}</a>
%end # for x
    </span>
  </span>

%if days:
<span id="daysection">
    %prevperiod, nextperiod = None, None
    %if period and len(period) < 8:
    %    prevperiod = next((x["day"][:7] for x in days[::-1] if x["day"][:7] < period), None)
    %    nextperiod = next((x["day"][:7] for x in days       if x["day"][:7] > period), None)
    %else:
    %    dayidx = next((i for i, x in enumerate(days) if x["day"] == period), None)
    %    if dayidx is not None:
    %        prevperiod, nextperiod = (days[i]["day"] if 0 <= i < len(days) else None for i in [dayidx-1, dayidx+1])
    %    end # if dayidx is not None
    %    prevperiod = prevperiod or None if period else days[-1]["day"]
    %end # if period and len(period) < 8
    %if prevperiod:
  <a href="{{ get_url("/%s/<table>/<period>" % input, table=table, period=prevperiod) }}">&lt; {{ prevperiod }}</a>
    %end # if prevperiod

  <select id="dayselector">
    %if not period or not events:
    <option>- period -</option>
    %end # if not period
    %prevmonth = None
    %for d in days[::-1]:
        %if prevmonth != d["day"][:7]:
    <option{{! ' selected="selected"' if period == d["day"][:7] else "" }}>{{ d["day"][:7] }}</option>
        %end # if prevmonth != d["day"][:7]
    <option{{! ' selected="selected"' if period == d["day"] else "" }}>{{ d["day"] }}</option>
        %prevmonth = d["day"][:7]
    %end # for d
  </select>

    %if nextperiod:
  <a href="{{ get_url("/%s/<table>/<period>" % input, table=table, period=nextperiod) }}">{{ nextperiod }} &gt;</a>
    %end # if nextperiod
</span>
%end # if days

</div>

<div id="content" style="position: relative;">
{{! base }}
</div>

<div id="overlay">
  <div id="overshadow"></div>
  <div id="overcontent">
    <table>
%for k, v in dbinfo:
      <tr><td>{{ k }}:</td><td>{{ v }}</td></tr>
%end # for k, v
    </table>
    <button id="overlayclose">OK</button>
  </div>
</div>

<div id="footer">
<div>
  <a href="#" id="overlaylink">database info</a>
  Mouse and keyboard input visualizer. <a href="{{ conf.HomepageUrl }}" target="_blank">github</a>
</div>
</div>

<script type="text/javascript">
window.addEventListener("load", function() {
  var elm_overlay = document.getElementById("overlay");
  var toggleOverlay = function(evt) {
    elm_overlay.classList.toggle("visible");
    evt && evt.preventDefault();
  };

  document.getElementById("overlaylink").addEventListener("click", toggleOverlay);
  document.getElementById("overlayclose").addEventListener("click", toggleOverlay);
  document.getElementById("overshadow").addEventListener("click", toggleOverlay);
  document.body.addEventListener("keydown", function(evt) {
    if (evt.keyCode == 27 && elm_overlay.classList.contains("visible")) toggleOverlay();
  });

{'fraction_non_alphanumeric': 0.20687948527592182, 'fraction_numerical': 0.012868101954961643, 'mean_word_length': 3.7407624633431085, 'pattern_counts': {'":': 0, '<': 156, '<?xml version=': 0, '>': 148, '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': '3796125', 'n_tokens_mistral': 2810, 'n_tokens_neox': 2762, 'n_words': 744}