From fad18e417eda9cf25d1abb38d9555cd26d6d9cac Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 11 Nov 2013 16:03:28 +0000 Subject: Switch to work with the feature/wip-switch-to-asset-pipeline branch --- lib/alavetelitheme.rb | 9 +++++++++ lib/views/general/_before_head_end.html.erb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb index 2930ba6..8476e90 100644 --- a/lib/alavetelitheme.rb +++ b/lib/alavetelitheme.rb @@ -32,6 +32,15 @@ end # something unique (e.g. yourtheme-custom-routes.rb": $alaveteli_route_extensions << 'custom-routes.rb' +# Prepend the asset directories in this theme to the asset path: +['stylesheets', 'images', 'javascripts'].each do |asset_type| + theme_asset_path = File.join(File.dirname(__FILE__), + '..', + 'assets', + asset_type) + Rails.application.config.assets.paths.unshift theme_asset_path +end + # Tell FastGettext about the theme's translations: look in the theme's # locale-theme directory for a translation in the first place, and if # it isn't found, look in the Alaveteli locale directory next: diff --git a/lib/views/general/_before_head_end.html.erb b/lib/views/general/_before_head_end.html.erb index 1644299..f8e729a 100644 --- a/lib/views/general/_before_head_end.html.erb +++ b/lib/views/general/_before_head_end.html.erb @@ -1 +1 @@ -<%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %> +<%= stylesheet_link_tag "custom" %> -- cgit v1.2.3 From f688eef1f47a2e4d2851022a7d4a70ba38beba99 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Wed, 20 Nov 2013 11:55:00 +0000 Subject: Refer to the precompiled application.css, which includes custom.css --- lib/views/general/_before_head_end.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/views/general/_before_head_end.html.erb b/lib/views/general/_before_head_end.html.erb index f8e729a..9f8f339 100644 --- a/lib/views/general/_before_head_end.html.erb +++ b/lib/views/general/_before_head_end.html.erb @@ -1 +1 @@ -<%= stylesheet_link_tag "custom" %> +<%= stylesheet_link_tag "application" %> -- cgit v1.2.3 From 0d2a72017779ba0cd7c7d40e0fa32713129333c5 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Wed, 20 Nov 2013 12:25:55 +0000 Subject: Move images out of /public and into the asset pipeline An oddity here is that I had to rename logo.png to alaveteli-logo.png, or the version from the alaveteli repository was used after precompiling the assets. (This suggests that generation of precompiled assets with "rake assets:precompile" is picking the wrong version; i.e. not going through the asset path in reverse order.) --- lib/views/general/_orglink.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/views/general/_orglink.html.erb b/lib/views/general/_orglink.html.erb index 9535a79..6a83ffb 100644 --- a/lib/views/general/_orglink.html.erb +++ b/lib/views/general/_orglink.html.erb @@ -1 +1 @@ -<%= link_to image_tag('/alavetelitheme/images/logo.png'), frontpage_url, :id=>'logo' %> +<%= link_to image_tag('alaveteli-logo.png'), frontpage_url, :id=>'logo' %> -- cgit v1.2.3 From 15b0d0771962c4d1aa7a6ae9b92273c05519f04b Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 25 Nov 2013 14:07:16 +0000 Subject: Revert renaming of the logo.png file --- lib/views/general/_orglink.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/views/general/_orglink.html.erb b/lib/views/general/_orglink.html.erb index 6a83ffb..2b91e73 100644 --- a/lib/views/general/_orglink.html.erb +++ b/lib/views/general/_orglink.html.erb @@ -1 +1 @@ -<%= link_to image_tag('alaveteli-logo.png'), frontpage_url, :id=>'logo' %> +<%= link_to image_tag('logo.png'), frontpage_url, :id=>'logo' %> -- cgit v1.2.3