polish serendipitous look

This commit is contained in:
Andrew Brown 2023-04-27 18:32:50 -07:00
parent c6b1815902
commit 7d1ae9b7e0
2 changed files with 10 additions and 4 deletions

View File

@ -377,6 +377,7 @@
<!-- replace cards/serendipitous/_content_question with a variant of this -->
<% if @questioned_content && @attribute_field_to_question %>
<% serendipitous_category = @attribute_field_to_question.attribute_category%>
<div x-data="{ isOpen: false }" id="serendipitous-question" data-accordion="collapse" class="mb-2">
<h2 id="serendipitous-question-heading-1" class="relative">
<button
@ -387,11 +388,11 @@
:aria-expanded="isOpen"
aria-controls="serendipitous-question-body-1"
>
<i class="material-icons float-left mr-2">help_outline</i>
<i class="material-icons float-left mr-2"><%= serendipitous_category.icon %></i>
<span>
<%=
t(
"serendipitous_questions.attributes.#{@questioned_content.page_type}.#{@attribute_field_to_question.label.downcase}",
"serendipitous_questions.attributes.#{@questioned_content.page_type.downcase}.#{@attribute_field_to_question.label.parameterize.underscore}",
name: @questioned_content.name,
default: "What is #{@questioned_content.name}'s #{@attribute_field_to_question.label.downcase}?"
)
@ -411,9 +412,12 @@
<div class="relative p-4">
<%= hidden_field_tag "field[name]", @attribute_field_to_question[:id] %>
<label for="field[value]" class="leading-7 text-sm text-gray-600">
<label for="field[value]" class="leading-7 text-sm text-black">
<span class="text-gray-600">Your answer will be saved to</span>
<%= link_to @questioned_content.name, @questioned_content.view_path, class: @questioned_content.text_color %>
&rsaquo;
<%= serendipitous_category.label %>
&rsaquo;
<%= @attribute_field_to_question.label %>
</label>
<%=
@ -422,9 +426,11 @@
class: "w-full h-32 bg-white rounded border border-gray-300 focus:border-notebook-blue focus:ring-2 focus:ring-blue-200 text-base outline-none text-gray-700 py-1 px-3",
placeholder: "Write as little or as much as you'd like!"
%>
<!--
<%= button_tag(type: 'submit', class: "js-content-question-submit px-4 py-2 #{@questioned_content.color} text-white rounded") do %>
Save answer
<% end %>
-->
</div>
<% end %>
</div>

View File

@ -611,7 +611,7 @@ en:
other_names: What other names is %{name} known by?
population: What is the population of %{name}?
social_hierarchy: How is the population separated into hierarchical classes?
social_hierarchy: How is the population separated into hierarchical classes in %{name}?
currency: What currency is used in %{name}?
education: How important is education in %{name}?
laws: What are the major laws in %{name}?