Skip to content

Commit 15eb30a

Browse files
committed
demo tweaks/
1 parent 9af5c30 commit 15eb30a

File tree

3 files changed

+62
-11
lines changed

3 files changed

+62
-11
lines changed

app/controllers/basil_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ def about
211211
end
212212

213213
def jam
214-
@recent_commissions = BasilCommission.where(entity_id: nil).order('id DESC').limit(18)
214+
@recent_commissions = BasilCommission.where(entity_id: nil).order('id DESC').limit(20)
215215
end
216216

217217
def queue_jam_job
218218
created_prompt = [
219219
jam_params[:age],
220220
jam_params[:gender],
221221
*jam_params[:features]
222-
].join(', ')
222+
].compact.join(', ')
223223

224224
# Create our commission, then redirect back to preview it
225225
BasilCommission.create!(
@@ -231,7 +231,7 @@ def queue_jam_job
231231
final_settings: jam_params
232232
)
233233

234-
redirect_back(fallback_location: basil_jam_path, notice: "#{jam_params[:name]} will be visualized shortly. Find them on this page!")
234+
redirect_back(fallback_location: basil_jam_path, notice: "#{jam_params.fetch(:name, '').presence || 'Your character'} will be visualized shortly. Find them on this page!")
235235
end
236236

237237
def commission_info

