Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1261)

Unified Diff: src/site/index.html

Issue 83663005: added front page samples to testing, plus a couple of tweaks to front page and code lab (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: put front page code snippets under testing, minor tweaks, fixed carousel height problem Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/site/index.html
diff --git a/src/site/index.html b/src/site/index.html
index 449a8cbce568c24c2e9cef09acf07a0e79938983..dbdefd8a84665861d88b5d028afbd164528e6305 100644
--- a/src/site/index.html
+++ b/src/site/index.html
@@ -44,9 +44,9 @@ js:
<a id="see-code" href="#code"><i class="sprite-icon-triangle"></i>See code</a>
</div>
<div class="col-md-4">
- <h2>Try Dart</h2>
+ <h2>Write Dart</h2>
<p class="timer"><i class="sprite-icon-timer"></i>About 1 hour</p>
- <p>Write a Dart web app, even if you've never written
+ <p>Follow this code lab to create a Dart web app, even if you've never written
a web app before. </p>
<a href="/codelabs/darrrt/"><i class="sprite-icon-triangle"></i>Write code</a>
</div>
@@ -92,7 +92,7 @@ js:
import 'dart:math' show Random; // Import a class from a library.
void main() { // This is where the app starts executing.
- print(new Die(<a href="#" class="dart-popover" data-toggle="popover" title="Named parameters" data-html="true" data-trigger="hover focus" data-content="Set the value of a named optional parameter. In this case, set the number of sides for a new Die object to 12.">n:12</a>).roll()); // Print a new object's value. Chain method calls.
+ print(new Die(<a href="#" class="dart-popover" data-toggle="popover" title="Named parameters" data-html="true" data-trigger="hover focus" data-content="Set the value of a named optional parameter. In this case, set the number of sides for a new Die object to 12.">n: 12</a>).roll()); // Print a new object's value. Chain method calls.
}
class Die { // Define a class.
@@ -144,18 +144,23 @@ class Ellipse {
</div>
<div class="item">
<p>Add types to your code to help people and tools.
- Or don’t. You can always go dynamic.</p>
+ Or don’t. Dart is truly dynamic.</p>
<div class="code-hldr">
- <div class="code-hldr">
- <div class="item" style="margin-top:23px">
- Without types, code freely.<br>
- <img src="imgs/no_types.png">
- </div>
- <div class="item" style="margin-top:23px;">
- With types, learn about errors early.<br>
- <img src="imgs/with_types.png">
- </div>
- </div>
+ <div style="padding-top:20px;">While prototyping, code freely without worrying about types.</div>
+<pre class="prettyprint lang-dart">
+// A function without types.
+recalculate(origin, offset, estimate) {
+ // ...
+}
+</pre>
+ <div style="padding-top:20px;">During production, use types to learn about errors early,
+ communicate intent, and get help with code completion.</div>
+<pre class="prettyprint lang-dart">
+// A function with types (and an optional parameter).
+num recalculate(Point origin, num offset, {bool estimate: false}) {
+ // ...
+}
+</pre>
</div>
</div>
<div class="item">

Powered by Google App Engine
This is Rietveld 408576698