From c949eae114fa348ebd631ee7518e959459f2deb7 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Jun 2023 18:45:04 -0700 Subject: [PATCH] end the jam --- app/controllers/basil_controller.rb | 3 + app/views/basil/_character_jam.html.erb | 478 +++++++++++++ app/views/basil/jam.html.erb | 881 ++++++++++++------------ app/views/main/dashboard.html.erb | 1 - 4 files changed, 907 insertions(+), 456 deletions(-) create mode 100644 app/views/basil/_character_jam.html.erb 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! +

+ +
    +
  • +
    + palette + Visualize your character +
    +
    + <%= form_for basil_jam_submit_path do |f| %> +
    + + +
    + + +
    +
    + Age + <% options = ['Infant', 'Child', 'Teenager', 'Young Adult', 'Adult', 'Old', 'Very Old'] %> + <% options.each do |option| %> + + <% end %> +
    +
    + + +
    + Gender + <% options = ['Male', 'Female', 'Ambiguous', 'Transgender', 'Non-binary', 'Agender', 'Androgenous', 'Genderqueer'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Body type + <% options = ['Frail', 'Lean', 'Thin', 'Athletic', 'Hourglass', 'Rectangular', 'Muscular', 'Big-boned', 'Petite', 'Round', 'Pear-shaped', 'Curvy', 'Overweight', 'Underweight'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Hair color + <% options = ['Blonde', 'Black', 'Brown', 'Red', 'White', 'Grey', 'Greying', 'Bald', 'Bleached', 'Blue', 'Green', 'Purple', 'Pink', 'Orange', 'Auburn', 'Rainbow'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Hair style + <% options = ['Long', 'Medium', 'Short', 'Wavy', 'Straight', 'Curly', 'Afro', 'Bald', 'Balding', 'Bangs', 'Bob cut', 'Bowl cut', 'Bouffant', 'Braided', 'Bun', 'Buzzcut', 'Chignon', 'Combover', 'Cornrows', 'Crewcut', 'Dreadlocks', 'Emo', 'Feathered', 'Flattop', 'Fringe', 'Mop-top', 'Parted', 'Pigtails', 'Pixie', 'Pompadour', 'Ponytail', 'Rat-tail', 'Rocker', 'Slicked back', 'Spiked'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Eye color + <% options = ['Amber', 'Blue', 'Brown', 'Topaz', 'Grey', 'Green', 'Hazel', 'Amethyst', 'Indigo', 'Violet', 'Red', 'Black', 'White'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Skin tone + <% options = ['Light', 'Medium', 'Dark', 'Pale', 'Fair', 'Tan', 'White', 'Brown', 'Black', 'Olive', 'Albino', 'Chocolate', 'Grey', 'Green', 'Blue', 'Red', 'Pink', 'Orange', 'Silver', 'Gold', 'Yellow', 'Purple', 'Freckled', 'Speckled'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Facial hair + <% options = ['Stubble', 'Patchy', 'Beard', 'Chin curtain', 'Chinstrap', 'Fu Manchu', 'Goatee', 'Mustache', 'Handlebar mustache', 'Horseshoe mustache', 'Mutton chops', 'Neckbeard', 'Sideburns', 'Soul patch'] %> + <% options.each do |option| %> + + <% end %> +
    + + +
    + Alternate Race + <% options = AutocompleteService.for_field_label(content_model: Character, label: 'Race') - ['Human', 'Dark Elf', 'Construct', 'Half-Elf', 'Half-Dwarf', 'Half-Orc', 'Spirit'] %> + <% options.each do |option| %> + + <% end %> +
    + +
    +
    + <%= f.submit 'Visualize this character', class: 'btn white-text pink' %> +
    + <% end %> +
    +
  • +
  • +
    + help + How do I save my images? +
    +
    +

    + To save any image, simply right click on it (or long-press if you're on mobile) and click "Save as..." to save + it to your computer. +

    +

    + Feel free to upload your images to their character pages on Notebook.ai if you want to show them off in a gallery + alongside any other information you have about your character! + <% unless user_signed_in? %> + <%= link_to 'You can sign up for a free account here.', new_registration_path(User) %> + <% end %> +

    +
    +
  • +
  • +
    + help + Who can see the images I generate? +
    +
    +

    + All visualizer images are typically private by default when generated from Notebook.ai, but any images generated from this page + for the VizJam will be public by default (and visible from this page!). The jam is meant to introduce our creatives to + the new kinds of tools out there available for visualizing your ideas, and making everything public is a great way to + learn what's possible from each other. If you want to make private images of your characters, you can always use + <%= link_to "Notebook.ai's standard visualization feature", basil_path %>. +

    +

    + Only the most recent 20 generated images are shown on this page, so make sure you save any images you want to keep! After they fall + off the list, you won't see them again! +

    +
    +
  • +
  • +
    + help + What if I want an option that isn't available? +
    +
    +

    + Come <%= link_to 'join us on Discord', 'https://discord.gg/bDE8g5YRzp' %> + and request it! I'll be adding more character options throughout the day based on your feedback. :) +

    +
    +
  • +
  • +
    + help + How is this different from the normal visualization features in Notebook.ai? +
    +
    +

    + Here are the big differences: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + VizJamNotebook.ai's Visualizer
    PriceFree to useAvailable with Premium ($7-9/mo)
    PrivacyPublicPrivate
    Available StylesRealisticRealistic & 11 other styles
    ContentCharacters only<%= BasilService::ENABLED_PAGE_TYPES.map(&:pluralize).to_sentence %>
    ControlSimple checkbox optionsUnlimited, freeform text
    +

    +
    +
  • +
  • +
    + help + How long will the VizJam last? +
    +
    +

    + This VizJam runs from June 8rd, 2023 to June 13th, 2023. You can follow + <%= link_to '@IndentLabs on Twitter', 'https://www.twitter.com/IndentLabs', target: '_blank' %> + or + <%= link_to '@IndentLabs on Medium', 'https://medium.com/indent-labs', target: '_blank' %> + to know when the next VizJam will be! +

    +
    +
  • +
+
+ +
+

+ 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) +%> -
    -
  • -
    - palette - Visualize your character -
    -
    - <%= form_for basil_jam_submit_path do |f| %> -
    - - -
    +
    +
    +

    + You can still create characters and visualize them on Notebook.ai! +

    +
    - -
    -
    - Age - <% options = ['Infant', 'Child', 'Teenager', 'Young Adult', 'Adult', 'Old', 'Very Old'] %> - <% options.each do |option| %> - - <% end %> -
    -
    - - -
    - Gender - <% options = ['Male', 'Female', 'Ambiguous', 'Transgender', 'Non-binary', 'Agender', 'Androgenous', 'Genderqueer'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Body type - <% options = ['Frail', 'Lean', 'Thin', 'Athletic', 'Hourglass', 'Rectangular', 'Muscular', 'Big-boned', 'Petite', 'Round', 'Pear-shaped', 'Curvy', 'Overweight', 'Underweight'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Hair color - <% options = ['Blonde', 'Black', 'Brown', 'Red', 'White', 'Grey', 'Greying', 'Bald', 'Bleached', 'Blue', 'Green', 'Purple', 'Pink', 'Orange', 'Auburn', 'Rainbow'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Hair style - <% options = ['Long', 'Medium', 'Short', 'Wavy', 'Straight', 'Curly', 'Afro', 'Bald', 'Balding', 'Bangs', 'Bob cut', 'Bowl cut', 'Bouffant', 'Braided', 'Bun', 'Buzzcut', 'Chignon', 'Combover', 'Cornrows', 'Crewcut', 'Dreadlocks', 'Emo', 'Feathered', 'Flattop', 'Fringe', 'Mop-top', 'Parted', 'Pigtails', 'Pixie', 'Pompadour', 'Ponytail', 'Rat-tail', 'Rocker', 'Slicked back', 'Spiked'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Eye color - <% options = ['Amber', 'Blue', 'Brown', 'Topaz', 'Grey', 'Green', 'Hazel', 'Amethyst', 'Indigo', 'Violet', 'Red', 'Black', 'White'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Skin tone - <% options = ['Light', 'Medium', 'Dark', 'Pale', 'Fair', 'Tan', 'White', 'Brown', 'Black', 'Olive', 'Albino', 'Chocolate', 'Grey', 'Green', 'Blue', 'Red', 'Pink', 'Orange', 'Silver', 'Gold', 'Yellow', 'Purple', 'Freckled', 'Speckled'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Facial hair - <% options = ['Stubble', 'Patchy', 'Beard', 'Chin curtain', 'Chinstrap', 'Fu Manchu', 'Goatee', 'Mustache', 'Handlebar mustache', 'Horseshoe mustache', 'Mutton chops', 'Neckbeard', 'Sideburns', 'Soul patch'] %> - <% options.each do |option| %> - - <% end %> -
    - - -
    - Alternate Race - <% options = AutocompleteService.for_field_label(content_model: Character, label: 'Race') - ['Human', 'Dark Elf', 'Construct', 'Half-Elf', 'Half-Dwarf', 'Half-Orc', 'Spirit'] %> - <% options.each do |option| %> - - <% end %> -
    - -
    -
    - <%= f.submit 'Visualize this character', class: 'btn white-text pink' %> -
    - <% end %> -
    -
  • -
  • -
    - help - How do I save my images? -
    -
    -

    - To save any image, simply right click on it (or long-press if you're on mobile) and click "Save as..." to save - it to your computer. -

    -

    - Feel free to upload your images to their character pages on Notebook.ai if you want to show them off in a gallery - alongside any other information you have about your character! - <% unless user_signed_in? %> - <%= link_to 'You can sign up for a free account here.', new_registration_path(User) %> - <% end %> -

    -
    -
  • -
  • -
    - help - Who can see the images I generate? -
    -
    -

    - All visualizer images are typically private by default when generated from Notebook.ai, but any images generated from this page - for the VizJam will be public by default (and visible from this page!). The jam is meant to introduce our creatives to - the new kinds of tools out there available for visualizing your ideas, and making everything public is a great way to - learn what's possible from each other. If you want to make private images of your characters, you can always use - <%= link_to "Notebook.ai's standard visualization feature", basil_path %>. -

    -

    - Only the most recent 20 generated images are shown on this page, so make sure you save any images you want to keep! After they fall - off the list, you won't see them again! -

    -
    -
  • -
  • -
    - help - What if I want an option that isn't available? -
    -
    -

    - Come <%= link_to 'join us on Discord', 'https://discord.gg/bDE8g5YRzp' %> - and request it! I'll be adding more character options throughout the day based on your feedback. :) -

    -
    -
  • -
  • -
    - help - How is this different from the normal visualization features in Notebook.ai? -
    -
    -

    - Here are the big differences: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - VizJamNotebook.ai's Visualizer
    PriceFree to useAvailable with Premium ($7-9/mo)
    PrivacyPublicPrivate
    Available StylesRealisticRealistic & 11 other styles
    ContentCharacters only<%= BasilService::ENABLED_PAGE_TYPES.map(&:pluralize).to_sentence %>
    ControlSimple checkbox optionsUnlimited, freeform text
    -

    -
    -
  • -
  • -
    - help - How long will the VizJam last? -
    -
    -

    - This VizJam runs from June 8rd, 2023 to June 13th, 2023. You can follow - <%= link_to '@IndentLabs on Twitter', 'https://www.twitter.com/IndentLabs', target: '_blank' %> - or - <%= link_to '@IndentLabs on Medium', 'https://medium.com/indent-labs', target: '_blank' %> - to know when the next VizJam will be! -

    -
    -
  • -
-
- -
-

- 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) %>