aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-02-25 17:35:28 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-02-25 17:35:28 +0000
commit5ff760648e7c54ddc616e5b47a30c05126fd1af3 (patch)
treebacc831f6f3fe540f6e8f445702fe896ecb3e976
initial commit
-rw-r--r--.gitignore10
-rw-r--r--MIT-LICENSE20
-rw-r--r--README19
-rw-r--r--Rakefile0
-rw-r--r--init.rb1
-rw-r--r--install.rb1
-rw-r--r--lib/alavetelitheme.rb7
-rw-r--r--lib/views/general/custom_css.rhtml8
-rw-r--r--lib/views/help/about.es.rhtml8
-rw-r--r--lib/views/help/about.rhtml9
-rw-r--r--tasks/alavetelitheme_tasks.rake4
-rw-r--r--test/alavetelitheme_test.rb8
-rw-r--r--test/test_helper.rb3
-rw-r--r--uninstall.rb1
14 files changed, 99 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..50dfd41
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+/tmp
+/log
+/coverage
+/sqlitedbs
+/cache
+/old-cache
+.*.swp
+*~
+*#*#
+TAGS
diff --git a/MIT-LICENSE b/MIT-LICENSE
new file mode 100644
index 0000000..a6ab339
--- /dev/null
+++ b/MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2011 Seb Bacon
+
+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.
diff --git a/README b/README
new file mode 100644
index 0000000..bcaf43d
--- /dev/null
+++ b/README
@@ -0,0 +1,19 @@
+Alavetelitheme
+==============
+
+This is a "hello world" type theme package for Alaveteli.
+
+The intention is to support simple overlaying of templates and
+resources without the need to touch the core Alaveteli software.
+
+Typical usage should be limited to:
+
+ * Putting CSS-based customisations in lib/views/general/custom_css.rhtml
+
+ * Creating your own versions of non-functional pages (like "about
+ us", at lib/views/help/about.rhtml -- and/or localised versions at
+ lib/views/help/about.es.rhtml)
+
+
+
+Copyright (c) 2011 Seb Bacon, released under the MIT license
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Rakefile
diff --git a/init.rb b/init.rb
new file mode 100644
index 0000000..0014c62
--- /dev/null
+++ b/init.rb
@@ -0,0 +1 @@
+require "alavetelitheme.rb"
diff --git a/install.rb b/install.rb
new file mode 100644
index 0000000..f7732d3
--- /dev/null
+++ b/install.rb
@@ -0,0 +1 @@
+# Install hook code here
diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb
new file mode 100644
index 0000000..fa2749c
--- /dev/null
+++ b/lib/alavetelitheme.rb
@@ -0,0 +1,7 @@
+class ActionController::Base
+ before_filter :set_view_paths
+
+ def set_view_paths
+ self.prepend_view_path File.join(File.dirname(__FILE__), "views")
+ end
+end
diff --git a/lib/views/general/custom_css.rhtml b/lib/views/general/custom_css.rhtml
new file mode 100644
index 0000000..53fc399
--- /dev/null
+++ b/lib/views/general/custom_css.rhtml
@@ -0,0 +1,8 @@
+
+#header #tagline {
+ color: red;
+}
+
+h1 {
+ color: blue ! important;
+}
diff --git a/lib/views/help/about.es.rhtml b/lib/views/help/about.es.rhtml
new file mode 100644
index 0000000..4e25a09
--- /dev/null
+++ b/lib/views/help/about.es.rhtml
@@ -0,0 +1,8 @@
+<% @title = "Sobre" %>
+
+<%= render :partial => 'sidebar' %>
+
+<h1>¡Bonjiorno amis!</h1>
+
+<p>Esta sito tu aidare a faire los requestio</p>
+
diff --git a/lib/views/help/about.rhtml b/lib/views/help/about.rhtml
new file mode 100644
index 0000000..1868910
--- /dev/null
+++ b/lib/views/help/about.rhtml
@@ -0,0 +1,9 @@
+<% @title = "About" %>
+
+<%= render :partial => 'sidebar' %>
+
+<h1 id="introduction">Introduction to WhatDoTheyKnow <a href="#introduction">#</a> </h1>
+
+<p>This is a custom "about" page</p>
+
+
diff --git a/tasks/alavetelitheme_tasks.rake b/tasks/alavetelitheme_tasks.rake
new file mode 100644
index 0000000..1f1925b
--- /dev/null
+++ b/tasks/alavetelitheme_tasks.rake
@@ -0,0 +1,4 @@
+# desc "Explaining what the task does"
+# task :alavetelitheme do
+# # Task goes here
+# end
diff --git a/test/alavetelitheme_test.rb b/test/alavetelitheme_test.rb
new file mode 100644
index 0000000..9e9e34f
--- /dev/null
+++ b/test/alavetelitheme_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class AlavetelithemeTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
diff --git a/test/test_helper.rb b/test/test_helper.rb
new file mode 100644
index 0000000..cf148b8
--- /dev/null
+++ b/test/test_helper.rb
@@ -0,0 +1,3 @@
+require 'rubygems'
+require 'active_support'
+require 'active_support/test_case' \ No newline at end of file
diff --git a/uninstall.rb b/uninstall.rb
new file mode 100644
index 0000000..9738333
--- /dev/null
+++ b/uninstall.rb
@@ -0,0 +1 @@
+# Uninstall hook code here