OLD | NEW |
1 --- | 1 --- |
2 layout: default | 2 layout: default |
3 title: "Dart Code Samples" | 3 title: "Dart Code Samples" |
4 description: Check out some Dart code in action with these samples, ranging | 4 description: Check out some Dart code in action with these samples, ranging |
5 from Hello, World to a solar system simulator. | 5 from Hello, World to a solar system simulator. |
| 6 header: |
| 7 css: ["/samples/samples.css"] |
6 --- | 8 --- |
7 | 9 |
8 # {{ page.title }} | 10 # {{ page.title }} |
9 | 11 |
10 The <a | 12 The <a |
11 href="https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/s
amples/">dart/samples</a> | 13 href="https://github.com/dart-lang/bleeding_edge/tree/master/dart/samples">dart/
samples</a> |
12 directory contains many applications written in Dart. | 14 directory contains many applications written in Dart. |
13 Some of these samples are available in [Dart Editor](/editor/) for easy | 15 Some of these samples are available in [Dart Editor](/tools/editor/) for easy |
14 experimentation. | 16 experimentation. |
15 | 17 |
16 {% injectdata samples samples/samples.yaml %} | 18 {% injectdata samples samples/samples.yaml %} |
| 19 <div class="row"> |
| 20 <div class="span6"> |
| 21 {% for group in page.samples.col1 %} |
| 22 <div class="group-heading">{{ group.heading }}</div> |
| 23 {% for example in group.examples %} |
| 24 <div class="row-fluid example"> |
| 25 <div class="span8"> |
| 26 <div class="title"><a href="{{ example.explanation_url }}">{{ exampl
e.title }}</a></div> |
| 27 </div> |
| 28 <div class="span2"> |
| 29 <div class="link"><a href="{{ example.source_url }}">Source</a></div
> |
| 30 </div> |
| 31 <div class="span2"> |
| 32 {% if example.tryit_url %} |
| 33 <div class="link"><a href="{{ example.tryit_url }}">Try it</a></di
v> |
| 34 {% endif %} |
| 35 </div> |
| 36 </div> |
| 37 {% endfor %} |
| 38 {% endfor %} |
| 39 </div> |
| 40 <div class="span6"> |
| 41 {% for group in page.samples.col2 %} |
| 42 <div class="group-heading">{{ group.heading }}</div> |
| 43 {% for example in group.examples %} |
| 44 <div class="row-fluid example"> |
| 45 <div class="span8"> |
| 46 <div class="title"><a href="{{ example.explanation_url }}">{{ exampl
e.title }}</a></div> |
| 47 </div> |
| 48 <div class="span2"> |
| 49 <div class="link"><a href="{{ example.source_url }}">Source</a></div
> |
| 50 </div> |
| 51 <div class="span2"> |
| 52 <div class="link"><a href="{{ example.tryit_url }}">Try it</a></div> |
| 53 </div> |
| 54 </div> |
| 55 {% endfor %} |
| 56 {% endfor %} |
| 57 </div> |
| 58 </div> |
17 | 59 |
18 <ul class="thumbnails"> | |
19 | |
20 {% for sample in page.samples.row01 %} | |
21 <li class="span4"> | |
22 <div class="thumbnail"> | |
23 <img src="imgs/{{ sample.name }}.png" alt="{{ sample.alt }}"> | |
24 <h3>{{ sample.title }}</h3> | |
25 <p> | |
26 {{ sample.desc }} | |
27 </p> | |
28 <p> | |
29 <a href="{{ sample.source_url }}">View the source.</a> | |
30 {% if sample.live_url %} | |
31 <a href="{{ sample.live_url }}">Try it live.</a> | |
32 {% endif %} | |
33 </p> | |
34 <ul> | |
35 {% for feature in sample.features %} | |
36 <li>{{ feature }}</li> | |
37 {% endfor %} | |
38 </ul> | |
39 </div> | |
40 </li> | |
41 {% endfor %} | |
42 | |
43 </ul> | |
44 | |
45 <ul class="thumbnails"> | |
46 | |
47 {% for sample in page.samples.row02 %} | |
48 <li class="span4"> | |
49 <div class="thumbnail"> | |
50 <img src="imgs/{{ sample.name }}.png" alt="{{ sample.alt }}"> | |
51 <h3>{{ sample.title }}</h3> | |
52 <p> | |
53 {{ sample.desc }} | |
54 </p> | |
55 <p> | |
56 <a href="{{ sample.source_url }}">View the source.</a> | |
57 {% if sample.live_url %} | |
58 <a href="{{ sample.live_url }}">Try it live.</a> | |
59 {% endif %} | |
60 </p> | |
61 <ul> | |
62 {% for feature in sample.features %} | |
63 <li>{{ feature }}</li> | |
64 {% endfor %} | |
65 </ul> | |
66 </div> | |
67 </li> | |
68 {% endfor %} | |
69 | |
70 </ul> | |
71 | |
72 <ul class="thumbnails"> | |
73 | |
74 {% for sample in page.samples.row03 %} | |
75 <li class="span4"> | |
76 <div class="thumbnail"> | |
77 <img src="imgs/{{ sample.name }}.png" alt="{{ sample.alt }}"> | |
78 <h3>{{ sample.title }}</h3> | |
79 <p> | |
80 {{ sample.desc }} | |
81 </p> | |
82 <p> | |
83 <a href="{{ sample.source_url }}">View the source.</a> | |
84 {% if sample.live_url %} | |
85 <a href="{{ sample.live_url }}">Try it live.</a> | |
86 {% endif %} | |
87 </p> | |
88 <ul> | |
89 {% for feature in sample.features %} | |
90 <li>{{ feature }}</li> | |
91 {% endfor %} | |
92 </ul> | |
93 </div> | |
94 </li> | |
95 {% endfor %} | |
96 | |
97 </ul> | |
OLD | NEW |