app/views/basil/jam.html.erb

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<!-- Build checkboxes -->
5353
<div style="margin-bottom: 1em">
5454
<strong style="margin-right: 1em">Body type</strong>
55-
<% options = ['Frail', 'Lean', 'Thin', 'Athletic', 'Hourglass', 'Bodybuilder', 'Rectangular', 'Muscular', 'Big-boned', 'Round', 'Pear-shaped', 'Curvy', 'Overweight', 'Underweight'] %>
55+
<% options = ['Frail', 'Lean', 'Thin', 'Athletic', 'Hourglass', 'Rectangular', 'Muscular', 'Big-boned', 'Round', 'Pear-shaped', 'Curvy', 'Overweight', 'Underweight'] %>
5656
<% options.each do |option| %>
5757
<label>
5858
<input type="checkbox" name="commission[features][]" value="<%= option %> body" />
@@ -80,7 +80,7 @@
8080
<!-- Hair color checkboxes -->
8181
<div style="margin-bottom: 1em">
8282
<strong style="margin-right: 1em">Hair style</strong>
83-
<% options = ['Afro', 'Bald', 'Balding', 'Bob cut', 'Bowl cut', 'Bouffant', 'Braided', 'Bun', 'Buzzcut', 'Chignon', 'Combover', 'Cornrows', 'Crewcut', 'Dreadlocks', 'Emo', 'Fauxhawk', 'Feathered', 'Flattop', 'Fringe', 'Liberty Spike', 'Long', 'Short', 'Wavy', 'Straight', 'Curly', 'Mop-top', 'Parted', 'Pigtails', 'Pixie', 'Pompadour', 'Ponytail', 'Rat-tail', 'Rocker', 'Slicked back', 'Spiked'] %>
83+
<% options = ['Long', 'Short', 'Wavy', 'Straight', 'Curly', 'Afro', 'Bald', 'Balding', 'Bob cut', 'Bowl cut', 'Bouffant', 'Braided', 'Bun', 'Buzzcut', 'Chignon', 'Combover', 'Cornrows', 'Crewcut', 'Dreadlocks', 'Emo', 'Fauxhawk', 'Feathered', 'Flattop', 'Fringe', 'Liberty Spike', 'Mop-top', 'Parted', 'Pigtails', 'Pixie', 'Pompadour', 'Ponytail', 'Rat-tail', 'Rocker', 'Slicked back', 'Spiked'] %>
8484
<% options.each do |option| %>
8585
<label>
8686
<input type="checkbox" name="commission[features][]" value="<%= option %> hair style" />
@@ -136,7 +136,7 @@
136136
<!-- Race checkboxes -->
137137
<div style="margin-bottom: 1em">
138138
<strong style="margin-right: 1em">Alternate Race</strong>
139-
<% options = AutocompleteService.for_field_label(content_model: Character, label: 'Race') - ['Human'] %>
139+
<% options = AutocompleteService.for_field_label(content_model: Character, label: 'Race') - ['Human', 'Dark Elf'] %>
140140
<% options.each do |option| %>
141141
<label>
142142
<input type="checkbox" name="commission[features][]" value="<%= option %> race" />
@@ -183,14 +183,58 @@
183183
All visualizer images are typically private by default when generated from Notebook.ai, but any images generated from this page
184184
for the VizJam will be public by default (and visible right below this!). The jam is meant to introduce our creatives to
185185
the new kinds of tools out there available for visualizing your ideas, and making everything public is a great way to
186-
learn what's possible from each other.
186+
learn what's possible from each other. If you want to make private images, you can always use
187+
<%= link_to "Notebook.ai's standard visualization feature", basil_path %>.
187188
</p>
188189
<p>
189190
Only the most recent 20 generated images are shown below, so make sure you save any images you want to keep! After they fall
190191
off the list, you won't see them again!
191192
</p>
192193
</div>
193194
</li>
195+
<li>
196+
<div class="collapsible-header">
197+
<i class="material-icons">help</i>
198+
How is this different from the normal visualization features in Notebook.ai?
199+
</div>
200+
<div class="collapsible-body">
201+
<p>
202+
Here are the big differences:
203+
204+
<table>
205+
<th>
206+
<td><strong>VizJam</strong></td>
207+
<td><strong>Notebook.ai</strong></td>
208+
</th>
209+
<tr>
210+
<td><strong>Price</strong></td>
211+
<td>Free to use</td>
212+
<td>Available with Premium</td>
213+
</tr>
214+
<tr>
215+
<td><strong>Privacy</strong></td>
216+
<td>Visualizations are public</td>
217+
<td>Visualizations are private</td>
218+
</tr>
219+
<tr>
220+
<td><strong>Available Styles</strong></td>
221+
<td>Realistic</td>
222+
<td>Realistic & 11 other styles</td>
223+
</tr>
224+
<tr>
225+
<td><strong>Content</strong></td>
226+
<td>Characters only</td>
227+
<td><%= BasilService::ENABLED_PAGE_TYPES.map(&:pluralize).to_sentence %></td>
228+
</tr>
229+
<tr>
230+
<td><strong>Control</strong></td>
231+
<td>Limited checkbox options</td>
232+
<td>Unlimited, freeform text</td>
233+
</tr>
234+
</table>
235+
</p>
236+
</div>
237+
</li>
194238
<li>
195239
<div class="collapsible-header">
196240
<i class="material-icons">help</i>
@@ -224,8 +268,8 @@
224268
<% else %>
225269
<%= image_tag image_path("placeholders/loading.gif"), class: 'commission-image', style: 'background: #2196F3' %>
226270
<% end %>
227-
<span class="card-title">
228-
<%= commission.final_settings&.fetch('name', 'Nameless') %>
271+
<span class="card-title" style="background: black; opacity: 0.75; padding: 4px">
272+
<%= commission.final_settings&.fetch('name', '').presence || 'No name' %>
229273
</span>
230274
<% end %>
231275
</div>
@@ -280,7 +324,7 @@
280324
<div class="modal-content">
281325
<h4>
282326
<i class="material-icons <%= Character.text_color %>"><%= Character.icon %></i>
283-
<%= commission.final_settings&.fetch('name', 'Nameless character') %>
327+
<%= commission.final_settings&.fetch('name', '').presence || 'Nameless character' %>
284328
</h4>
285329
<div class="row">
286330
<div class="col s12 m6">
@@ -306,6 +350,9 @@
306350
<%= commission.prompt %>
307351
</blockquote>
308352
</li>
353+
<li>
354+
<small class="grey-text">Generation ID: <%= commission.job_id %></small>
355+
</li>
309356
</ul>
310357
</div>
311358
</div>

app/views/basil/review.html.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@
5050
<% if commission.style? %>
5151
<em>(<%= commission.style.humanize %>)</em>
5252
<% end %>
53-
by <%= link_to commission.user.name, commission.user %>
53+
<% if commission.user_id %>
54+
by <%= link_to commission.user.name, commission.user %>
55+
<% else %>
56+
anonymous generation
57+
<% end %>
5458
<div style="font-size: 0.5em"><%= commission.job_id %></div>
5559
</div>
5660
<ul>

0 commit comments

Comments
 (0)