diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 7dfa77fa..d59de199 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -1,7 +1,9 @@ # Controller for top-level pages of the site that do not have # an associated model class MainController < ApplicationController - layout 'tailwind/landing', only: [:index, :about_notebook, :for_writers, :for_roleplayers, :for_friends] + layout 'tailwind/landing', only: [ + :index, :about_notebook, :for_writers, :for_roleplayers, :for_friends + ] before_action :authenticate_user!, only: [:dashboard, :prompts, :notes, :recent_content] before_action :cache_linkable_content_for_each_content_type, only: [:dashboard, :prompts] diff --git a/app/views/layouts/tailwind.html.erb b/app/views/layouts/tailwind.html.erb index 769240e1..024449f7 100644 --- a/app/views/layouts/tailwind.html.erb +++ b/app/views/layouts/tailwind.html.erb @@ -19,16 +19,28 @@ - <%# render 'layouts/sidenav' if user_signed_in? %> - <%# render 'layouts/recent_edits_sidenav' if user_signed_in? %> <%= render 'layouts/tailwind/navbar' %> + <%= render 'cards/ui/alert' %> + <%= render 'cards/ui/notice' %> -
- <%= render 'cards/ui/alert' %> - <%= render 'cards/ui/notice' %> + <% if user_signed_in? %> +
+
+ <%= render 'layouts/tailwind/sidenav' %> +
+
+ main content +
+
+ + + <%= yield %> + <% else %> +
+ <%= yield %> +
+ <% end %> - <%= yield %> -
<%= react_component("Footer") unless defined?(@show_footer) && !@show_footer %> <%# render 'layouts/quick_add_fab' unless defined?(@show_footer) && !@show_footer %> diff --git a/app/views/layouts/tailwind/_navbar.html.erb b/app/views/layouts/tailwind/_navbar.html.erb index 03a33104..53d5772d 100644 --- a/app/views/layouts/tailwind/_navbar.html.erb +++ b/app/views/layouts/tailwind/_navbar.html.erb @@ -1,6 +1,5 @@ <% if user_signed_in? %> <%= render partial: 'layouts/tailwind/navbar/logged_in' %> - <% else %> <%= render partial: 'layouts/tailwind/navbar/logged_out' %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/tailwind/_sidenav.html.erb b/app/views/layouts/tailwind/_sidenav.html.erb new file mode 100644 index 00000000..ad733cd1 --- /dev/null +++ b/app/views/layouts/tailwind/_sidenav.html.erb @@ -0,0 +1,88 @@ + \ No newline at end of file