commit d9a97f9e1a155ee3bdc9d1b78156a71c19c9851e Author: agnes Date: Sun Dec 28 12:35:52 2025 +0000 Add app/views/home/index.html.erb diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb new file mode 100644 index 0000000..45487b7 --- /dev/null +++ b/app/views/home/index.html.erb @@ -0,0 +1,61 @@ +
+ <% if !logged_in? %> + <%= render 'intro_module' %> + <% end %> + + <% if logged_in? && @homepage.favorite_tags.present? %> +
+

<%= t(".find_your_favorites") %>

+
    + <% @homepage.favorite_tags.each do |favorite_tag| %> +
  • + <%= link_to_tag_works(favorite_tag.tag) %> +
  • + <% end %> +
+
+ <% else %> +
" class="browse module"> +

<%= t(".find_your_favorites") %>

+ <% if logged_in? %> +

<%= t(".browse_or_favorite", count: ArchiveConfig.MAX_FAVORITE_TAGS) %>

+ <% end %> + + # new code begins here + +Or, try a new author... + <% if @random_user %> + <%= link_to @random_user.login, user_path(@random_user) %> +<% else %> + No authors available +<% end %>
+ +# ends here + + <%= render 'fandoms' %> +
+ <% end %> + + <% if @homepage.admin_posts.present? %> + <%= render 'news_module', admin_posts: @homepage.admin_posts %> + <% end %> + + <% if logged_in? && @homepage.readings.present? %> +
+

+ <%= t(".readings.heading.title") %> + <%= link_to t(".readings.heading.history_link"), user_readings_path(current_user) %> +

+
+

<%= t(".readings.note") %>

+
    + <% @homepage.readings.each do |reading| %> + <%= render "readings/reading_blurb", work: reading.work, reading: reading %> + <% end %> +
+
+ <% end %> + <% if logged_in? && @homepage.inbox_comments.present? %> + <%= render 'inbox_module', inbox_comments: @homepage.inbox_comments %> + <% end %> +