Skip to content

Commit

Permalink
Replace jquery gems with cdn links
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanTG committed Nov 3, 2024
1 parent 083aa2d commit 75549f0
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 21 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ gem 'geocoder'
gem 'haml-rails'
gem 'has_scope'
gem 'inherited_resources'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'kaminari'
gem 'kt-paperclip'
gem 'paper_trail'
Expand Down
8 changes: 0 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,6 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jmespath (1.6.2)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (7.0.0)
railties (>= 3.2.16)
json (2.7.4)
kaminari (1.2.2)
activesupport (>= 4.1.0)
Expand Down Expand Up @@ -540,8 +534,6 @@ DEPENDENCIES
haml-rails
has_scope
inherited_resources
jquery-rails
jquery-ui-rails
kaminari
kt-paperclip
launchy
Expand Down
4 changes: 0 additions & 4 deletions app/assets/javascripts/application.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//= require jquery
//= require jquery_ujs
//= require jquery-ui

var map;
var region;
var ismap;
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/application.scss.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
*= require jquery-ui
*/

:root {
--red: #fe46b0;
--lightpink: #fff1f1;
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
- if Rails.env.staging?
%meta{content: "noindex,nofollow", name: "robots"}/

= stylesheet_link_tag 'normalize', 'application', 'mediaqueries', :media => ""
= stylesheet_link_tag 'normalize', 'https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css', 'application', 'mediaqueries', :media => ""
- if mobile_device?
= stylesheet_link_tag 'mobile-application'
= javascript_include_tag 'application'
= javascript_include_tag 'https://code.jquery.com/jquery-3.7.1.min.js', 'https://cdn.jsdelivr.net/npm/[email protected]/src/rails.min.js', 'https://code.jquery.com/ui/1.14.1/jquery-ui.min.js', 'application'
- if current_page?(saved_path) || current_page?(map_path) || current_page?(operators_path) || ((defined? @region) and current_page?(region_homepage_path))
= stylesheet_link_tag 'lightbox', 'https://unpkg.com/[email protected]/dist/maplibre-gl.css'
= javascript_include_tag 'lightbox.min', 'https://unpkg.com/[email protected]/dist/maplibre-gl.js', 'https://unpkg.com/[email protected]/dist/pmtiles.js', 'map_style', 'map_style_dark'
Expand Down
2 changes: 1 addition & 1 deletion app/views/locations/_locations.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$('meta[property="og:description"]').attr("content", "#{desc_for_path(request.path, @region)}");
}

let topbutton = document.getElementById("top_button");
var topbutton = document.getElementById("top_button");
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
Expand Down

0 comments on commit 75549f0

Please sign in to comment.