From cc23dcc36169115637f8da97bd4131e940729ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=20Rodr=C3=ADguez?= Date: Sun, 20 Aug 2017 01:12:35 +0200 Subject: [PATCH] Extra unrelated set of fixes (#65) * Remove dead unused code. * Inline navbar navigation items. * Link to the community and chat server * Fix invalid markup causing validation errors. * Update dependencies for JavaScript packages. --- app/assets/stylesheets/application.scss | 11 +++ app/helpers/application_helper.rb | 21 ------ app/views/layouts/_footer.html.erb | 77 ++++++++++---------- app/views/layouts/_head.html.erb | 1 + app/views/layouts/_header.html.erb | 16 ++-- app/views/layouts/dashboard/_header.html.erb | 11 +-- app/views/playlists/show.html.erb | 3 +- app/views/topics/show.html.erb | 3 +- app/views/videos/show.html.erb | 3 +- config/locales/dashboard.es.yml | 1 + config/locales/es.yml | 4 +- yarn.lock | 46 ++++++------ 12 files changed, 99 insertions(+), 98 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index dc67a68c..59c4c632 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -24,7 +24,18 @@ body { .navbar-toggle .icon-bar { background: white; } + .navbar-brand { padding-right: 40px; } + a { color: white; } + + .label { + text-transform: uppercase; + font-weight: normal; + font-size: 80%; + padding-top: 0.3em; + margin-left: 6px; + background: lighten(#993300, 10%); + } .navbar-nav { margin-top: 0; diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 80ce599a..a094143c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,14 +10,6 @@ def canonical_url url_for only_path: false, params: parameters end - # This helper automatically will add "current" class on to a
  • item - # as required by Bootstrap to show the navbar item using 'current' style. - def navigation_link text, url - content_tag(:li, class: "nav-item #{current_page?(url) ? 'active' : ''}") do - link_to text, url, class: 'nav-link' - end - end - def running_time sec, options = {} if sec >= 3600 || (!options[:full].nil? && options[:full] == true) '%d:%02d:%02d' % [ sec / 3600, (sec % 3600) / 60, sec % 60] @@ -46,17 +38,4 @@ def to_markdown text markdown = Redcarpet::Markdown.new(render) markdown.render(text).html_safe end - - # TODO: Remove this method after it has been tested that is not used. - def horizontal_form_for(resource, options = {}, &block) - options[:html] = { class: 'form-horizontal' } - options[:wrapper] = :horizontal_form - options[:wrapper_mappings] = { - check_boxes: :horizontal_radio_and_checkboxes, - radio_buttons: :horizontal_radio_and_checkboxes, - file: :horizontal_file_input, - boolean: :horizontal_boolean - } - simple_form_for(resource, options, &block) - end end diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index d83e1a25..3f00924b 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,49 +1,50 @@