From 92b17f9053b189a09328d5fae2f8a33815b692b9 Mon Sep 17 00:00:00 2001 From: Bart Kamphorst Date: Wed, 14 Aug 2019 16:39:55 +0200 Subject: [PATCH] Removed some inline CSS. Removed footer from preview pages. --- lib/gollum/app.rb | 1 + lib/gollum/public/gollum/stylesheets/tables.scss | 4 +++- lib/gollum/templates/overview.mustache | 2 +- lib/gollum/templates/wiki_content.mustache | 2 ++ lib/gollum/views/page.rb | 2 +- test/test_page_view.rb | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index c9530d64..f93d368c 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -374,6 +374,7 @@ module Precious @bar_side = wiki.bar_side @allow_uploads = wiki.allow_uploads @navbar = false + @preview = true mustache :page end diff --git a/lib/gollum/public/gollum/stylesheets/tables.scss b/lib/gollum/public/gollum/stylesheets/tables.scss index 3c5b596a..e468072b 100644 --- a/lib/gollum/public/gollum/stylesheets/tables.scss +++ b/lib/gollum/public/gollum/stylesheets/tables.scss @@ -7,7 +7,9 @@ margin-bottom: 7em; } - +.overview { + border:none; +} /* @section compare */ .compare { diff --git a/lib/gollum/templates/overview.mustache b/lib/gollum/templates/overview.mustache index 294da93a..f97705dd 100644 --- a/lib/gollum/templates/overview.mustache +++ b/lib/gollum/templates/overview.mustache @@ -1,5 +1,5 @@
- + {{^preview}} + {{/preview}}
\ No newline at end of file diff --git a/lib/gollum/views/page.rb b/lib/gollum/views/page.rb index 2d739e82..facfe5aa 100644 --- a/lib/gollum/views/page.rb +++ b/lib/gollum/views/page.rb @@ -3,7 +3,7 @@ module Precious class Page < Layout include HasPage - attr_reader :content, :page, :header, :footer + attr_reader :content, :page, :header, :footer, :preview VALID_COUNTER_STYLES = ['decimal', 'decimal-leading-zero', 'arabic-indic', 'armenian', 'upper-armenian', 'lower-armenian', 'bengali', 'cambodian', 'khmer', 'cjk-decimal', 'devanagari', 'georgian', 'gujarati', 'gurmukhi', diff --git a/test/test_page_view.rb b/test/test_page_view.rb index d7f689e6..f8d16f92 100644 --- a/test/test_page_view.rb +++ b/test/test_page_view.rb @@ -117,7 +117,7 @@ EOS @view = Precious::Views::Page.new @view.instance_variable_set :@page, page @view.instance_variable_set :@content, page.formatted_data - assert_equal @view.breadcrumb, 'subdir /' + assert_equal @view.breadcrumb, 'subdir /' # No breadcrumb on unnested page @wiki.write_page('BC Test 2', :markdown, 'Test', commit_details)