Merge pull request #4914 from zpao/0.14-examples

Update examples for Babel, 0.14; remove 3rd party code
This commit is contained in:
Paul O’Shannessy
2015-09-24 15:11:40 -07:00
28 changed files with 78 additions and 871 deletions
+18 -18
View File
@@ -4,28 +4,28 @@
<meta charset="utf-8">
<title>Basic Example with Click Counter</title>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx">
var Counter = React.createClass({
getInitialState: function () {
return { clickCount: 0 };
},
handleClick: function () {
this.setState(function(state) {
return {clickCount: state.clickCount + 1};
});
},
render: function () {
return (<h2 onClick={this.handleClick}>Click me! Number of clicks: {this.state.clickCount}</h2>);
}
});
</script>
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
</head>
<body>
<div id="message" align="center"></div>
<script type="text/jsx">
React.render(<Counter />,
<script type="text/babel">
var Counter = React.createClass({
getInitialState: function () {
return { clickCount: 0 };
},
handleClick: function () {
this.setState(function(state) {
return {clickCount: state.clickCount + 1};
});
},
render: function () {
return (<h2 onClick={this.handleClick}>Click me! Number of clicks: {this.state.clickCount}</h2>);
}
});
ReactDOM.render(
<Counter />,
document.getElementById('message')
);
</script>
+3 -1
View File
@@ -2,6 +2,8 @@
Run `npm install` in the directory to install React from npm. Then run:
./node_modules/.bin/browserify --debug --transform reactify ./index.js > ./bundle.js
```sh
npm start
```
to produce `bundle.js` with example code and React.
+1 -4
View File
@@ -19,14 +19,11 @@
</div>
<h4>Example Details</h4>
<p>This is written with JSX in a CommonJS module and precompiled to vanilla JS by running:</p>
<pre>browserify --debug --transform reactify index.js &gt; bundle.js</pre>
<pre>npm start</pre>
<p>
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="bundle.js"></script>
</body>
</html>
+2 -1
View File
@@ -1,6 +1,7 @@
'use strict';
var React = require('react');
var ReactDOM = require('react-dom');
var ExampleApplication = React.createClass({
render: function() {
@@ -16,7 +17,7 @@ var ExampleApplication = React.createClass({
var start = new Date().getTime();
setInterval(function() {
React.render(
ReactDOM.render(
<ExampleApplication elapsed={new Date().getTime() - start} />,
document.getElementById('container')
);
+6 -5
View File
@@ -2,12 +2,13 @@
"name": "react-basic-commonjs-example",
"description": "Basic example of using React with CommonJS",
"main": "index.js",
"devDependencies": {
"browserify": "^6.3.3",
"react": "^0.13.0",
"reactify": "^0.17.1"
"dependencies": {
"babelify": "^6.3.0",
"react": "^0.14.0-rc1",
"react-dom": "^0.14.0-rc1",
"watchify": "^3.4.0"
},
"scripts": {
"build": "browserify --debug --transform reactify index.js > bundle.js"
"start": "watchify index.js -v -t babelify -o bundle.js"
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ var ExampleApplication = React.createClass({
var start = new Date().getTime();
setInterval(function() {
React.render(
ReactDOM.render(
<ExampleApplication elapsed={new Date().getTime() - start} />,
document.getElementById('container')
);
+3 -5
View File
@@ -24,11 +24,9 @@
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx" src="example.js"></script>
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<script type="text/babel" src="example.js"></script>
</body>
</html>
+4 -3
View File
@@ -24,8 +24,9 @@
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx;harmony=true">
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<script type="text/babel">
class ExampleApplication extends React.Component {
render() {
var elapsed = Math.round(this.props.elapsed / 100);
@@ -38,7 +39,7 @@
}
var start = new Date().getTime();
setInterval(() => {
React.render(
ReactDOM.render(
<ExampleApplication elapsed={new Date().getTime() - start} />,
document.getElementById('container')
);
+1 -1
View File
@@ -12,7 +12,7 @@ var ExampleApplication = React.createClass({
var start = new Date().getTime();
setInterval(function() {
React.render(
ReactDOM.render(
<ExampleApplication elapsed={new Date().getTime() - start} />,
document.getElementById('container')
);
+5 -7
View File
@@ -11,23 +11,21 @@
<p>
If you can see this, React is not running. Try running:
</p>
<pre>npm install -g react-tools
<pre>npm install -g babel
cd examples/basic-jsx-precompile/
jsx . build/</pre>
babel example.js --out-dir=build</pre>
</div>
<h4>Example Details</h4>
<p>This is written with JSX in a separate file and precompiled to vanilla JS by running:</p>
<pre>npm install -g react-tools
<pre>npm install -g babel
cd examples/basic-jsx-precompile/
jsx . build/</pre>
babel example.js --out-dir=build</pre>
<p>
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/react-dom.js"></script>
<script src="build/example.js"></script>
</body>
</html>
+4 -6
View File
@@ -23,12 +23,10 @@
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx">
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<script type="text/babel">
var ExampleApplication = React.createClass({
render: function() {
var elapsed = Math.round(this.props.elapsed / 100);
@@ -41,7 +39,7 @@
});
var start = new Date().getTime();
setInterval(function() {
React.render(
ReactDOM.render(
<ExampleApplication elapsed={new Date().getTime() - start} />,
document.getElementById('container')
);
+2 -4
View File
@@ -23,10 +23,8 @@
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/react-dom.js"></script>
<script>
var ExampleApplication = React.createClass({
render: function() {
@@ -44,7 +42,7 @@
var start = new Date().getTime();
setInterval(function() {
React.render(
ReactDOM.render(
ExampleApplicationFactory({elapsed: new Date().getTime() - start}),
document.getElementById('container')
);
+6 -8
View File
@@ -4,18 +4,16 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>jQuery Integration</title>
<link rel="stylesheet" href="../shared/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="css/example.css" type="text/css" />
</head>
<body>
<div id="jqueryexample"></div>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script src="../shared/thirdparty/jquery.min.js" charset="utf-8"></script>
<script src="../shared/thirdparty/bootstrap.min.js" charset="utf-8"></script>
<script type="text/jsx" src="js/app.js"></script>
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js" charset="utf-8"></script>
<script type="text/babel" src="js/app.js"></script>
</body>
</html>
+6 -7
View File
@@ -18,17 +18,16 @@ var BootstrapModal = React.createClass({
// integrate Bootstrap or jQuery with the components lifecycle methods.
componentDidMount: function() {
// When the component is added, turn it into a modal
$(React.findDOMNode(this))
.modal({backdrop: 'static', keyboard: false, show: false});
$(this.refs.root).modal({backdrop: 'static', keyboard: false, show: false});
},
componentWillUnmount: function() {
$(React.findDOMNode(this)).off('hidden', this.handleHidden);
$(this.refs.root).off('hidden', this.handleHidden);
},
close: function() {
$(React.findDOMNode(this)).modal('hide');
$(this.refs.root).modal('hide');
},
open: function() {
$(React.findDOMNode(this)).modal('show');
$(this.refs.root).modal('show');
},
render: function() {
var confirmButton = null;
@@ -52,7 +51,7 @@ var BootstrapModal = React.createClass({
}
return (
<div className="modal fade">
<div className="modal fade" ref="root">
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header">
@@ -124,4 +123,4 @@ var Example = React.createClass({
}
});
React.render(<Example />, document.getElementById('jqueryexample'));
ReactDOM.render(<Example />, document.getElementById('jqueryexample'));
+5 -7
View File
@@ -5,17 +5,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Mobile React Example</title>
<link rel="stylesheet" href="../shared/css/jquery.mobile.min.css" />
<link rel="stylesheet" href="../shared/css/jqm-demos.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-mobile/1.4.5/jquery.mobile.min.css" />
<link rel="stylesheet" href="https://demos.jquerymobile.com/1.4.5/_assets/css/jqm-demos.css" />
</head>
<body class="ui-mobile-viewport ui-overlay-a">
<div id="content"></div>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../shared/thirdparty/jquery.min.js"></script>
<script src="../shared/thirdparty/jquery.mobile.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mobile/1.4.5/jquery.mobile.min.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/react-dom.js"></script>
<script src="js/app.js"></script>
</body>
</html>
+1 -1
View File
@@ -188,4 +188,4 @@ var PagePopUpContent = React.createClass({
PagePopUpContent = React.createFactory(PagePopUpContent);
// Render application.
React.render(App(null), document.getElementById('content'));
ReactDOM.render(App(null), document.getElementById('content'));
+1 -1
View File
@@ -53,7 +53,7 @@ var QuadraticCalculator = React.createClass({
}
});
React.render(
ReactDOM.render(
<QuadraticCalculator />,
document.getElementById('container')
);
+3 -5
View File
@@ -23,11 +23,9 @@
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx" src="example.js"></script>
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<script type="text/babel" src="example.js"></script>
</body>
</html>
File diff suppressed because one or more lines are too long
-732
View File
@@ -1,732 +0,0 @@
/* JQM Demos custom CSS */
/* Header */
.jqm-demos .jqm-header {
background: #fff;
border-top: 4px solid #3eb249;
border-bottom-color: #eee;
}
.jqm-demos .jqm-header h2 {
padding: .4em 0 .1em;
margin: 0 3em;
}
.jqm-demos .jqm-header h2 a {
display: inline-block;
text-decoration: none;
min-height: 40px;
}
.jqm-demos .jqm-header h2 img {
display: block;
width: 140px;
height: auto;
}
.jqm-demos .jqm-header h2 > img {
display: inline-block;
}
.jqm-demos .jqm-header p {
position: absolute;
bottom: -2em;
left: 1em;
margin: 0;
color: #666;
font-family: 'Open Sans', sans-serif;
font-weight: 300;
text-transform: uppercase;
}
.jqm-demos .jqm-header .ui-btn {
width: 2em;
height: 2em;
background: none;
border: 0;
top: 50%;
margin-top: -1em;
-webkit-border-radius: .3125em;
border-radius: .3125em;
opacity: .4;
filter: Alpha(Opacity=40);
}
/* Footer */
.jqm-demos .jqm-footer.ui-footer {
position: absolute;
bottom: 0;
padding-bottom: 0;
}
.jqm-demos .jqm-footer {
border-top: 1px solid #3eb249;
}
.jqm-demos .jqm-footer p {
font-size: .8em;
color: #999;
font-family: 'Open Sans', sans-serif;
font-weight: 300;
margin: 0 1.25em 1.25em;
}
.jqm-demos .jqm-footer p:first-child {
font-size: 1em;
color: #666;
font-weight: 400;
margin: 1em 1em .75em;
}
/* Content */
.jqm-demos .jqm-content {
padding-top: 3em;
}
.jqm-demos .jqm-content > h1,
.jqm-demos .jqm-content > h2,
.jqm-demos .jqm-content > h3,
.jqm-demos .jqm-content > p,
.jqm-demos .jqm-content > ul li,
.jqm-demos .jqm-content > a {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
.jqm-demos .jqm-content > h1 {
font-size: 2.4em;
margin: 0 0 .625em;
}
.jqm-demos .jqm-content > h2 {
color: #3eb249;
background-color: transparent;
border-bottom: 1px solid #ddd;
font-size: 1.6em;
padding-bottom: .2em;
margin: 0 0 .7375em;
}
.jqm-demos .jqm-content > h3 {
color: #3eb249;
background-color: transparent;
font-size: 1.4em;
margin: 0 0 1em;
}
.jqm-demos .jqm-content > p {
font-size: 1.2em;
line-height: 1.5;
}
.jqm-demos .jqm-content > ul:not(.jqm-list) li {
font-size: 1.2em;
line-height: 1.5;
}
.jqm-demos .jqm-content > p {
margin: 0 0 1.25em;
}
.jqm-demos .jqm-content > ul,
.jqm-demos .jqm-content > ol {
padding-left: 1.3em;
}
.jqm-demos .jqm-content > .ui-listview {
padding-left: 0;
}
.jqm-demos .jqm-content > a,
.jqm-demos .jqm-content > p a,
.jqm-demos .jqm-content > ul:not(.jqm-list) li a {
font-weight: 400;
text-decoration: none;
}
.jqm-demos .jqm-content strong {
font-weight: 700;
}
.jqm-demos .jqm-content > p strong {
font-weight: 400;
}
/* Homepage */
.jqm-home > .jqm-content > img {
width: 400px;
max-width: 100%;
display: block;
margin: 2.5em 0;
}
.jqm-home .ui-grid-a {
margin: 2.5em -.5em -.5em;
}
.jqm-block-content {
margin: .5em;
padding: 1em;
background: #fff;
border: 1px solid #eee;
-webkit-border-radius: .3125em;
border-radius: .3125em;
font-family: 'Open Sans', sans-serif;
}
.jqm-block-content h3 {
font-size: 1.5em;
font-weight: 300;
color: #3eb249;
border-bottom: 1px solid #ddd;
padding-bottom: .25em;
margin: 0 0 .5em;
}
.jqm-block-content p {
font-size: 1.1em;
font-weight: 300;
line-height: 1.4;
margin: .7em 0;
}
.jqm-block-content p:last-child {
margin-bottom: 0;
}
.jqm-block-content a:link {
font-weight: 300;
text-decoration: none;
}
/* Code */
.jqm-content pre,
.jqm-content code {
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
background: #e5e5e5;
background: rgba(0,0,0,.05);
padding: 0 .125em;
}
.jqm-content pre {
padding: 0 1em 1.2em;
white-space: pre-wrap;
}
.jqm-content pre > code {
padding: 0;
background: none;
font-size: .9em;
}
/* Lists */
.jqm-demos .jqm-search .jqm-list {
margin: 0 -1em 1em;
}
.jqm-demos .jqm-list .ui-btn,
.jqm-demos .jqm-list .ui-btn:visited,
.jqm-demos .jqm-list .ui-li-divider {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
text-shadow: none !important;
}
.jqm-demos .jqm-list .ui-btn:hover,
.jqm-demos .jqm-list .ui-btn:active {
color: #3388cc;
}
.jqm-demos .jqm-list .ui-btn.ui-btn-active {
color: #fff;
}
.jqm-demos .jqm-list .ui-li-divider {
color: #3eb249;
}
/* Navmenu */
.jqm-navmenu-panel .ui-listview > li .ui-collapsible-heading {
margin: 0;
}
.jqm-navmenu-panel .ui-collapsible.ui-li-static {
padding: 0;
border: none !important;
}
.jqm-navmenu-panel .ui-collapsible + li > .ui-btn,
.jqm-navmenu-panel .ui-collapsible + .ui-collapsible > .ui-collapsible-heading > .ui-btn,
.jqm-navmenu-panel .ui-panel-inner > .ui-listview > li.ui-first-child .ui-btn {
border-top: none !important;
}
.jqm-navmenu-panel .ui-listview .ui-listview .ui-btn {
padding-left: 1.5em;
color: #999;
}
.jqm-navmenu-panel .ui-listview .ui-listview .ui-btn.ui-btn-active {
color: #fff;
}
.jqm-navmenu-panel .ui-btn:after {
opacity: .4;
filter: Alpha(Opacity=40);
}
.jqm-demos .jqm-navmenu-panel.jqm-panel-page-nav {
display: none;
position: absolute;
top: 178px;
left: 12px;
}
.jqm-demos .jqm-navmenu-panel.jqm-panel-page-nav ul li:first-child a{
border-top: none;
}
/* Search */
.jqm-search-panel .ui-panel-inner {
padding-top: 0;
}
.jqm-search-panel .ui-input-search {
margin: 1em 0;
}
.jqm-search-panel .ui-input-search.ui-focus {
-webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
-moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
}
.jqm-list .jqm-search-results-keywords {
padding: .46857em 0 0;
font-size: .8em;
font-weight: 300;
color: #999;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.ui-btn-active .jqm-search-results-keywords {
color: #fff;
}
.jqm-search-results-highlight {
color: #3388cc;
font-weight: 400;
}
.ui-btn-active .jqm-search-results-highlight {
color: #fff;
font-weight: 300;
}
/* Quick links */
.jqm-demos .jqm-content .jqm-deeplink {
display: block;
color: #999;
font-weight: 300;
border-top: 1px solid #eee;
text-align: right;
padding-top: .2em;
margin: 0 0 1.5em;
}
.jqm-demos .jqm-content .jqm-deeplink:after {
content: "";
display: block;
float: right;
margin: .1em 0 0 .5em;
width: 1em;
height: 1em;
background-position: center center;
background-repeat: no-repeat;
opacity: .4;
filter: Alpha(Opacity=40);
}
/* View source links */
.jqm-demos .jqm-content .jqm-view-source-link,
.jqm-demos .jqm-content .jqm-view-source-link:visited,
.jqm-demos .jqm-content .jqm-view-source-link:hover,
.jqm-demos .jqm-content .jqm-view-source-link:active {
color: #3eb249;
font-family: 'Open Sans', sans-serif;
font-weight: 400;
margin: 2em 0 1.5em 1em;
}
.jqm-demos .jqm-content .jqm-view-source-link.ui-btn-active:link {
color: #fff;
}
@media (min-width: 60em) {
.jqm-demos .jqm-header h2 {
padding: 1em 0 .7em;
margin: 0 1em 0 3%;
text-align: left;
}
.jqm-demos .jqm-header h2 img {
width: 275px;
height: 78px;
}
.jqm-demos .jqm-header p {
bottom: auto;
left: auto;
top: 50%;
right: 15%;
font-size: 1.2em;
margin-top: -.625em;
}
.jqm-demos .jqm-navmenu-link {
display: none;
}
.jqm-demos .jqm-search-link {
right: 3%;
}
.jqm-demos .jqm-footer p {
float: right;
margin: 1.5em 3% 1.5em 1.5em;
}
.jqm-demos .jqm-footer p:first-child {
float: left;
margin: 1.25em 1.25em 1.25em 3%;
}
.jqm-demos .jqm-navmenu-panel {
visibility: visible;
position: relative;
left: 0;
float: left;
width: 25%;
background: none;
-webkit-transition: none !important;
-moz-transition: none !important;
transition: none !important;
-webkit-transform: none !important;
-moz-transform: none !important;
transform: none !important;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.jqm-demos.jqm-panel-page .jqm-navmenu-panel {
display: none;
}
html .jqm-demos.jqm-panel-page .jqm-navmenu-panel.jqm-panel-page-nav {
display: block;
}
.jqm-demos .jqm-navmenu-panel .ui-panel-inner {
margin-top: 3em;
margin-bottom: 3em;
}
.jqm-demos .jqm-content {
width: 67%;
padding-top: 2em;
padding-left: 5%;
padding-right: 3%;
float: right;
}
.jqm-demos .jqm-content.jqm-fullwidth {
width: auto;
padding-left: 15%;
padding-right: 15%;
float: none;
}
.jqm-navmenu-panel .ui-listview .ui-btn {
padding-left: 12.5%;
}
.jqm-navmenu-panel .ui-listview .ui-listview .ui-btn {
padding-left: 15%;
}
.jqm-navmenu-panel .ui-collapsible,
.jqm-navmenu-panel .ui-collapsible-content,
.jqm-navmenu-panel .ui-btn {
background: none !important;
border-color: #ddd !important;
}
.jqm-navmenu-panel .ui-btn.ui-btn-active {
color: #3388cc !important;
}
.jqm-navmenu-panel .ui-btn::after {
opacity: 0;
-webkit-transition: opacity 500ms ease;
-moz-transition: opacity 500ms ease;
transition: opacity 500ms ease;
}
.jqm-navmenu-panel .ui-btn:hover::after {
opacity: .4;
}
.jqm-search-panel {
width: 26em;
right: -26em;
z-index: 1003; /* Puts the panel on top of the dismiss modal which is not adjusted to custom width */
}
.jqm-search-panel.ui-panel-animate.ui-panel-position-right {
-webkit-transform: translate3d(26em,0,0);
-moz-transform: translate3d(26em,0,0);
transform: translate3d(26em,0,0);
}
.ui-panel-dismiss-open.ui-panel-dismiss-position-right {
left: -17em;
right: 17em;
}
}
@media (min-width: 35em) {
.jqm-block-content {
min-height: 18em;
}
}
/* View source popup */
#jqm-view-source-popup.ui-popup-container {
width: 90%;
max-width: 1500px;
}
.jqm-view-source .ui-collapsible-set {
margin: 0;
}
.jqm-view-source .ui-collapsible-heading .ui-btn {
font-family: 'Open Sans', sans-serif;
font-weight: 400;
}
.jqm-view-source .ui-collapsible-heading .ui-btn-inner {
padding: .4em;
}
.jqm-view-source .ui-collapsible-content {
padding: 0;
overflow: auto;
}
.jqm-view-source .ui-collapsible-content .phpStatus {
padding: 1em;
}
.jqm-view-source .ui-collapsible-content > div,
.jqm-view-source .ui-collapsible-content .syntaxhighlighter {
border-bottom-right-radius: inherit;
border-bottom-left-radius: inherit;
}
.jqm-view-source .ui-collapsible-content::-webkit-scrollbar {
width: 5px;
}
.jqm-view-source .ui-collapsible-content::-webkit-scrollbar-track {
background: transparent;
}
.jqm-view-source .ui-collapsible-content::-webkit-scrollbar-thumb {
background: #435A5F;
border: solid #222;
border-width: 12px 2px 12px 0;
border-bottom-right-radius: 5px;
}
.jqm-view-source .ui-collapsible-content td.code .container > textarea {
resize: none;
}
/* Button C - HTML */
.jqm-view-source .ui-btn.ui-btn-c,
.jqm-view-source .ui-btn.ui-btn-c:visited,
.jqm-view-source .ui-btn.ui-btn-c:hover,
.jqm-view-source .ui-btn.ui-btn-c:active,
.jqm-view-source .ui-btn.ui-btn-c.ui-btn-active {
background: #005aff;
border-color: #0033cc;
color: #fff;
text-shadow: 0 1px 0 #0033cc;
}
/* Button D - PHP */
.jqm-view-source .ui-btn.ui-btn-d,
.jqm-view-source .ui-btn.ui-btn-d:visited,
.jqm-view-source .ui-btn.ui-btn-d:hover,
.jqm-view-source .ui-btn.ui-btn-d:active,
.jqm-view-source .ui-btn.ui-btn-d.ui-btn-active {
background: #ed1c24;
border-color: #ff0000;
color: #fff;
text-shadow: 0 1px 0 #ff0000;
}
/* Button E - JS */
.jqm-view-source .ui-btn.ui-btn-e,
.jqm-view-source .ui-btn.ui-btn-e:visited,
.jqm-view-source .ui-btn.ui-btn-e:hover,
.jqm-view-source .ui-btn.ui-btn-e:active,
.jqm-view-source .ui-btn.ui-btn-e.ui-btn-active {
background: #3EB249;
border-color: #108040;
color: #fff;
text-shadow: 0 1px 0 #108040;
}
/* Button F - CSS */
.jqm-view-source .ui-btn.ui-btn-f,
.jqm-view-source .ui-btn.ui-btn-f:visited,
.jqm-view-source .ui-btn.ui-btn-f:hover,
.jqm-view-source .ui-btn.ui-btn-f:active,
.jqm-view-source .ui-btn.ui-btn-f.ui-btn-active {
background: #ec008c;
border-color: #cc0099;
color: #fff;
text-shadow: 0 1px 0 #cc0099;
}
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter a,
.syntaxhighlighter div,
.syntaxhighlighter code,
.syntaxhighlighter table,
.syntaxhighlighter table td,
.syntaxhighlighter table tr,
.syntaxhighlighter table tbody,
.syntaxhighlighter table thead,
.syntaxhighlighter table caption,
.syntaxhighlighter textarea {
background: none;
border: 0;
bottom: auto;
float: none;
left: auto;
height: auto;
line-height: 18px;
margin: 0;
outline: 0;
overflow: visible;
padding: 0;
position: static;
right: auto;
text-align: left;
top: auto;
vertical-align: baseline;
width: auto;
box-sizing: content-box;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
font-weight: normal;
font-style: normal;
font-size: 14px;
min-height: inherit;
min-height: auto;
}
.syntaxhighlighter {
width: auto;
margin: 0;
padding: 1em 0;
position: relative;
overflow: auto;
font-size: 13px;
}
.syntaxhighlighter.source {
overflow: hidden;
}
.syntaxhighlighter .bold {
font-weight: bold;
}
.syntaxhighlighter .italic {
font-style: italic;
}
.syntaxhighlighter .line {
white-space: pre;
white-space: pre-wrap;
}
.syntaxhighlighter table {
width: 100%;
}
.syntaxhighlighter table caption {
text-align: left;
padding: .5em 0 0.5em 1em;
}
.syntaxhighlighter table td.code {
width: 100%;
}
.syntaxhighlighter table td.code .container {
position: relative;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: none;
background: white;
padding-left: 1em;
overflow: hidden;
white-space: pre;
}
.syntaxhighlighter table td.gutter .line {
text-align: right;
padding: 0 0.5em 0 1em;
}
.syntaxhighlighter table td.code .line {
padding: 0 1em;
}
.syntaxhighlighter.show {
display: block;
}
.syntaxhighlighter.collapsed table {
display: none;
}
.syntaxhighlighter .line.alt1 {
background-color: transparent;
}
.syntaxhighlighter .line.alt2 {
background-color: transparent;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #253e5a;
}
.syntaxhighlighter .line.highlighted.number {
color: #38566f;
}
.syntaxhighlighter table caption {
color: #d1edff;
}
.syntaxhighlighter .gutter {
color: #afafaf;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #435a5f;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #435a5f;
color: #0f192a;
}
.syntaxhighlighter.collapsed {
overflow: visible;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: #eee;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #5ba1cf;
}
.syntaxhighlighter .string {
color: #98da31;
}
.syntaxhighlighter .string a {
color: #1dc116;
}
.syntaxhighlighter .keyword {
color: #ffae00;
}
.syntaxhighlighter .preprocessor {
color: #8aa6c1;
}
.syntaxhighlighter .variable {
color: #ffaa3e;
}
.syntaxhighlighter .value {
color: #f7e741;
}
.syntaxhighlighter .functions {
color: #ffaa3e;
}
.syntaxhighlighter .constants {
color: #e0e8ff;
}
.syntaxhighlighter .script {
font-weight: bold;
color: #b43d3d;
background-color: none;
}
.syntaxhighlighter .color1 {
color: #8df;
}
.syntaxhighlighter .color1 a {
color: #f8bb00;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: white;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #ffaa3e;
}
.syntaxhighlighter table td.code {
cursor: text;
}
.syntaxhighlighter table td.code .container textarea {
background: #eee;
white-space: pre;
white-space: pre-wrap;
}
.syntaxhighlighter ::-moz-selection {
background-color: #3399ff;
color: #fff;
text-shadow: none;
}
.syntaxhighlighter ::-webkit-selection {
background-color: #3399ff;
color: #fff;
text-shadow: none;
}
.syntaxhighlighter ::selection {
background-color: #3399ff;
color: #fff;
text-shadow: none;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-15
View File
@@ -1,15 +0,0 @@
// Console-polyfill. MIT license.
// https://github.com/paulmillr/console-polyfill
// Make it safe to do console.log() always.
(function(con) {
'use strict';
var prop, method;
var empty = {};
var dummy = function() {};
var properties = 'memory'.split(',');
var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,' +
'table,time,timeEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) con[prop] = con[prop] || empty;
while (method = methods.pop()) con[method] = con[method] || dummy;
})(this.console = this.console || {}); // Using `this` for web workers.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -6
View File
@@ -24,12 +24,10 @@
Learn more about React at
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
</p>
<script src="../shared/thirdparty/es5-shim.min.js"></script>
<script src="../shared/thirdparty/es5-sham.min.js"></script>
<script src="../shared/thirdparty/console-polyfill.js"></script>
<script src="../../build/react-with-addons.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx">
<script src="../../build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<script type="text/babel">
var CSSTransitionGroup = React.addons.CSSTransitionGroup;
var INTERVAL = 2000;
@@ -65,6 +63,8 @@
return (
<CSSTransitionGroup
className="animateExample"
transitionEnterTimeout={250}
transitionLeaveTimeout={250}
transitionName="example">
{children}
</CSSTransitionGroup>
@@ -72,7 +72,7 @@
}
});
React.render(
ReactDOM.render(
<AnimateDemo />,
document.getElementById('container')
);