File tree Expand file tree Collapse file tree 13 files changed +175
-0
lines changed Expand file tree Collapse file tree 13 files changed +175
-0
lines changed Original file line number Diff line number Diff line change
1
+ .DS_Store
Original file line number Diff line number Diff line change
1
+ name : tutorialsamples
2
+ description : A sample application
3
+
4
+ # dependencies:
5
+ # unittest: { sdk: unittest }
Original file line number Diff line number Diff line change
1
+
2
+ body {
3
+ background-color : # F8F8F8 ;
4
+ font-family : 'Open Sans' , sans-serif;
5
+ font-size : 14px ;
6
+ font-weight : normal;
7
+ line-height : 1.2em ;
8
+ margin : 15px ;
9
+ }
10
+
11
+ p {
12
+ color : # 333 ;
13
+ }
14
+
15
+ # container {
16
+ width : 100% ;
17
+ height : 400px ;
18
+ position : relative;
19
+ border : 1px solid # ccc ;
20
+ background-color : # fff ;
21
+ }
22
+
23
+ # text {
24
+ font-size : 24pt ;
25
+ text-align : center;
26
+ margin-top : 140px ;
27
+ }
Original file line number Diff line number Diff line change
1
+ import 'dart:html' ;
2
+
3
+ void main () {
4
+ query ("#text" )
5
+ ..text = "Click me!"
6
+ ..on .click.add (reverseText);
7
+ }
8
+
9
+ void reverseText (Event event) {
10
+ var text = query ("#text" ).text;
11
+ var buffer = new StringBuffer ();
12
+ for (int i = text.length - 1 ; i >= 0 ; i-- ) {
13
+ buffer.add (text[i]);
14
+ }
15
+ query ("#text" ).text = buffer.toString ();
16
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+
3
+ < html >
4
+ < head >
5
+ < meta charset ="utf-8 ">
6
+ < title > Clickme</ title >
7
+ < link rel ="stylesheet " href ="clickme.css ">
8
+ </ head >
9
+ < body >
10
+ < h1 > Clickme</ h1 >
11
+
12
+ < p > Hello world from Dart!</ p >
13
+
14
+ < div id ="container ">
15
+ < p id ="text "> </ p >
16
+ </ div >
17
+
18
+ < script type ="application/dart " src ="clickme.dart "> </ script >
19
+ < script src ="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js "> </ script >
20
+ </ body >
21
+ </ html >
Original file line number Diff line number Diff line change
1
+ void main () {
2
+ print ("Hello, World!" );
3
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+
3
+ < html >
4
+ < head >
5
+ < title > A Minimalist App</ title >
6
+ < link rel ="stylesheet " href ="mini.css ">
7
+ </ head >
8
+ < body >
9
+ < p id ="RipVanWinkle "> </ p >
10
+ < script type ="application/dart " src ="mini.dart "> </ script >
11
+ < script src ="http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js "> </ script >
12
+ </ body >
13
+ </ html >
Original file line number Diff line number Diff line change
1
+ # RipVanWinkle {
2
+ font-size : 20px ;
3
+ font-family : 'Open Sans' , sans-serif;
4
+ text-align : center;
5
+ margin-top : 20px ;
6
+ background-color : SlateBlue;
7
+ color : Yellow;
8
+ }
Original file line number Diff line number Diff line change
1
+ import 'dart:html' ;
2
+
3
+ void main () {
4
+ query ('#RipVanWinkle' ).text = "Wake up, sleepy head!" ;
5
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+
3
+ < html >
4
+ < head >
5
+ < title > A Minimalist App</ title >
6
+ </ head >
7
+ < body >
8
+ < p id ="RipVanWinkle "> </ p >
9
+ < script type ="application/dart " src ="mini.dart "> </ script >
10
+ < script src ="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js "> </ script >
11
+ </ body >
12
+ </ html >
You can’t perform that action at this time.
0 commit comments