diff --git a/app/views/main/components/_activity_bar.html.erb b/app/views/main/components/_activity_bar.html.erb new file mode 100644 index 00000000..e8adacaf --- /dev/null +++ b/app/views/main/components/_activity_bar.html.erb @@ -0,0 +1,95 @@ +
+
+
+
+
+ date_range +
+
+
+
Weekly average
+
+ words per day +
+
+
+
+
+ +
+ +
+
+
+
+ calendar_month +
+
+
+
Words written this month
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
Your active writing streak
+
+ <% 7.times.with_index do |i| %> + <%= link_to '#day-breakdown', class: 'group relative inline-block mt-2 mr-2' do %> + <%= 25 + i %> + + check_circle + + <% end %> + <% end %> +
+
+
+
+
+ +
+ +
\ No newline at end of file diff --git a/app/views/main/components/_create_new_page_list.html.erb b/app/views/main/components/_create_new_page_list.html.erb new file mode 100644 index 00000000..e892fbab --- /dev/null +++ b/app/views/main/components/_create_new_page_list.html.erb @@ -0,0 +1,26 @@ + diff --git a/app/views/main/components/_recently_edited_pages.html.erb b/app/views/main/components/_recently_edited_pages.html.erb new file mode 100644 index 00000000..d2042c5f --- /dev/null +++ b/app/views/main/components/_recently_edited_pages.html.erb @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/app/views/main/components/_serendipitous_question.html.erb b/app/views/main/components/_serendipitous_question.html.erb index a4ce3d7a..31dde57f 100644 --- a/app/views/main/components/_serendipitous_question.html.erb +++ b/app/views/main/components/_serendipitous_question.html.erb @@ -2,17 +2,8 @@
<%= image_tag @content.random_image_including_private(format: :original), class: 'w-full object-cover object-center max-h-48 rounded-t-md' %>
-
+
-

- Expand - <% if @universe_scope.present? %> - <%= link_to @universe_scope.name, @universe_scope, class: Universe.text_color %>, - <% else %> - your worlds, - <% end %> - one question at a time -

<%= if @content && @attribute_field_to_question render partial: 'cards/serendipitous/tailwind_content_question', locals: { @@ -26,26 +17,9 @@

<%= @content.icon %> Your answer will be automatically saved to your - <%= @content.name %> + <%= link_to @content.name, @content.view_path, class: "#{@content.text_color}", target: '_blank' %> <%= @content.page_type.downcase %> page.

- -
-
- <%= link_to '#', class: "#{@content.color} text-white block rounded-lg p-2 mb-1" do %> - <%= @content.icon %> -
Quick-reference
- <%= @content.name %> - <% end %> - - <%= link_to prompts_path, class: "bg-orange-500 text-white block rounded-lg p-2" do %> - lightbulb - See more prompts - <% if @universe_scope.present? %> - in this universe - <% end %> - arrow_right - <% end %>
\ No newline at end of file diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index 11ef382b..b93f5423 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -47,202 +47,33 @@ + <%# render partial: 'main/components/activity_bar', locals: { } %> -
-
+
+
+

+ Expand + <% if @universe_scope.present? %> + <%= link_to @universe_scope.name, @universe_scope, class: Universe.text_color %> + <% else %> + your worlds + <% end %> +

<%= render partial: 'main/components/serendipitous_question', locals: { } %> + +

+ Add another page +

+ <%= render partial: 'main/components/create_new_page_list', locals: { } %>
-
- rhs +
+

+ Your recent edits +

+ <%= render partial: 'main/components/recently_edited_pages', locals: { } %>
- -
-
    - <% @recently_edited_pages.first(9).each do |page| %> - <% next if page.is_a?(Document) || page.is_a?(Timeline) %> - - <%= link_to page.edit_path do %> -
  • -
    -
    - <%= image_tag page.random_image_including_private, class: 'w-32 h-32 bg-notebook-blue rounded-lg flex-shrink-0' %> -
    -
    -
    -

    - <%= page.name %> -

    -
    -

    - word count -

    -

    - last edited <%= time_ago_in_words page.updated_at %> ago -

    -
    -
    -
  • - <% end %> - <% end %> -
-
- - - -
-

Your writing activity

-
-
-
-
-
- date_range -
-
-
-
Weekly average
-
- words per day -
-
-
-
-
- -
- -
-
-
-
- calendar_month -
-
-
-
Words written this month
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
Your active writing streak
-
- <% 7.times.with_index do |i| %> - <%= link_to '#day-breakdown', class: 'group relative inline-block mt-2 mr-2' do %> - <%= 25 + i %> - - check_circle - - <% end %> - <% end %> -
-
-
-
-
- -
- -
-
- -

- Pick up where you left off -

-
-
    - <% @recently_edited_pages.first(9).each do |page| %> - <% next if page.is_a?(Document) || page.is_a?(Timeline) %> - - <%= link_to page.edit_path do %> -
  • -
    -
    - <%= image_tag page.random_image_including_private, class: 'w-32 h-32 bg-notebook-blue rounded-lg flex-shrink-0' %> -
    -
    -
    -

    - <%= page.name %> -

    -
    -

    - word count -

    -

    - last edited <%= time_ago_in_words page.updated_at %> ago -

    -
    -
    -
  • - <% end %> - <% end %> -
-
- -

Or create a new...

-
-
    - <% (@activated_content_types + ["Timeline", "Document"]).each do |content_type| %> - <% klass = content_class_from_name(content_type) %> - <%= link_to send("new_#{content_type.downcase}_path") do %> -
  • -
    - <%= klass.icon %> -
    - <%= content_type %> -
    -
    -
  • - <% end %> - <% end %> -
-
-