From ed7186e5ced5dccf90e867d26b2bddb41993bf5d Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Wed, 16 Apr 2025 16:19:29 -0400 Subject: [PATCH] Moved the tournament navbar to the bottom of the page and made site responsive. Fixed puma solid queue in development. Added a note about clobbering assets in the README. Fixed the ad blocker check due to turbolinks it had to be idempotent. Added migrations for all dbs in the rails-dev-db-create.sh script. --- README.md | 1 + app/assets/javascripts/application.js | 4 +- app/assets/stylesheets/application.css | 9 +- app/assets/stylesheets/custom.css | 17 + app/views/layouts/_header.html.erb | 2 +- app/views/layouts/_tournament-navbar.html.erb | 22 +- app/views/layouts/_underheader.html.erb | 46 +- app/views/layouts/application.html.erb | 19 +- app/views/tournaments/show.html.erb | 3 +- bin/rails-dev-db-create.sh | 5 +- config/environments/development.rb | 1 + public/assets/.gitignore | 1 - ...3dbd5cde7a1f8b8a12678196d460f1d3562bb64.js | 10864 ---------------- ...a3703d3d2462acdba315e7b70ab32ec5c6633e.css | 108 - 14 files changed, 91 insertions(+), 11011 deletions(-) create mode 100644 app/assets/stylesheets/custom.css delete mode 100644 public/assets/.gitignore delete mode 100644 public/assets/application-0ce96b937beeacae8611cd6273dbd5cde7a1f8b8a12678196d460f1d3562bb64.js delete mode 100644 public/assets/application-5aa6af6502b99932ee3cf0d135a3703d3d2462acdba315e7b70ab32ec5c6633e.css diff --git a/README.md b/README.md index 88e6ba7..c56d2a7 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Whether you have a shell from docker or are using rvm you can now run normal rai * ` rails s -b 0.0.0.0` port 3000 is exposed. You can open [http://localhost:3000](http://localhost:3000) after running that command * etc. * `rake finish_seed_tournaments` will complete all matches from the seed data. This command takes about 5 minutes to execute +* `rake assets:clobber` - removes previously compiled assets stored in `public/assets` forcing Rails to recompile them from scratch the next time they are requested. ## Testing Job Status diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d33a61c..e0eecee 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -10,11 +10,13 @@ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. // -//= require_tree . //= require jquery //= require jquery_ujs // Bootstrap 3.3.6 in vendor/assets/javascripts //= require bootstrap.min.js // Data Tables 1.10.6 in vendor/assets/javascripts //= require jquery.dataTables.min.js +//= require turbolinks +// +//= require_tree . diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 82024f4..fa6db04 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,10 +10,13 @@ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * - *= require_tree . - *= require_self + * For some reason this needs to be above bootstrap for the zindex of the main navbar to work. + * With it lower, bootstraps css overrides it. + *= require custom * Bootstrap 3.3.6 in vendor/assets/stylesheets *= require bootstrap.min.css *= require bootstrap-theme.min.css + *= require_tree . + *= require_self + */ - */ \ No newline at end of file diff --git a/app/assets/stylesheets/custom.css b/app/assets/stylesheets/custom.css new file mode 100644 index 0000000..4dc938b --- /dev/null +++ b/app/assets/stylesheets/custom.css @@ -0,0 +1,17 @@ +.navbar-inverse.navbar-fixed-top { + z-index: 1040; /* Ensure main navbar is above tournament navbar */ +} + +#tournament-navbar { + top: 50px; /* Position below the first fixed navbar */ + z-index: 1030; /* Explicitly set standard fixed navbar z-index */ +} + +/* Make desktop navbar dropdowns scrollable if they overflow */ +@media (min-width: 768px) { + /* Target dropdowns in main nav and tournament nav specifically */ + .navbar-fixed-top .dropdown-menu { + max-height: 70vh; /* Adjust as needed - 70% of viewport height */ + overflow-y: auto; + } +} \ No newline at end of file diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 403947a..b21f2b7 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -10,7 +10,7 @@ WrestlingDev