diff --git a/app/assets/stylesheets/_banner.scss b/app/assets/stylesheets/_banner.scss new file mode 100644 index 00000000..a3445306 --- /dev/null +++ b/app/assets/stylesheets/_banner.scss @@ -0,0 +1,23 @@ +#banner { + text-align: center; + background-color: #e1f0fb; + padding: 20px 0px 10px 0px; + border-bottom: #0060a7 solid 2px; + color: #0060a7; + h1 { + font-size: 24px; + font-weight: bold; + } + p { + font-size: 18px; + } + a { + text-decoration: underline; + } + } + + @media all and (max-width: 860px) { + #banner { + padding: 10px 3px 5px 3px; + } + } \ No newline at end of file diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 7faf156b..6658fb54 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -12,6 +12,7 @@ */ @import "settings"; +@import "banner"; @import "header"; @import "footer"; @import "bootstrap"; diff --git a/app/helpers/banner_helper.rb b/app/helpers/banner_helper.rb new file mode 100644 index 00000000..dc6c0753 --- /dev/null +++ b/app/helpers/banner_helper.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +require "yaml" + +module BannerHelper + def banner_content + @yaml_data = YAML.load_file("config/banner.yml") + return false if @yaml_data[Rails.env].nil? + @banner_title = @yaml_data[Rails.env]["title"] + @banner_body = @yaml_data[Rails.env]["body"] + end +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a5663475..58ef766b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -27,6 +27,7 @@
+ <%= render partial: 'shared/banner' %> <%= render partial: 'shared/header' %>