Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: reagent-project/reagent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: react-china/reagent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gh-pages
Choose a head ref

Commits on Jan 9, 2014

  1. Generate docs

    holmsand committed Jan 9, 2014
    Copy the full SHA
    44efeca View commit details
  2. Copy the full SHA
    7979bd7 View commit details
  3. Regenerated

    holmsand committed Jan 9, 2014
    Copy the full SHA
    b56c07d View commit details

Commits on Jan 10, 2014

  1. Unnecessary div

    holmsand committed Jan 10, 2014
    Copy the full SHA
    a492f97 View commit details
  2. Copy the full SHA
    90b5826 View commit details
  3. Update demo

    holmsand committed Jan 10, 2014
    Copy the full SHA
    3949149 View commit details
  4. Copy the full SHA
    043dd9d View commit details
  5. Build demo

    holmsand committed Jan 10, 2014
    Copy the full SHA
    0b74132 View commit details

Commits on Jan 11, 2014

  1. Copy the full SHA
    dca76aa View commit details
  2. Rebuilt

    holmsand committed Jan 11, 2014
    Copy the full SHA
    90b8f34 View commit details

Commits on Jan 24, 2014

  1. Merge branch 'master' into gh-pages

    Conflicts:
    	.gitignore
    	examples/todomvc/src/todomvc.cljs
    holmsand committed Jan 24, 2014
    Copy the full SHA
    d354ae6 View commit details
  2. Copy the full SHA
    a71c666 View commit details

Commits on Feb 3, 2014

  1. Merge branch 'master' into gh-pages

    Conflicts:
    	.gitignore
    	Makefile
    	demo/demo.cljs
    	demo/reagentdemo/page.cljs
    holmsand committed Feb 3, 2014
    Copy the full SHA
    84d854c View commit details
  2. Update site

    holmsand committed Feb 3, 2014
    Copy the full SHA
    40cd2a4 View commit details

Commits on Feb 21, 2014

  1. Copy the full SHA
    d0687f4 View commit details
  2. Reagent 0.4.0

    holmsand committed Feb 21, 2014
    Copy the full SHA
    5eca2e5 View commit details

Commits on Feb 22, 2014

  1. Copy the full SHA
    4d5ba8f View commit details
  2. Update site

    holmsand committed Feb 22, 2014
    Copy the full SHA
    00a9149 View commit details

Commits on Feb 26, 2014

  1. Copy the full SHA
    c471777 View commit details
  2. Push clock example

    holmsand committed Feb 26, 2014
    Copy the full SHA
    40a169a View commit details
  3. Copy the full SHA
    5b2e074 View commit details
  4. Rebuild

    holmsand committed Feb 26, 2014
    Copy the full SHA
    aae94dc View commit details

Commits on Mar 6, 2014

  1. Copy the full SHA
    d84b9cd View commit details
  2. Generate

    holmsand committed Mar 6, 2014
    Copy the full SHA
    c319ffa View commit details

Commits on Oct 28, 2014

  1. Copy the full SHA
    d738e42 View commit details
  2. Rebuild demo site

    holmsand committed Oct 28, 2014
    Copy the full SHA
    357a67e View commit details

Commits on Nov 26, 2015

  1. first version of translation

    tiye committed Nov 26, 2015
    Copy the full SHA
    827821d View commit details
  2. some typos

    tiye committed Nov 26, 2015
    Copy the full SHA
    2a13e9d View commit details
Showing with 37,218 additions and 141 deletions.
  1. +0 −3 .gitignore
  2. +22 −1 README.md
  3. +830 −0 assets/demo.css
  4. +34,699 −0 assets/demo.js
  5. +103 −135 demo/reagentdemo/intro.cljs
  6. +148 −0 index.html
  7. +66 −0 news/any-arguments.html
  8. +79 −0 news/binary-clock.html
  9. +52 −0 news/cloact-reagent-undo-demo.html
  10. +34 −0 news/index.html
  11. +138 −0 news/reagent-is-async.html
  12. +2 −2 site/demo.css
  13. +362 −0 site/demo.js
  14. +683 −0 site/democss.css
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
index.html
assets/
/news/
target
pom.xml
.lein-repl-history
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@

### Chinese translation of Reagent Intro

Live page: http://react-china.github.io/reagent

If you want to help, fork this project, update this file:

```bash
demo/reagentdemo/intro.cljs
```

run these commands to refresh `index.html`:

```bash
lein cljsbuild once
make gensite
```

and send PR at end.

----

# Reagent

