From a36deb91e5becbd6d6dbe639c9971fd7d20fc086 Mon Sep 17 00:00:00 2001 From: dmitrytrager Date: Sat, 1 Feb 2025 19:43:42 +0100 Subject: [PATCH 1/3] add layout for mazer bootstrap template --- Procfile | 1 + app/controllers/users_controller.rb | 6 ++++ app/views/layouts/_sidebar.html.erb | 52 +++++++++++++++++++++++++++++ app/views/layouts/mazer.html.erb | 48 ++++++++++++++++++++++++++ app/views/users/index.html.erb | 0 config/routes.rb | 4 ++- 6 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 Procfile create mode 100644 app/controllers/users_controller.rb create mode 100644 app/views/layouts/_sidebar.html.erb create mode 100644 app/views/layouts/mazer.html.erb create mode 100644 app/views/users/index.html.erb diff --git a/Procfile b/Procfile new file mode 100644 index 00000000..6788a9f2 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +server: bin/rails server -p 3000 \ No newline at end of file diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb new file mode 100644 index 00000000..239cbfea --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,6 @@ +class UsersController < ApplicationController + layout "mazer" + + def index + end +end diff --git a/app/views/layouts/_sidebar.html.erb b/app/views/layouts/_sidebar.html.erb new file mode 100644 index 00000000..846fe4c8 --- /dev/null +++ b/app/views/layouts/_sidebar.html.erb @@ -0,0 +1,52 @@ + diff --git a/app/views/layouts/mazer.html.erb b/app/views/layouts/mazer.html.erb new file mode 100644 index 00000000..9ec18255 --- /dev/null +++ b/app/views/layouts/mazer.html.erb @@ -0,0 +1,48 @@ + + + + + + <%= content_for(:title) || "Skillrx" %> + + + + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= yield :head %> + + <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> + <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> + + + + + + + + <%# Includes all stylesheet files in app/assets/stylesheets %> + <%= stylesheet_link_tag :app, "data-turbo-track": "reload" %> + <%= javascript_importmap_tags %> + + + + <%= render "layouts/sidebar" %> + + <%= yield %> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb new file mode 100644 index 00000000..e69de29b diff --git a/config/routes.rb b/config/routes.rb index 890cbb9f..48d9c862 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,6 +15,8 @@ # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker + resources :users + # Defines the root path route ("/") - # root "posts#index" + root "users#index" end From 6aa4c73e5d2a4362a746127defb086ed99439bd5 Mon Sep 17 00:00:00 2001 From: Sean Marcia Date: Mon, 3 Feb 2025 13:43:09 +0100 Subject: [PATCH 2/3] Update routes.rb --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 48d9c862..5f1bab64 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,5 +18,5 @@ resources :users # Defines the root path route ("/") - root "users#index" + #root "users#index" end From 0b1071fe5590869dbed1c45f664827ac04939c08 Mon Sep 17 00:00:00 2001 From: Sean Marcia Date: Mon, 3 Feb 2025 13:44:12 +0100 Subject: [PATCH 3/3] Update routes.rb --- config/routes.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 5f1bab64..9acc2b24 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,5 +18,4 @@ resources :users # Defines the root path route ("/") - #root "users#index" end