Skip to content

Commit

Permalink
Merge pull request #4 from xudafeng/1.1.1
Browse files Browse the repository at this point in the history
tweak for 1.1.1
  • Loading branch information
xudafeng committed Jul 3, 2015
2 parents df44740 + efde749 commit 20f9e14
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 20 deletions.
12 changes: 9 additions & 3 deletions HISTORY.md
@@ -1,3 +1,9 @@
- doc
- kissy jquery
- native
1.1.0 / 2015-07-03
===================

* First Release

0.1.0 / 2014-03-04
===================

* First Commit
7 changes: 2 additions & 5 deletions README.md
Expand Up @@ -5,13 +5,12 @@ Auto responsive grid layout library for [React](http://facebook.github.io/react/

## Examples

Live demo: [xudafeng.github.io/autoresponsive-react](https://xudafeng.github.io/autoresponsive-react/)
Live demo & docs: [xudafeng.github.io/autoresponsive-react](https://xudafeng.github.io/autoresponsive-react/)

To build the examples locally, run:
To build the examples local, please run:

```shell
$ make install
$ make build
$ make server
```

Expand All @@ -21,8 +20,6 @@ $ make server
$ npm install autoresponsive-react --save
```

## Usage

## Contributing

See our [CONTRIBUTING.md](./CONTRIBUTING.md) for information on how to contribute.
Expand Down
50 changes: 39 additions & 11 deletions README.md.html
Expand Up @@ -94,12 +94,28 @@
.thumbnail .switcher {display: none!important;}
/* highlight */
.hljs{display:block;overflow-x:auto;padding:.5em;background:#fdf6e3;color:#657b83;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-doctype,.hljs-pi,.lisp .hljs-string,.hljs-javadoc{color:#93a1a1}.hljs-keyword,.hljs-winutils,.method,.hljs-addition,.css .hljs-tag,.hljs-request,.hljs-status,.nginx .hljs-title{color:#859900}.hljs-number,.hljs-command,.hljs-string,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula,.hljs-regexp,.hljs-hexcolor,.hljs-link_url{color:#2aa198}.hljs-title,.hljs-localvars,.hljs-chunk,.hljs-decorator,.hljs-built_in,.hljs-identifier,.vhdl .hljs-literal,.hljs-id,.css .hljs-function{color:#268bd2}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number,.hljs-constant,.hljs-class .hljs-title,.hljs-parent,.hljs-type,.hljs-link_reference{color:#b58900}.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-pragma,.hljs-shebang,.hljs-symbol,.hljs-symbol .hljs-string,.diff .hljs-change,.hljs-special,.hljs-attr_selector,.hljs-subst,.hljs-cdata,.css .hljs-pseudo,.hljs-header{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#eee8d5}

</style>
<base target="_blank"/>
</head>
<body>
<input type="hidden" id="mode" value=""/>
<div id="page">
<h2 id="autoresponsive-react">autoresponsive-react</h2>
<h1 id="autoresponsive-react">autoresponsive-react</h1>
<p>Auto responsive grid layout library for <a href="http://facebook.github.io/react/index.html">React</a>.</p>
<h2 id="examples">Examples</h2>
<p>Live demo &amp; docs: <a href="https://xudafeng.github.io/autoresponsive-react/">xudafeng.github.io/autoresponsive-react</a></p>
<p>To build the examples local, please run:</p>
<pre><code class="lang-shell"><span class="hljs-variable">$ </span>make install
<span class="hljs-variable">$ </span>make server
</code></pre>
<h2 id="installation">Installation</h2>
<pre><code class="lang-shell">$ npm <span class="hljs-operator"><span class="hljs-keyword">install</span> autoresponsive-react <span class="hljs-comment">--save</span></span>
</code></pre>
<h2 id="contributing">Contributing</h2>
<p>See our <a href="./CONTRIBUTING.md">CONTRIBUTING.md</a> for information on how to contribute.</p>
<h2 id="license">License</h2>
<p>MIT Licensed. Copyright (c) xdf 2015.</p>

</div>
<div class="right-top" id="radios">
Expand All @@ -117,8 +133,10 @@ <h2 id="autoresponsive-react">autoresponsive-react</h2>
src="http://ghbtns.com/github-btn.html?user=xudafeng&repo=startserver&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="80px" height="20px"></iframe></div>
<script>
(function(global, undefined) {
+function(global, undefined) {
var isSlide = document.getElementById('slide').checked;
var mode = document.getElementById('mode');
var ispdf = mode.value === 'pdf';
var index = location.hash.split('=')[1] || 1;
var left = document.getElementById('left');
var right = document.getElementById('right');
Expand Down Expand Up @@ -187,7 +205,9 @@ <h2 id="autoresponsive-react">autoresponsive-react</h2>
}

function slider() {
if (index == 0) return thumbnail();
if (index == 0) {
return thumbnail();
};
removeClass();
addClass(index - 1, 'current');
setTimeout(function() {
Expand All @@ -197,15 +217,20 @@ <h2 id="autoresponsive-react">autoresponsive-react</h2>
}

var temp = '';

for (var i = 0;i < pages.length;i++) {
var counter = 0;
for (var i = 0;i < pages.length; i++) {
var current = pages[i];
var tagName = current.tagName;
var nextTag = pages[i + 1];
var nextTagName = nextTag ? nextTag.tagName : null;

if (i === 0 || tagName === 'H1' || tagName === 'H2') {
temp += '<article class=\'page\'><div class=\'inner\'>';
temp += '<article class="page"';
if (ispdf) {
temp += ' style= "transform: translate(0, ' + 100 * counter + '%);"';
}
temp += '><div class="inner">';
counter ++;
}
temp += current.outerHTML;

Expand All @@ -217,6 +242,10 @@ <h2 id="autoresponsive-react">autoresponsive-react</h2>
page.innerHTML = temp + '<\/div><\/article>';
pages = page.querySelectorAll('.page');

if (ispdf) {
return;
}

function delegate(target) {
return target.nodeName && target.nodeName.toLowerCase() === 'article' ? target : delegate(target.parentElement);
}
Expand All @@ -225,12 +254,12 @@ <h2 id="autoresponsive-react">autoresponsive-react</h2>
var p = e.parentNode;
var c = p.children;
for (var i=0; i < c.length; i++) {
if (c[i] == e) return i;
if (c[i] == e) {
return i;
};
}
}

radios.addEventListener('click', function(e) {

if (e.target.nodeName === 'INPUT' && e.target.value === 'true') {
setCookie('startserver-slide', false, 240);
direct();
Expand Down Expand Up @@ -296,11 +325,10 @@ <h2 id="autoresponsive-react">autoresponsive-react</h2>
}
}, 5000);
setTimeout(function() {
slider();
direct('#page=' + index);
document.body.style.opacity = 1;
}, 16);
})(this);
}(this);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "autoresponsive-react",
"version": "1.1.0",
"version": "1.1.1",
"description": "auto responsive grid layout library",
"keywords": [
"react",
Expand Down

0 comments on commit 20f9e14

Please sign in to comment.