Commit 854f083f authored by Adam Barth's avatar Adam Barth

Clean up examples directory

1) Merge input example into widgets example
2) Move single-file, non-fn examples into a "raw" directory
3) Rename stocks-fn and widgets-fn to stocks and widgets

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1005393006
parent 20a4c66a
#!mojo mojo:sky_viewer #!mojo mojo:sky_viewer
<div><!-- remove this element once Document can have multiple element children -->
<style> <style>
.h1 { font-size: 2em; margin: 1em; } .h1 { font-size: 2em; margin: 1em; }
.p { margin: 0.5em 1em; color: #bcd8f5; font-weight: 900; } .p { margin: 0.5em 1em; color: #bcd8f5; font-weight: 900; }
</style> </style>
<div class="h1">about:blank</div> <div class="h1">about:blank</div>
<div class="p">Welcome to Sky!</div> <div class="p">Welcome to Sky!</div>
</div>
#!mojo mojo:sky_viewer
<sky>
<import src="/sky/framework/debug/shake-to-reload.sky" />
<script>
import 'input_app.dart';
main() {
new InputApp();
}
</script>
</sky>
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/framework/fn.dart';
import 'package:sky/framework/components/input.dart';
class InputApp extends App {
Node build() {
return new Input();
}
}
...@@ -10,8 +10,12 @@ dot { ...@@ -10,8 +10,12 @@ dot {
border-radius: 5px; border-radius: 5px;
opacity: .75; opacity: .75;
} }
log {
margin-top: 50px;
}
</style> </style>
<log>Ready!</log> <log>Touch the screen!</log>
<script> <script>
import "dart:sky"; import "dart:sky";
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import 'package:sky/framework/fn.dart'; import 'package:sky/framework/fn.dart';
import 'package:sky/framework/components/button.dart'; import 'package:sky/framework/components/button.dart';
import 'package:sky/framework/components/input.dart';
import 'package:sky/framework/components/popup_menu.dart'; import 'package:sky/framework/components/popup_menu.dart';
class WidgetsApp extends App { class WidgetsApp extends App {
...@@ -17,6 +18,7 @@ class WidgetsApp extends App { ...@@ -17,6 +18,7 @@ class WidgetsApp extends App {
children: [ children: [
new Button(key: 'Go', content: new Text('Go'), level: 1), new Button(key: 'Go', content: new Text('Go'), level: 1),
new Button(key: 'Back', content: new Text('Back'), level: 3), new Button(key: 'Back', content: new Text('Back'), level: 3),
new Input(),
new Container( new Container(
style: _menuStyle, style: _menuStyle,
children: [ children: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment