diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 31a0c81..806f34f 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1,78 +1,86 @@ /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add here take precedence over styles defined in any styles * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * *= require bootstrap.min *= require jstree-default *= require bootstrap-chosen *= require dataTables.bootstrap.min *= require_tree . *= require_self */ /* Make sure navbar does not overlay body */ body { padding-top: 70px; } .right { text-align: right; margin-right: 0px; float: right; } .graybox { max-width: 500px; margin-right: 0; margin-left: 0; background-color: #F7F7F9; margin-bottom: 30px; } .graybox form { padding-top: 30px; } #_days_back { margin: auto 10px; } tr.fatal > td { background-color: #EA7272; } tr.fatal > td { background-color: #EA7272; } li.logo { } li.logo > a { padding-left: 60px; background: url('/images/logo.png') no-repeat scroll 4px 5px; padding-top: 5px; padding-bottom: 5px; } li.logo > a > p { font-size: 13px; margin-bottom: 0; color: #333333px; } .jstree-closed > a > i.jstree-checkbox, .jstree-open > a > i.jstree-checkbox { display: none; } .datatable-wrapper { margin-bottom: 20px; } + +.faq-link > svg { + visibility: hidden; +} + +h2:hover > a.faq-link > svg { + visibility: visible; +} diff --git a/app/models/faq.rb b/app/models/faq.rb index 04b0402..0e100d6 100644 --- a/app/models/faq.rb +++ b/app/models/faq.rb @@ -1,7 +1,13 @@ # Faq entries are short instructions for using Archiving. class Faq < ActiveRecord::Base establish_connection ARCHIVING_CONF validates :title, :body, presence: true + # Runs the markdown and returns the html output + # + # @return [String] HTML output of body + def pretty_body + Archiving.markdown.render(body).html_safe + end end diff --git a/app/views/admin/faqs/_faq.html.erb b/app/views/admin/faqs/_faq.html.erb index 4f4b081..65ec986 100644 --- a/app/views/admin/faqs/_faq.html.erb +++ b/app/views/admin/faqs/_faq.html.erb @@ -1,20 +1,20 @@
- <%= @faq.body %> + <%= @faq.pretty_body %>
Title | -Body | -
---|