<commit_before>/** @jsx React.DOM */
/* global module, require */
(function() {
  'use strict';
  var React = require('react/addons'),
      Activity, LightBox, Progress;

  /**
   * Display an overlay with a CSS3 animation indicating ongoing activty.
   *
   * @property {string} message - Message to display below the activity
   *    animation
   */
  Activity = React.createClass({
    render: function() {
      return (
        <div className="overlay activity">
          <div className="animation">
            <div className="bounce"></div>
            <div className="bounce"></div>
          </div>
          <p className="text">{this.props.message}</p>
        </div>
      );
    }
  });

  /**
   * Display image in lightbox overlay.
   *
   * @property {function} onClose - Callback function for when the lightbox is closed.
   * @property {url} src - Source URL for the image to be displayed
   */
  LightBox = React.createClass({
    render: function() {
      return (
        <a onClick={this.props.onClose} className="overlay lightbox">
          <img src={this.props.src} />
        </a>
      );
    }
  });

  Progress = React.createClass({
      render: function() {
        var widthPercent;
        if (this.props.progress > 1) widthPercent = this.props.progress | 0;
        else widthPercent = (this.props.progress*100) | 0;
        return (
          <div className="overlay spreads-progress">
            <div className="progress">
              <span className="meter" style={{width: widthPercent+"%"}}></span>
              <span className="status">{this.props.statusMessage}</span>
            </div>
          </div>
        );
      }
  });

  module.exports = {
      Activity: Activity,
      LightBox: LightBox,
      Progress: Progress
  }
}());
<commit_msg>web: Open lightbox images in new tab/window on click (#85)<commit_after>/** @jsx React.DOM */
/* global module, require */
(function() {
  'use strict';
  var React = require('react/addons'),
      Activity, LightBox, Progress;

  /**
   * Display an overlay with a CSS3 animation indicating ongoing activty.
   *
   * @property {string} message - Message to display below the activity
   *    animation
   */
  Activity = React.createClass({
    render: function() {
      return (
        <div className="overlay activity">
          <div className="animation">
            <div className="bounce"></div>
            <div className="bounce"></div>
          </div>
          <p className="text">{this.props.message}</p>
        </div>
      );
    }
  });

  /**
   * Display image in lightbox overlay.
   *
   * @property {function} onClose - Callback function for when the lightbox is closed.
   * @property {url} src - Source URL for the image to be displayed
   */
  LightBox = React.createClass({
    render: function() {
      return (
        <div onClick={this.props.onClose} className="overlay lightbox">
          <a href={this.props.src} target='_blank'>
            <img src={this.props.src} />
          </a>
        </div>
      );
    }
  });

  Progress = React.createClass({
      render: function() {
        var widthPercent;
        if (this.props.progress > 1) widthPercent = this.props.progress | 0;
        else widthPercent = (this.props.progress*100) | 0;
        return (
          <div className="overlay spreads-progress">
            <div className="progress">
              <span className="meter" style={{width: widthPercent+"%"}}></span>
              <span className="status">{this.props.statusMessage}</span>
            </div>
          </div>
        );
      }
  });

  module.exports = {
      Activity: Activity,
      LightBox: LightBox,
      Progress: Progress
  }
}());

{'fraction_non_alphanumeric': 0.14224137931034483, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 2.1573129251700682, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 49, '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': '6195798', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1034, 'n_words': 271}