diff --git a/app/controllers/basil_controller.rb b/app/controllers/basil_controller.rb index 72b57130..8a70b378 100644 --- a/app/controllers/basil_controller.rb +++ b/app/controllers/basil_controller.rb @@ -213,6 +213,9 @@ class BasilController < ApplicationController def jam @recent_commissions = BasilCommission.where(entity_id: nil).order('id DESC').limit(24) @total_count = BasilCommission.where(entity_id: nil).count + + # For generating pie charts + @all_commissions = BasilCommission.where(entity_id: nil) end def queue_jam_job diff --git a/app/views/basil/_character_jam.html.erb b/app/views/basil/_character_jam.html.erb new file mode 100644 index 00000000..03b31782 --- /dev/null +++ b/app/views/basil/_character_jam.html.erb @@ -0,0 +1,478 @@ + + + + + +<%= content_for :full_width_page_header do %> +
+
+

+ <%= Character.icon %> + Welcome to our Character VizJam! +

+ + +
+ +
+

+ Recent visualizations (click one to see their traits, refresh for more) + + <%= number_with_delimiter @total_count %> + +

+ +
+
+ <% @recent_commissions.each do |commission| %> + +
+
+ <%= link_to "#details-#{commission.job_id}", class: 'modal-trigger waves-effect waves-light' do %> + <% if commission.complete? %> + <%= image_tag commission.image, class: 'commission-image' %> + <% else %> + <%= image_tag image_path("placeholders/loading.gif"), class: 'commission-image', style: 'background: #2196F3' %> + <% end %> + + <%= commission.final_settings&.fetch('name', '').presence || 'No name' %> + + <% end %> +
+
+ + <% if commission.completed_at.nil? %> + + <% end %> + + + <% end %> +
+
+ +
+
+<% end %> + + + diff --git a/app/views/basil/jam.html.erb b/app/views/basil/jam.html.erb index c6bc54dd..4775d7fc 100644 --- a/app/views/basil/jam.html.erb +++ b/app/views/basil/jam.html.erb @@ -1,473 +1,444 @@ - -<%= content_for :full_width_page_header do %> -
-
-

- <%= Character.icon %> - Welcome to our Character VizJam! -

+<% + @content_type = Character + singular_class_name = @content_type.name + pluralized_class_name = @content_type.name.pluralize + premium_page = !User.new.can_create?(@content_type) +%> - -
- -
-

- Recent visualizations (click one to see their traits, refresh for more) - - <%= number_with_delimiter @total_count %> - -

- -
-
- <% @recent_commissions.each do |commission| %> - -
-
- <%= link_to "#details-#{commission.job_id}", class: 'modal-trigger waves-effect waves-light' do %> - <% if commission.complete? %> - <%= image_tag commission.image, class: 'commission-image' %> - <% else %> - <%= image_tag image_path("placeholders/loading.gif"), class: 'commission-image', style: 'background: #2196F3' %> - <% end %> - - <%= commission.final_settings&.fetch('name', '').presence || 'No name' %> - - <% end %> -
-
- - <% if commission.completed_at.nil? %> - - <% end %> - - - <% end %> +
+
+
+ <%= image_tag "card-headers/#{pluralized_class_name.downcase}.webp", class: 'materialboxed tooltipped', alt: "The default image used for all #{pluralized_class_name.downcase} on Notebook.ai, but you can replace it with your own uploads.", data: { tooltip: "The default image used for all #{pluralized_class_name.downcase} on Notebook.ai, but you can replace it with your own uploads."} %> +
+
+
+

Creating <%= pluralized_class_name %> on Notebook.ai

+

+ <%= t("content_descriptions.#{singular_class_name.downcase}") %> +

+

+ Creating <%= pluralized_class_name.downcase %> on Notebook.ai is easy. +

+

+ To get started, just click <%= pluralized_class_name %> under the "Worldbuilding" header in the site sidebar. + You'll be able to see or edit all of your existing <%= singular_class_name.downcase %> pages and create new ones at any time. +

-
+ +
+
+
+

+ + <%= @content_type.icon %> + + + Get a head start with a rich + <%= singular_class_name.downcase %> + template +

+
+ +
+

+ Templates on Notebook.ai are what help our unique worldbuilding system better understand your world. +

+

+ You can fill out as little or as much as you'd like on every new <%= singular_class_name.downcase %>. You'll see + progress indicators every time you edit it to show where you can make progress on, and our system will + intelligently generate questions for you around the site that will automatically save your answers + to the proper place on your <%= singular_class_name.downcase %> page. +

+

+ Templates are also fully customizable across every <%= singular_class_name.downcase %> in your notebook. +

+

+ You can browse the default template for <%= pluralized_class_name.downcase %> here; click any category + to see its questions. +

+
+
+
+
+
+
    + <% + YAML.load_file(Rails.root.join('config', 'attributes', "#{singular_class_name.downcase}.yml")).map do |category_name, category_details| + %> + <% next if category_name == :contributors %> +
  • +
    + <%= category_details[:icon] %> + <%= category_details[:label] %> +
    +
    + <% if category_name == :gallery %> +

    + This category lets you upload images to this <%= singular_class_name.downcase %>'s notebook page. +

    +
    +

    + It's great if you have sketches or artwork for your <%= singular_class_name.downcase %>, + but also works well for collecting visual inspiration, too! +

    + <% end %> + <% category_details.fetch(:attributes, []).each do |field| %> +
    + <%= field[:label] %> +
    +
    + <% if field[:field_type] == 'link' || field[:field_type] == 'universe' %> + This field allows you to link your other Notebook.ai pages to this <%= singular_class_name.downcase %>. + <% elsif field[:field_type] == 'tags' %> + This field lets you add clickable tags to your <%= pluralized_class_name.downcase %>. + <% else %> + <%= + I18n.translate "attributes.#{singular_class_name.downcase}.#{field[:label].downcase.gsub(/\s/, '_')}", + scope: :serendipitous_questions, + name: "this #{singular_class_name.downcase}", + default: 'Write as little or as much as you want!' + %> +
    + <%= field[:description].try(:html_safe) %> + <% end %> +
    +
    + <% end %> +
    +
  • + <% + end + %> +
+
+
+
+
+ <%= image_tag 'basil/portrait.png', style: 'width: 420px' %> +
+
+
+
+ palette + Visualize your characters +
+

+ After you've created a character on Notebook.ai, visualizing them is as easy as picking an image style and clicking a button. + Everything you've written about what they look like on their notebook page is automatically included. +

+
+

+ Image visualization is a Premium feature, but you can generate up to 100 images for free to try it out for yourself. +

+
+
+
+
+
+ +<% if user_signed_in? %> +
+
Already logged in? Great!
+ <%= link_to 'Visualize your ideas', basil_path, class: 'btn btn-large hoverable blue white-text' %> +
+<% else %> +
+
Want to keep visualizing your ideas?
+ <%= link_to 'Get started with Notebook.ai', new_registration_path(User), class: 'btn btn-large hoverable blue white-text' %> +
<% end %> - - +<% 10.times do %>
<% end %> diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index 9a379fc0..4341c3d0 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -155,7 +155,6 @@
<% end %> - <%= render partial: 'notice_dismissal/messages/21' if show_notice?(id: 21) %> <%= render partial: 'notice_dismissal/messages/20' if show_notice?(id: 20) %>