diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index 480890d2..8728c48d 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -54,6 +54,7 @@ header align-items: center background: #00ff0060 border-radius: 0 18em 0 0 + font-size: 2em #home-headline, .home-headline @@ -157,6 +158,13 @@ footer img width: 4em height: 4em + .footer-tokens + text-align: left + a + padding: 2em + background: #e1b02733 + box-shadow: 0px 0px 8px #00000042 + border-radius: 12em #skyspaces width: 100% diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a2fd03ce..a0dcdd76 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base protect_from_forgery unless: -> { request.format.json? } # skip_before_action :verify_authenticity_token after_action :flash_to_http_header + before_action :get_footer_tokens if (Rails.env.development? || Rails.env.test?) include Pundit @@ -14,6 +15,10 @@ class ApplicationController < ActionController::Base private + def get_footer_tokens + @footer_tokens = authorize Token.all + end + def add_body_css_class(css_class) @body_css_classes ||= [] @body_css_classes << css_class diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 080fa497..55ce3bbe 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -1 +1,5 @@ -# = link_to (image_tag "telegram-logo.png", height: 32, width: 32), "https://t.me/+IEp-tAetjYozYWM5" +-# - @tokens = Token.all +.footer-tokens + - @footer_tokens.each do |token| + = link_to token.name, token