From 2b910167f418d479210fa502b48aebf507915db7 Mon Sep 17 00:00:00 2001 From: Daniel Kimsey Date: Mon, 19 Nov 2012 13:20:09 -0500 Subject: [PATCH] Fixed custom.css to apply to all views --- lib/gollum/frontend/app.rb | 1 + lib/gollum/frontend/templates/file_view.mustache | 1 + lib/gollum/frontend/views/layout.rb | 5 +++++ lib/gollum/frontend/views/page.rb | 4 ---- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 2d3bd14d..5910271a 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -85,6 +85,7 @@ module Precious @base_url = url('/', false).chomp('/') # above will detect base_path when it's used with map in a config.ru settings.wiki_options.merge!({ :base_path => @base_url }) + @css = settings.wiki_options[:css] end get '/' do diff --git a/lib/gollum/frontend/templates/file_view.mustache b/lib/gollum/frontend/templates/file_view.mustache index 455f1bba..16e9f968 100644 --- a/lib/gollum/frontend/templates/file_view.mustache +++ b/lib/gollum/frontend/templates/file_view.mustache @@ -5,6 +5,7 @@ + {{#css}}{{/css}} {{title}} diff --git a/lib/gollum/frontend/views/layout.rb b/lib/gollum/frontend/views/layout.rb index 959cda3c..3dcd4ecd 100644 --- a/lib/gollum/frontend/views/layout.rb +++ b/lib/gollum/frontend/views/layout.rb @@ -23,6 +23,11 @@ module Precious def base_url @base_url end + + def css # custom css + @css + end + end end end diff --git a/lib/gollum/frontend/views/page.rb b/lib/gollum/frontend/views/page.rb index ff404f78..9dbcbb8b 100644 --- a/lib/gollum/frontend/views/page.rb +++ b/lib/gollum/frontend/views/page.rb @@ -89,10 +89,6 @@ module Precious @mathjax end - def css # custom css - @css - end - def use_identicon @page.wiki.user_icons == 'identicon' end