diff --git a/README.markdown b/README.markdown index 6f9fb6d..a11df68 100644 --- a/README.markdown +++ b/README.markdown @@ -30,6 +30,10 @@ Bring Your Own Widgets! It's so easy to create your own widgets! Have a look at Have a look in the [Wiki](http://wiki.github.com/pusewicz/sonia/). +Initial documentation is available on [YardDoc](http://yardoc.org/docs/pusewicz-sonia). + +Follow Sonia on [Twitter](http://www.twitter.com/soniaappcom). + ## Note on Patches/Pull Requests * Fork the project. diff --git a/lib/sonia/helpers.rb b/lib/sonia/helpers.rb index abb35ae..ee35132 100644 --- a/lib/sonia/helpers.rb +++ b/lib/sonia/helpers.rb @@ -19,5 +19,61 @@ def widget_stylesheets file.gsub(File.join(Sonia.root, "widgets"), "/stylesheets") end end + + def joined_system_javascript + files = %w( + /javascripts/swfobject.js + /javascripts/FABridge.js + /javascripts/web_socket.js + /javascripts/prototype.js + /javascripts/effects.js + /javascripts/dragdrop.js + /javascripts/livepipe.js + /javascripts/window.js + /javascripts/resizable.js + /javascripts/cookie.js + /javascripts/storage.js + /javascripts/sonia.js + /javascripts/dispatcher.js + /javascripts/widget.js + ) + + joined_javascript files.map { |file| File.join(Sonia.root, "public", file) } + end + + def joined_system_css + files = %w( + /blueprint/reset.css + /blueprint/grid.css + /stylesheets/sonia.css + ) + + joined_css files.map { |file| File.join(Sonia.root, "public", file) } + end + + def joined_widget_javascript + joined_javascript Dir[Sonia.root + "/widgets/*/*.js"] + end + + def joined_widget_css + joined_javascript Dir[Sonia.root + "/widgets/*/*.css"] + end + + def init_javascript + File.read(File.join(Sonia.root, "public", "javascripts", "init.js")) + end + + private + def joined_javascript(files) + javascript = "" + + files.each do |file| + javascript += "/** #{file} **/\n" + javascript += File.read(file) + end + + javascript + end + alias_method :joined_css, :joined_javascript end end diff --git a/public/favicon.ico b/public/favicon.ico index 680f62a..474a800 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/images/sonia_apple_touch.png b/public/images/sonia_apple_touch.png new file mode 100644 index 0000000..14fbb11 Binary files /dev/null and b/public/images/sonia_apple_touch.png differ diff --git a/public/stylesheets/sonia.css b/public/stylesheets/sonia.css index c46f61e..8d08349 100644 --- a/public/stylesheets/sonia.css +++ b/public/stylesheets/sonia.css @@ -30,6 +30,15 @@ h1 { right: 10px; top: 10px; background-image: url('/images/project_sonia.png'); + z-index: 100; +} + +#widgets { + overflow: hidden; + display: block; + width: 100%; + height: 100%; + position: absolute; } div.widget { diff --git a/public/vendor/scriptaculous.js b/public/vendor/scriptaculous.js deleted file mode 100644 index 6bf437a..0000000 --- a/public/vendor/scriptaculous.js +++ /dev/null @@ -1,68 +0,0 @@ -// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 - -// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -var Scriptaculous = { - Version: '1.8.3', - require: function(libraryName) { - try{ - // inserting via DOM fails in Safari 2.0, so brute force approach - document.write('