A simple [ClojureScript](http://github.com/clojure/clojurescript) interface to
@@ -34,7 +55,7 @@ Reagent uses [Hiccup-like](https://github.com/weavejester/hiccup) markup instead
(defn some-component []
[:div
[:h3 "I am a component!"]
[:p.someclass
[:p.someclass
"I have " [:strong "bold"]
[:span {:style {:color "red"}} " and red"]
" text."]])
830 changes: 830 additions & 0 deletions assets/demo.css

Large diffs are not rendered by default.

34,699 changes: 34,699 additions & 0 deletions assets/demo.js

Large diffs are not rendered by default.

238 changes: 103 additions & 135 deletions demo/reagentdemo/intro.cljs

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions index.html

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions news/any-arguments.html

Large diffs are not rendered by default.

79 changes: 79 additions & 0 deletions news/binary-clock.html

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions news/cloact-reagent-undo-demo.html

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions news/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<title>Reagent news</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
<link rel='stylesheet' href='../assets/demo.css?1448548628907'>
</head>
<body>
<div data-reactid=".1sls390l4w0" data-react-checksum="-1033603262"><div class="nav" data-reactid=".1sls390l4w0.0"><ul class="nav" data-reactid=".1sls390l4w0.0.0"><li class="brand" data-reactid=".1sls390l4w0.0.0.0"><a href="../index.html" data-reactid=".1sls390l4w0.0.0.0.0">Reagent:</a></li><li data-reactid=".1sls390l4w0.0.0.1"><a href="../index.html" data-reactid=".1sls390l4w0.0.0.1.0">Intro</a></li><li data-reactid=".1sls390l4w0.0.0.2"><a href="../news/index.html" data-reactid=".1sls390l4w0.0.0.2.0">News</a></li><li data-reactid=".1sls390l4w0.0.0.3"><a href="https://github.com/holmsand/reagent" data-reactid=".1sls390l4w0.0.0.3.0">GitHub</a></li></ul></div><div data-reactid=".1sls390l4w0.1"><div data-reactid=".1sls390l4w0.1.0"></div><div class="reagent-demo" data-reactid=".1sls390l4w0.1.1"><h1 data-reactid=".1sls390l4w0.1.1.0"><a href="../news/binary-clock.html" data-reactid=".1sls390l4w0.1.1.0.0">A binary clock</a></h1><div data-reactid=".1sls390l4w0.1.1.1"></div><div class="demo-text" data-reactid=".1sls390l4w0.1.1.2"><p data-reactid=".1sls390l4w0.1.1.2.0"><span data-reactid=".1sls390l4w0.1.1.2.0.0">Fredrik Dyrkell wrote a very nice </span><a href="http://www.lexicallyscoped.com/2014/01/23/clojurescript-react-om-binary-clock.html" data-reactid=".1sls390l4w0.1.1.2.0.1">binary
clock</a><span data-reactid=".1sls390l4w0.1.1.2.0.2"> using </span><a href="https://github.com/swannodette/om" data-reactid=".1sls390l4w0.1.1.2.0.3">Om</a><span data-reactid=".1sls390l4w0.1.1.2.0.4">. I thought I’d replicate that
using Reagent for fun (another re-write, using </span><a href="http://hoplon.io" data-reactid=".1sls390l4w0.1.1.2.0.5">Hoplon</a><span data-reactid=".1sls390l4w0.1.1.2.0.6">, can be seen </span><a href="http://pmbauer.github.io/2014/01/27/hoplon-binary-clock/" data-reactid=".1sls390l4w0.1.1.2.0.7">here</a><span data-reactid=".1sls390l4w0.1.1.2.0.8">).</span></p><p data-reactid=".1sls390l4w0.1.1.2.1">So, without further ado, here is a binary clock using Reagent.</p><a href="../news/binary-clock.html" class="news-read-more" data-reactid=".1sls390l4w0.1.1.2.2">Read more</a></div></div><div class="reagent-demo" data-reactid=".1sls390l4w0.1.2"><h1 data-reactid=".1sls390l4w0.1.2.0"><a href="../news/any-arguments.html" data-reactid=".1sls390l4w0.1.2.0.0">All arguments allowed</a></h1><div data-reactid=".1sls390l4w0.1.2.1"></div><div class="demo-text" data-reactid=".1sls390l4w0.1.2.2"><h2 data-reactid=".1sls390l4w0.1.2.2.0">If it looks like a function…</h2><p data-reactid=".1sls390l4w0.1.2.2.1"><span data-reactid=".1sls390l4w0.1.2.2.1.0">Calling a component in Reagent looks a lot like a function
call. Now it also </span><em data-reactid=".1sls390l4w0.1.2.2.1.1">works</em><span data-reactid=".1sls390l4w0.1.2.2.1.2"> like one.</span></p><p data-reactid=".1sls390l4w0.1.2.2.2">Before 0.4.0, component functions were always called with
three arguments: a map of attributes, a vector of ”children”,
and the current React component.</p><p data-reactid=".1sls390l4w0.1.2.2.3">This was confusing, and an unnecessary limitation, so now
component functions get exactly the same arguments you pass to
them.</p><a href="../news/any-arguments.html" class="news-read-more" data-reactid=".1sls390l4w0.1.2.2.4">Read more</a></div></div><div class="reagent-demo" data-reactid=".1sls390l4w0.1.3"><div data-reactid=".1sls390l4w0.1.3.0"></div><h1 data-reactid=".1sls390l4w0.1.3.1"><a href="../news/reagent-is-async.html" data-reactid=".1sls390l4w0.1.3.1.0">Faster by waiting</a></h1><div class="demo-text" data-reactid=".1sls390l4w0.1.3.2"><h2 data-reactid=".1sls390l4w0.1.3.2.0">Reagent gets async rendering</h2><p data-reactid=".1sls390l4w0.1.3.2.1">Reagent already separates state from components. Now they
are also separated in time.</p><p data-reactid=".1sls390l4w0.1.3.2.2"><span data-reactid=".1sls390l4w0.1.3.2.2.0">From version 0.3.0, changes in application state (as
represented by Reagent’s </span><code data-reactid=".1sls390l4w0.1.3.2.2.1">atom</code><span data-reactid=".1sls390l4w0.1.3.2.2.2">s) are no longer
rendered immediately to the DOM. Instead, Reagent waits until
the browser is ready to repaint the window, and then all the
changes are rendered in one single go.</span></p><a href="../news/reagent-is-async.html" class="news-read-more" data-reactid=".1sls390l4w0.1.3.2.3">Read more</a></div></div><div class="reagent-demo" data-reactid=".1sls390l4w0.1.4"><h1 data-reactid=".1sls390l4w0.1.4.0"><a href="../news/cloact-reagent-undo-demo.html" data-reactid=".1sls390l4w0.1.4.0.0">Cloact becomes Reagent: Undo is trivial</a></h1><div data-reactid=".1sls390l4w0.1.4.1"></div><div class="demo-text" data-reactid=".1sls390l4w0.1.4.2"><h2 data-reactid=".1sls390l4w0.1.4.2.0">(reset! cloact-name &quot;Reagent&quot;)</h2><p data-reactid=".1sls390l4w0.1.4.2.1">It turns out that ”Cloact” was a really, really bad
name. It made some people think about birds’ behinds, in
possibly unhealthy ways, which even Google suggested they
should.</p><p data-reactid=".1sls390l4w0.1.4.2.2"><span data-reactid=".1sls390l4w0.1.4.2.2.0">The new name is </span><strong data-reactid=".1sls390l4w0.1.4.2.2.1">Reagent</strong><span data-reactid=".1sls390l4w0.1.4.2.2.2">, which hopefully
doesn’t bring with it the same disgusting connotations.</span></p><p data-reactid=".1sls390l4w0.1.4.2.3">The API is otherwise unchanged, so a simple
search-and-replace should suffice.</p><a href="../news/cloact-reagent-undo-demo.html" class="news-read-more" data-reactid=".1sls390l4w0.1.4.2.4">Read more</a></div></div></div><a href="https://github.com/holmsand/reagent" class="github-badge" data-reactid=".1sls390l4w0.2"><img style="position:absolute;top:0;left:0;border:0;" alt="Fork me on GitHub" src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png" data-reactid=".1sls390l4w0.2.0"></a></div>
<script type='text/javascript'
src='../assets/demo.js?1448548628907'></script>
<script type='text/javascript'>
setTimeout(function() {demo.mountdemo('news/index.html')}, 200);
</script>
</body>
</html>
138 changes: 138 additions & 0 deletions news/reagent-is-async.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions site/demo.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

* {
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
@@ -118,7 +118,7 @@ ul.nav > li.brand > a {
}

.demo-text > p, .demo-text > ul {
font-family: georgia, serif;
font-family: Roboto,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,sans-serif;
font-size: 18px;
line-height: 1.5em;
color: #444;
362 changes: 362 additions & 0 deletions site/demo.js

Large diffs are not rendered by default.

683 changes: 683 additions & 0 deletions site/democss.css

Large diffs are not rendered by default.