diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index c3694d9..0d073f6 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class HomeController < ApplicationController - skip_before_action :check_logged_in + skip_before_action :check_logged_in, only: %i[index welcome terms privacy] def index redirect_to meal_plans_path if current_user.present? @@ -15,4 +15,6 @@ def welcome def terms; end def privacy; end + + def about; end end diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb new file mode 100644 index 0000000..6f3ce80 --- /dev/null +++ b/app/views/home/about.html.erb @@ -0,0 +1,6 @@ +
+

使い方

+

+ 今後文章画像追加する!!! +

+
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index c5ed1fe..7062bf0 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -22,4 +22,9 @@ <%= link_to '利用規約', terms_path, class: 'ml-4 text-stone-800 hover:underline' %> <%= link_to 'プライバシーポリシー', terms_path, class: 'ml-4 text-stone-800 hover:underline' %> +
+

+ ここに使い方を書く! +

+
diff --git a/app/views/home/welcome.html.erb b/app/views/home/welcome.html.erb index b21fd4a..2cfec1a 100644 --- a/app/views/home/welcome.html.erb +++ b/app/views/home/welcome.html.erb @@ -23,4 +23,9 @@ <%= link_to '利用規約', terms_path, class: 'ml-4 text-stone-800 hover:underline' %> <%= link_to 'プライバシーポリシー', terms_path, class: 'ml-4 text-stone-800 hover:underline' %> +
+

+ ここに使い方を書く! +

+
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 65ef09c..84e9854 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -32,6 +32,9 @@
<%= link_to '< home', root_path, class: 'ml-4 text-stone-300 hover:underline' %> + <% if current_user %> + <%= link_to '使い方', about_path, class: 'ml-4 text-stone-300 hover:underline' %> + <% end %> <%= link_to '利用規約', terms_path, class: 'ml-4 text-stone-300 hover:underline' %> <%= link_to 'プライバシーポリシー', privacy_path, class: 'ml-4 text-stone-300 hover:underline' %>
diff --git a/config/routes.rb b/config/routes.rb index f26b769..bc09449 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -20,6 +20,7 @@ get 'welcome', to: 'home#welcome' get 'terms', to: 'home#terms' get 'privacy', to: 'home#privacy' + get 'about', to: 'home#about' # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html