Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed custom.css to apply to all views

  • Loading branch information...
commit 2b910167f418d479210fa502b48aebf507915db7 1 parent f5581c4
@dekimsey dekimsey authored
View
1  lib/gollum/frontend/app.rb
@@ -85,6 +85,7 @@ def supported_useragent?(user_agent)
@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
View
1  lib/gollum/frontend/templates/file_view.mustache
@@ -5,6 +5,7 @@
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/gollum.css" media="all">
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/template.css" media="all">
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/_styles.css" media="all">
+ {{#css}}<link rel="stylesheet" type="text/css" href="{{base_url}}/custom.css" media="all">{{/css}}
<title>{{title}}</title>
</head>
<body>
View
5 lib/gollum/frontend/views/layout.rb
@@ -23,6 +23,11 @@ def has_path
def base_url
@base_url
end
+
+ def css # custom css
+ @css
+ end
+
end
end
end
View
4 lib/gollum/frontend/views/page.rb
@@ -89,10 +89,6 @@ def mathjax
@mathjax
end
- def css # custom css
- @css
- end
-
def use_identicon
@page.wiki.user_icons == 'identicon'
end
Please sign in to comment.
Something went wrong with that request. Please try again.