diff --git a/.gitignore b/.gitignore index 0989f030..eef64ddd 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ public/sitemap* /public/packs /public/packs-test +/public/node_modules /node_modules /yarn-error.log yarn-debug.log* @@ -45,3 +46,6 @@ storage /config/master.key config/credentials.yml.enc + +/app/assets/builds/* +!/app/assets/builds/.keep diff --git a/Gemfile b/Gemfile index 0d6d19d0..bce40908 100644 --- a/Gemfile +++ b/Gemfile @@ -29,8 +29,9 @@ gem 'sendgrid-ruby' # Sending emails gem 'sitemap_generator' # generate sitemaps for submitting to search engines gem 'slim' # view templating gem 'uglifier' -gem 'shakapacker', '~> 8' gem 'webrick' # web server for capybara and local dev +gem 'jsbundling-rails' +gem 'cssbundling-rails' group :development do gem 'better_errors' # improved error pages diff --git a/Gemfile.lock b/Gemfile.lock index a076ed9f..ad59c9bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -141,6 +141,8 @@ GEM bigdecimal rexml crass (1.0.6) + cssbundling-rails (1.4.0) + railties (>= 6.0.0) date (3.3.4) debug_inspector (1.2.0) devise (4.9.3) @@ -242,6 +244,8 @@ GEM character_set (~> 1.4) regexp_parser (>= 2.6.2, < 3.0.0) regexp_property_values (~> 1.0) + jsbundling-rails (1.3.0) + railties (>= 6.0.0) json (2.7.1) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -307,7 +311,6 @@ GEM nenv (~> 0.1) shellany (~> 0.0) orm_adapter (0.5.0) - package_json (0.1.0) parallel (1.24.0) parser (3.3.0.5) ast (~> 2.4.1) @@ -329,8 +332,6 @@ GEM pygments.rb (2.4.1) racc (1.8.0) rack (3.0.11) - rack-proxy (0.7.7) - rack rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -459,15 +460,8 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - semantic_range (3.0.0) sendgrid-ruby (6.7.0) ruby_http_client (~> 3.4) - shakapacker (8.0.0) - activesupport (>= 5.2) - package_json - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) shellany (0.0.1) sitemap_generator (6.3.0) builder (~> 3.0) @@ -524,6 +518,7 @@ DEPENDENCIES capybara client_side_validations concurrent-ruby + cssbundling-rails devise (>= 4.4.0) dotenv-rails factory_bot_rails @@ -539,6 +534,7 @@ DEPENDENCIES humanize image_processing jbuilder + jsbundling-rails kaminari launchy mail_form @@ -563,7 +559,6 @@ DEPENDENCIES rubocop-rails rubocop-rspec sendgrid-ruby - shakapacker (~> 8) sitemap_generator slim spring diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 00000000..c1cb2484 --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,3 @@ +web: env RUBY_DEBUG_OPEN=true bin/rails server +js: yarn build --watch +css: yarn build:css --watch diff --git a/app/assets/builds/application.css b/app/assets/builds/application.css deleted file mode 100644 index 7fbc2de3..00000000 --- a/app/assets/builds/application.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base;@tailwind components;html{@apply font-body antialiased;scroll-padding-top:40px}@tailwind utilities - -/*# sourceMappingURL=application.css.map*/ \ No newline at end of file diff --git a/app/assets/builds/application.css.map b/app/assets/builds/application.css.map deleted file mode 100644 index b918e716..00000000 --- a/app/assets/builds/application.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"application.css","mappings":"AAAA,eACA,qBAEA,KACI,6BAMA,wBAGJ,mB","sources":["webpack:///./app/javascript/stylesheets/application.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n\nhtml {\n @apply font-body antialiased;\n\n /*\n clicking anchor links from another page to home page must scroll the content 40px\n so it doesn't appear under the fixed navigation\n */\n scroll-padding-top: 40px;\n}\n\n@tailwind utilities;\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/app/assets/builds/application.js b/app/assets/builds/application.js deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/stylesheets/application.sass.scss b/app/assets/stylesheets/application.sass.scss new file mode 100644 index 00000000..88d24c96 --- /dev/null +++ b/app/assets/stylesheets/application.sass.scss @@ -0,0 +1 @@ +// Entry point for your Sass build diff --git a/app/javascript/application.js b/app/javascript/application.js new file mode 100644 index 00000000..db91aa88 --- /dev/null +++ b/app/javascript/application.js @@ -0,0 +1 @@ +// Entry point for the build script in your package.json diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index cab066c6..2dbb5dee 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -9,7 +9,7 @@ // Uncomment to copy all static images under ../images to the output folder and reference -// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) +// them with the image_tag helper in views (e.g <%= image_tag 'rails.png' %>) // or the `imagePath` JavaScript helper below. // const images = require.context('../images', true); @@ -21,9 +21,10 @@ const videoPath = (name) => videos(name, true); import 'core-js/stable'; import 'regenerator-runtime/runtime'; -import "application.css"; -import "_pygment_monokai.sass"; +import "./application.css"; +import "./_pygment_monokai.sass"; import * as Turbo from "@hotwired/turbo"; +import $ from 'jquery'; // temporarily disable turbo until we can resolve page scrolling bug on iPadOS Turbo.session.drive = false; @@ -41,3 +42,6 @@ require('@client-side-validations/client-side-validations'); // custom javascripts used throughout the frontend of the site import './custom'; +import './photography'; +import './contact-me'; +import './blog'; \ No newline at end of file diff --git a/app/javascript/packs/photography.js b/app/javascript/packs/photography.js index f3fa8d06..4fb495cf 100644 --- a/app/javascript/packs/photography.js +++ b/app/javascript/packs/photography.js @@ -39,7 +39,6 @@ const createInfiniteScroll = (elem, masonry) => { // build the Photoswipe gallery from the provided CSS selector const initPhotoSwipeFromDOM = function(gallerySelector) { - // parse slide data (url, title, size ...) from DOM elements // (children of gallerySelector) var parseThumbnailElements = function(el) { diff --git a/app/views/home/_contact.html.erb b/app/views/home/_contact.html.erb index 02d4037f..09ddb048 100644 --- a/app/views/home/_contact.html.erb +++ b/app/views/home/_contact.html.erb @@ -13,4 +13,4 @@
);">
\ No newline at end of file + style="background-image: url(<%= asset_path("packs/images/home/map.jpg") %>);"> \ No newline at end of file diff --git a/app/views/home/_expertise.html.erb b/app/views/home/_expertise.html.erb index f583ee99..44f284ac 100644 --- a/app/views/home/_expertise.html.erb +++ b/app/views/home/_expertise.html.erb @@ -10,10 +10,10 @@
- <%= image_pack_tag "images/home/icon-software-development.svg", alt: "development icon", class: "invert-0 dark:invert" %> + <%= image_tag asset_path("packs/images/home/icon-software-development.svg"), alt: "development icon", class: "invert-0 dark:invert" %>
@@ -29,10 +29,10 @@
- <%= image_pack_tag "images/home/icon-app-development.svg", alt: "Mobile Application icon", class: "invert-0 dark:invert" %> + <%= image_tag asset_path("packs/images/home/icon-app-development.svg"), alt: "Mobile Application icon", class: "invert-0 dark:invert" %>
@@ -48,10 +48,10 @@
- <%= image_pack_tag "images/home/icon-filmmaking.svg", alt: "film and photography icon", class: "invert-0 dark:invert" %> + <%= image_tag asset_path("packs/images/home/icon-filmmaking.svg"), alt: "film and photography icon", class: "invert-0 dark:invert" %>
diff --git a/app/views/home/_games.html.erb b/app/views/home/_games.html.erb index da327854..346432ed 100644 --- a/app/views/home/_games.html.erb +++ b/app/views/home/_games.html.erb @@ -8,7 +8,7 @@
diff --git a/app/views/home/_hero.html.erb b/app/views/home/_hero.html.erb index fbe496d3..9d3c1c78 100644 --- a/app/views/home/_hero.html.erb +++ b/app/views/home/_hero.html.erb @@ -1,5 +1,5 @@
);"> + style="background-image: url(<%= asset_path("packs/images/home/bg-hero.jpg") %>);">
@@ -8,7 +8,7 @@
- <%= image_pack_tag "images/home/blog-author-#{rand(1..5)}.jpg", class: "h-48 sm:h-56 rounded-full", alt: "author" %> + <%= image_tag asset_path("packs/images/home/blog-author-#{rand(1..5)}.jpg"), class: "h-48 sm:h-56 rounded-full", alt: "author" %>

);"> + style="background-image: url(<%= asset_path("packs/images/home/bg-cta.jpg") %>);">
diff --git a/app/views/home/_work.html.erb b/app/views/home/_work.html.erb index 5140155b..3aaa5041 100644 --- a/app/views/home/_work.html.erb +++ b/app/views/home/_work.html.erb @@ -13,7 +13,7 @@
- <%= image_pack_tag "images/home/logo-cruise.svg", class: "w-48 h-16 relative -top-6", alt: "company logo" %> + <%= image_tag asset_path("packs/images/home/logo-cruise.svg"), class: "w-48 h-16 relative -top-6", alt: "company logo" %>