From 8cafffa82d4b63a9c585ca6893135fa022f4635a Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Sat, 25 Jan 2014 19:44:47 -0800 Subject: [PATCH] "atoms" example Demonstrates "components" using the new convention where keyword args with no positional args become the data context. --- examples/unfinished/atoms/.meteor/.gitignore | 1 + examples/unfinished/atoms/.meteor/packages | 9 +++++++ examples/unfinished/atoms/.meteor/release | 1 + examples/unfinished/atoms/atoms.css | 12 +++++++++ examples/unfinished/atoms/atoms.html | 28 ++++++++++++++++++++ examples/unfinished/atoms/atoms.js | 5 ++++ 6 files changed, 56 insertions(+) create mode 100644 examples/unfinished/atoms/.meteor/.gitignore create mode 100644 examples/unfinished/atoms/.meteor/packages create mode 100644 examples/unfinished/atoms/.meteor/release create mode 100644 examples/unfinished/atoms/atoms.css create mode 100644 examples/unfinished/atoms/atoms.html create mode 100644 examples/unfinished/atoms/atoms.js diff --git a/examples/unfinished/atoms/.meteor/.gitignore b/examples/unfinished/atoms/.meteor/.gitignore new file mode 100644 index 0000000000..4083037423 --- /dev/null +++ b/examples/unfinished/atoms/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/examples/unfinished/atoms/.meteor/packages b/examples/unfinished/atoms/.meteor/packages new file mode 100644 index 0000000000..1826f1fa52 --- /dev/null +++ b/examples/unfinished/atoms/.meteor/packages @@ -0,0 +1,9 @@ +# Meteor packages used by this project, one per line. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +standard-app-packages +autopublish +insecure +underscore diff --git a/examples/unfinished/atoms/.meteor/release b/examples/unfinished/atoms/.meteor/release new file mode 100644 index 0000000000..621e94f0ec --- /dev/null +++ b/examples/unfinished/atoms/.meteor/release @@ -0,0 +1 @@ +none diff --git a/examples/unfinished/atoms/atoms.css b/examples/unfinished/atoms/atoms.css new file mode 100644 index 0000000000..038920b4ab --- /dev/null +++ b/examples/unfinished/atoms/atoms.css @@ -0,0 +1,12 @@ +g[class=atom] circle { + stroke: black; + stroke-width: 3px; +} + +g[class=atom] text { + font-family: Arial, sans-serif; + font-size: 24px; + fill: black; + font-weight: bold; + text-anchor: middle; +} \ No newline at end of file diff --git a/examples/unfinished/atoms/atoms.html b/examples/unfinished/atoms/atoms.html new file mode 100644 index 0000000000..17071cb135 --- /dev/null +++ b/examples/unfinished/atoms/atoms.html @@ -0,0 +1,28 @@ + + SVG Clock + + + +
+ + {{#atom x=100 y=100 color="#ffff00"}}O{{/atom}} + {{> hydrogen x=150 y=100}} + {{#giantatom x=250 y=100 color="#ff9999"}}My{{/giantatom}} + +
+ + + + + + + diff --git a/examples/unfinished/atoms/atoms.js b/examples/unfinished/atoms/atoms.js new file mode 100644 index 0000000000..d6cbcb9c39 --- /dev/null +++ b/examples/unfinished/atoms/atoms.js @@ -0,0 +1,5 @@ +if (Meteor.isClient) { + Template.atom.textY = function () { + return this.y + 8; + }; +} \ No newline at end of file