<commit_before>import React, {PropTypes as t} from 'react';
import {Link} from 'react-router';
import join from 'classnames';
import {noop} from 'lodash';

import BreadCrumbs from '../bread-crumbs';
import Headline from '../common/headline';
import Icon from '../common/icon';
import urlQuery from '../../utils/url-query';

const autoMount = 'https://github.com/sinnerschrader/patternplate-transform-react-to-markup#component-auto-mounting';

export default function PatternHeader(props) {
	const flagClassName = join(`pattern__flag`, {
		[`pattern__flag--${props.flag}`]: props.flag
	});

	const fullscreen = urlQuery.format({
		pathname: `${props.base}demo/${props.id}/index.html`,
		query: {
			environment: props.environment
		}
	});
	const fullscreenTitle = `Open "${props.name}" in fullscreen [ctrl+f]`;

	const reloadTitle = `Reload demo for "${props.name}" [ctrl+r]`;
	const reloadClassName = join(
		'button',
		'button--reload',
		{
			'reload--reloading': props.loading,
			'button--is-active': props.loading,
			'reload--error': props.errored
		}
	);

	const rulersTitle = props.rulers ?
		`Disable rulers [ctrl+l]` :
		`Enable rulers [ctrl+l]`;

	const rulersClassName = join(
		`button button--rulers`,
		{
			'button--is-active': props.rulers
		}
	);

	const opacityClassName = join(
		'button button--opacity',
		{
			'button--is-active': props.opacity
		}
	);
	const opacitySymbol = props.opacity ? 'checkers' : 'checkers-inverted';
	const opacityTitle = props.opacity ?
		'Show opacity [ctrl+o]' :
		'Hide opacity [ctrl+o]';

	return (
		<div className="pattern-header-container">
			<BreadCrumbs
				base={props.base}
				crumbs={props.breadcrumbs}
				location={props.location}
				className="pattern-path"
				/>
			<Headline className="pattern-header" order={2}>
				<span className="pattern-name">
					{props.name}
				</span><commit_msg>fix: twisted anker title by opacity button<commit_after>import React, {PropTypes as t} from 'react';
import {Link} from 'react-router';
import join from 'classnames';
import {noop} from 'lodash';

import BreadCrumbs from '../bread-crumbs';
import Headline from '../common/headline';
import Icon from '../common/icon';
import urlQuery from '../../utils/url-query';

const autoMount = 'https://github.com/sinnerschrader/patternplate-transform-react-to-markup#component-auto-mounting';

export default function PatternHeader(props) {
	const flagClassName = join(`pattern__flag`, {
		[`pattern__flag--${props.flag}`]: props.flag
	});

	const fullscreen = urlQuery.format({
		pathname: `${props.base}demo/${props.id}/index.html`,
		query: {
			environment: props.environment
		}
	});
	const fullscreenTitle = `Open "${props.name}" in fullscreen [ctrl+f]`;

	const reloadTitle = `Reload demo for "${props.name}" [ctrl+r]`;
	const reloadClassName = join(
		'button',
		'button--reload',
		{
			'reload--reloading': props.loading,
			'button--is-active': props.loading,
			'reload--error': props.errored
		}
	);

	const rulersTitle = props.rulers ?
		`Disable rulers [ctrl+l]` :
		`Enable rulers [ctrl+l]`;

	const rulersClassName = join(
		`button button--rulers`,
		{
			'button--is-active': props.rulers
		}
	);

	const opacityClassName = join(
		'button button--opacity',
		{
			'button--is-active': props.opacity
		}
	);
	const opacitySymbol = props.opacity ? 'checkers' : 'checkers-inverted';
	const opacityTitle = props.opacity ?
		'Hide opacity [ctrl+o]':
		'Show opacity [ctrl+o]';

	return (
		<div className="pattern-header-container">
			<BreadCrumbs
				base={props.base}
				crumbs={props.breadcrumbs}
				location={props.location}
				className="pattern-path"
				/>
			<Headline className="pattern-header" order={2}>
				<span className="pattern-name">
					{props.name}
				</span>
{'fraction_non_alphanumeric': 0.1644456289978678, 'fraction_numerical': 0.0005330490405117271, 'mean_word_length': 4.044354838709677, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '3015490', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1233, 'n_words': 269}