From 2ed107c5e6a7d4da000ef045b802cf89dfd6ce23 Mon Sep 17 00:00:00 2001 From: "Justin Craig-Kuhn (JCK)" Date: Thu, 5 Oct 2023 12:13:19 -0700 Subject: [PATCH] Cleanup --- Gemfile | 2 +- Gemfile.lock | 10 ++--- app/helpers/track_helper.rb | 3 +- app/javascript/packs/application.css.scss | 37 +++++-------------- .../shared/_context_menu_for_show.html.slim | 2 +- app/views/shared/_sort_filter.html.slim | 12 +++--- .../_sort_songs_and_venues_filter.html.slim | 12 +++--- config/environments/development.rb | 4 -- config/environments/production.rb | 15 -------- 9 files changed, 32 insertions(+), 65 deletions(-) diff --git a/Gemfile b/Gemfile index 1913a94a..95de0f1e 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'shrine' gem 'slim' gem 'typhoeus' gem 'waveformjson' -gem 'will_paginate', '< 4' # 4.0 breaks bootstrap-will_paginate # TODO: Can upgrade? +gem 'will_paginate' group :development do gem 'bullet' diff --git a/Gemfile.lock b/Gemfile.lock index ed66b724..1e2d02a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -127,7 +127,7 @@ GEM faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) - ffi (1.16.2) + ffi (1.16.3) friendly_id (5.5.0) activerecord (>= 4.0.0) gems (1.2.0) @@ -183,7 +183,7 @@ GEM mini_mime (1.1.5) minitest (5.20.0) multi_json (1.15.0) - net-imap (0.3.7) + net-imap (0.4.0) date net-protocol net-pop (0.1.2) @@ -200,7 +200,7 @@ GEM orm_adapter (0.5.0) os (1.1.4) parallel (1.23.0) - parser (3.2.2.3) + parser (3.2.2.4) ast (~> 2.4.1) racc pg (1.5.4) @@ -355,7 +355,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (3.3.1) + will_paginate (4.0.0) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.12) @@ -403,7 +403,7 @@ DEPENDENCIES slim typhoeus waveformjson - will_paginate (< 4) + will_paginate RUBY VERSION ruby 3.2.2p53 diff --git a/app/helpers/track_helper.rb b/app/helpers/track_helper.rb index 6e3b70f1..dc07becf 100644 --- a/app/helpers/track_helper.rb +++ b/app/helpers/track_helper.rb @@ -14,7 +14,8 @@ def next_gap_link(song, date) # rubocop:disable Metrics/AbcSize, Metrics/MethodL Show.published .where('date BETWEEN ? AND ?', date, next_show.date) .count - text = "#{tag.i(class: 'glyphicon glyphicon-forward')}  Next Performance (gap: #{gap})" + text = 'Next Performance' + text = "#{tag.i(class: 'glyphicon glyphicon-forward')}  #{text}(gap: #{gap})" link_to(text.html_safe, "/#{next_show.date}/#{track.slug}") end diff --git a/app/javascript/packs/application.css.scss b/app/javascript/packs/application.css.scss index 28880d9d..9cff253e 100644 --- a/app/javascript/packs/application.css.scss +++ b/app/javascript/packs/application.css.scss @@ -222,6 +222,12 @@ html { border: 1px solid black; } } + .btn_context { + .dropdown-toggle { + height: 18px; + line-height: 0px !important; + } + } .show_duration { color: $text_gray !important; } @@ -361,23 +367,6 @@ html { .btn_context { cursor: pointer; } - .btn_context_for_show { - float: right; - position: relative; - top: -22px; - } - // .btn-round { - // margin-top: -1px; - // height: 8px !important; - // width: 10px !important; - // -moz-border-radius: 30px !important; - // -webkit-border-radius: 30px !important; - // border-radius: 30px !important; - // line-height: 6px !important; - // font-weight: bold !important; - // padding-left: 14px !important; - // font-size: 17px !important; - // } .btn-sort { height: 18px !important; -moz-border-radius: 30px !important; @@ -420,7 +409,7 @@ html { /******************************/ #page { - min-height: 600px; + min-height: 650px; } #page_header { @@ -651,8 +640,8 @@ html { } #control_next, #control_previous { border: 1px solid $btn_border; - width: 32px; - height: 32px; + width: 34px; + height: 34px; -moz-border-radius: 100px; -webkit-border-radius: 100px; border-radius: 100px; @@ -1411,23 +1400,15 @@ html { font-size: 14px; } .btn_context { - font-size: 14px !important; visibility: hidden; float: right; - width: 40px; margin-right: 20px; margin-left: 15px; line-height: 10px; - text-align: left; margin-top: -6px !important; - visibility: hidden; position: relative; top: 7px; - .dropdown-toggle { - height: 18px; - line-height: 0px !important; - } a { line-height: 0px !important; } diff --git a/app/views/shared/_context_menu_for_show.html.slim b/app/views/shared/_context_menu_for_show.html.slim index 68f80c42..194bd5a0 100644 --- a/app/views/shared/_context_menu_for_show.html.slim +++ b/app/views/shared/_context_menu_for_show.html.slim @@ -1,4 +1,4 @@ -.btn-group.show-context-dropdown.btn_context class=(viewing_this_show ? 'btn_context_for_show' : '') +.btn-group.show-context-dropdown.btn_context button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false' span.caret ul.dropdown-menu diff --git a/app/views/shared/_sort_filter.html.slim b/app/views/shared/_sort_filter.html.slim index b28bc36f..e2b906bd 100644 --- a/app/views/shared/_sort_filter.html.slim +++ b/app/views/shared/_sort_filter.html.slim @@ -1,5 +1,7 @@ -.btn-group - button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false' - => sort_filter_link_title(item_hash) - span.caret - ul.dropdown-menu = sort_filter(item_hash) +h3 + |> Sort by + .btn-group + button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false' + => sort_filter_link_title(item_hash) + span.caret + ul.dropdown-menu = sort_filter(item_hash) diff --git a/app/views/shared/_sort_songs_and_venues_filter.html.slim b/app/views/shared/_sort_songs_and_venues_filter.html.slim index fde9f189..48686d98 100644 --- a/app/views/shared/_sort_songs_and_venues_filter.html.slim +++ b/app/views/shared/_sort_songs_and_venues_filter.html.slim @@ -1,5 +1,7 @@ -.btn-group - button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false' - => sort_songs_title(item_hash) - span.caret - ul.dropdown-menu = sort_songs_and_venues_links(item_hash) +h3 + |> Sort by + .btn-group + button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false' + => sort_songs_title(item_hash) + span.caret + ul.dropdown-menu = sort_songs_and_venues_links(item_hash) diff --git a/config/environments/development.rb b/config/environments/development.rb index f467ec08..f7ad283f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -25,10 +25,6 @@ # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin - # Expands the lines which load the assets - # config.assets.debug = true - # config.assets.check_precompiled_asset = false - config.action_mailer.default_url_options = { host: 'localhost:3000' } config.action_mailer.smtp_settings = { user_name: ENV.fetch('SMTP_USERNAME', nil), diff --git a/config/environments/production.rb b/config/environments/production.rb index 062a251b..fdca9815 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -11,18 +11,6 @@ # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false - # Compress JavaScripts and CSS - config.assets.js_compressor = :uglifier - - # Fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = true - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH - # Specifies the header that your server uses for sending files # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx @@ -47,9 +35,6 @@ # Enable serving of images, stylesheets, and JavaScripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" - # Precompile additional assets - # config.assets.precompile += %w( search.js ) - # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false