Skip to content

Commit 5fe2841

Browse files
committed
Proper homepage and fix the layout in old IE.
1 parent a0da507 commit 5fe2841

File tree

8 files changed

+162
-54
lines changed

8 files changed

+162
-54
lines changed
Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
/**
22
* CSS overrides for ReactJS.NET
33
*/
4-
.nav-main .nav-home {
4+
.nav-main .nav-home,
5+
.hero strong {
56
color: #ff87d6;
67
}
8+
9+
.hero {
10+
height: auto;
11+
padding-bottom: 50px;
12+
}
13+
14+
#examples {
15+
p {
16+
max-width: none;
17+
}
18+
.example {
19+
overflow: hidden;
20+
}
21+
.example-desc {
22+
width: 270px;
23+
float: left;
24+
}
25+
.example-code {
26+
width: 620px;
27+
float: right;
28+
29+
p {
30+
display: none;
31+
}
32+
.highlight {
33+
padding: 4px;
34+
}
35+
.highlight:after {
36+
display: none;
37+
}
38+
}
39+
}

site/jekyll/_layouts/default.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
ga('create', 'UA-25623237-6', 'reactjs.net');
2727
ga('send', 'pageview');
2828
</script>
29+
<!--[if lt IE 9]>
30+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
31+
<![endif]-->
2932
</head>
3033
<body>
3134
<div class="container">
@@ -35,7 +38,7 @@
3538
{{ site.name }}
3639
</a>
3740
<ul class="nav-site">
38-
<li><a href="/getting-started/getting-started.html"{% if page.sectionid == 'docs' %} class="active"{% endif %}>Docs</a></li>
41+
<li><a href="/docs"{% if page.sectionid == 'docs' %} class="active"{% endif %}>Docs</a></li>
3942
<li><a href="/download">Download</a></li>
4043
<li><a href="http://github.com/reactjs/React.NET">GitHub</a>
4144
</ul>

site/jekyll/_layouts/page.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
5+
<section class="content wrap">
6+
{{ content }}
7+
</section>

site/jekyll/css/react.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

site/jekyll/index.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
layout: default
3+
title: A JavaScript library for building user interfaces
4+
id: home
5+
---
6+
<div class="hero">
7+
<div class="wrap">
8+
<div class="text"><strong>ReactJS.NET</strong></div>
9+
<div class="minitext">
10+
React ♥ C# and ASP.NET MVC
11+
</div>
12+
</div>
13+
</div>
14+
<section class="content wrap">
15+
<section class="home-section">
16+
<p>
17+
ReactJS.NET makes it easier to use Facebook's
18+
[React](http://facebook.github.io/react/) and
19+
[JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) from C# and
20+
other .NET languages, focusing specifically on ASP.NET MVC (although it
21+
also works in other environments). It assumes you already know the basics
22+
of React and its usage. If not, check out the
23+
[React tutorial](http://facebook.github.io/react/docs/tutorial.html) first.
24+
</p>
25+
<div id="examples">
26+
<div class="example">
27+
<h3>On-the-fly [JSX to JavaScript compilation](/getting-started/usage.html)</h3>
28+
<div class="example-desc">
29+
<p>
30+
Simply name your file with a `.jsx` extension and link to the
31+
file via a `script` tag.
32+
</p>
33+
<p>
34+
The files will automatically be compiled to JavaScript and cached
35+
server-side. No precompilation required. Perfect for development.
36+
</p>
37+
</div>
38+
<div class="example-code">
39+
40+
```javascript
41+
// /Scripts/HelloWorld.jsx
42+
var HelloWorld = React.createClass({
43+
render: function() {
44+
return <div>Hello world!</div>;
45+
}
46+
});
47+
```
48+
```html
49+
<!-- Reference it from HTML -->
50+
<script src="@Url.Content("~/Scripts/HelloWorld.jsx")"></script>
51+
```
52+
</div>
53+
</div>
54+
<div class="example">
55+
<h3>JSX to JavaScript compilation via popular minification/combination libraries</h3>
56+
<div class="example-desc">
57+
<p>
58+
Use Cassette or ASP.NET Minification and Combination? ReactJS.NET's
59+
got you covered.
60+
</p>
61+
<p>
62+
Reference your JSX files and they will be included in your bundles
63+
along with your other JavaScript files.
64+
</p>
65+
</div>
66+
<div class="example-code">
67+
68+
```csharp
69+
// In BundleConfig.cs
70+
bundles.Add(new JsxBundle("~/bundles/main").Include(
71+
// Add your JSX files here
72+
"~/Scripts/HelloWorld.jsx",
73+
"~/Scripts/AnythingElse.jsx",
74+
// You can include regular JavaScript files in the bundle too
75+
"~/Scripts/ajax.js",
76+
));
77+
```
78+
```html
79+
<!-- In your view -->
80+
@Scripts.Render("~/bundles/main")
81+
```
82+
</div>
83+
</div>
84+
<div class="example">
85+
<h3>[Server-side component rendering](http://reactjs.net/guides/server-side-rendering.html)</h3>
86+
<div class="example-desc">
87+
<p>
88+
Pre-render the initial state of your React components server-side to
89+
make the initial load feel faster.
90+
</p>
91+
</div>
92+
<div class="example-code">
93+
94+
```html
95+
<!-- This will render the component server-side -->
96+
@Html.React("CommentsBox", new {
97+
initialComments = Model.Comments
98+
})
99+
100+
<!-- Initialise the component in JavaScript too -->
101+
<script src="http://fb.me/react-0.10.0.min.js"></script>
102+
@Scripts.Render("~/bundles/main")
103+
@Html.ReactInitJavaScript()
104+
```
105+
</div>
106+
</div>
107+
</div>
108+
</section>
109+
<hr class="home-divider" />
110+
<section class="home-bottom-section">
111+
<div class="buttons-unit">
112+
<a href="/download" class="button">Get Started</a>
113+
</div>
114+
</section>
115+
</section>

site/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
server {
22
server_name reactjs.net localdev.reactjs.net;
33
root /var/www/reactjs.net/site/public/;
4-
index index.htm index.php;
4+
index index.html index.php;
55

66
# Shortcuts
77
rewrite ^/download$ /getting-started/download.html redirect;

site/public/index.htm

Lines changed: 0 additions & 50 deletions
This file was deleted.

site/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../jekyll/_site/index.html

0 commit comments

Comments
 (0)