<commit_before>/**
 * Home Page
 */
'use strict';

import React from 'react';
import { Link } from 'react-router';

import { BaseComponent } from '../components/base.jsx';

/*
 * 页面主框架
 */
class App extends BaseComponent {
    constructor(props, context) {
        super(props, context);
    };

    static get contextTypes() {
        return {
            router: function () {
                return React.PropTypes.func.isRequired;
            }
        }
    };


    getScrollToTopHandle() {
        return (evt) => {
            if(evt.target.tagName != 'DIV') return;
            $(document.body).animate({scrollTop: 0}, 500);
        }
    };

    render() {
        let googleSearch = '<gcse:search className="google-search" gname="post_search" enableAutoComplete="true"></gcse:search>';

        return (
          <div className="container-fluid">

            {/* page nav */}
            <nav className="navbar navbar-default navbar-fixed-top">
              <div className="container-fluid">
                <div className="navbar-header">
                  <button type="button" className="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span className="sr-only">Toggle navigation</span>
                    <span className="icon-bar"></span>
                    <span className="icon-bar"></span>
                    <span className="icon-bar"></span>
                  </button>
                  <Link to={{ pathname: '/archives/1/' }} className="navbar-brand">Laisky</Link>
                </div>
                <div className="collapse navbar-collapse" id="bs-example-navbar-collapse-1" onClick={this.getScrollToTopHandle()}>
                  <ul className="nav navbar-nav apps"><commit_msg>fix: 手机端不能正常上滑<commit_after>/**
 * Home Page
 */
'use strict';

import React from 'react';
import { Link } from 'react-router';

import { BaseComponent } from '../components/base.jsx';

/*
 * 页面主框架
 */
class App extends BaseComponent {
    constructor(props, context) {
        super(props, context);
    };

    static get contextTypes() {
        return {
            router: function () {
                return React.PropTypes.func.isRequired;
            }
        }
    };


    getScrollToTopHandle() {
        return (evt) => {
            if(evt.target.tagName.toUpperCase() != 'DIV') return;
            $(document.body).animate({scrollTop: 0}, 500);
        }
    };

    render() {
        let googleSearch = '<gcse:search className="google-search" gname="post_search" enableAutoComplete="true"></gcse:search>';

        return (
          <div className="container-fluid">

            {/* page nav */}
            <nav className="navbar navbar-default navbar-fixed-top" onClick={this.getScrollToTopHandle()}>
              <div className="container-fluid">
                <div className="navbar-header">
                  <button type="button" className="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span className="sr-only">Toggle navigation</span>
                    <span className="icon-bar"></span>
                    <span className="icon-bar"></span>
                    <span className="icon-bar"></span>
                  </button>
                  <Link to={{ pathname: '/archives/1/' }} className="navbar-brand">Laisky</Link>
                </div>
                <div className="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                  <ul className="nav navbar-nav apps">
{'fraction_non_alphanumeric': 0.14763616256566214, 'fraction_numerical': 0.003870611003594139, 'mean_word_length': 2.053164556962025, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 47, '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': '1198380', 'n_tokens_mistral': 1020, 'n_tokens_neox': 971, 'n_words': 190}