docbrown/app/views/users/_language_settings.html.erb

28 lines
1.1 KiB
Text

<div class="crayons-card grid gap-6 p-6 mb-6">
<header>
<h2 class="crayons-subtitle-1 flex gap-2 items-center">
Languages
<div class="crayons-tooltip flex items-center" data-tooltip="This feature is in beta and
will improve over time. Another way to tailor your feed is to discover
and follow members who write in your preferred language.">
<span class="crayons-indicator crayons-indicator--accent">beta</span>
<div>
</h2>
<p>Select which languages you'd prefer to see in your feed.</p>
<p>
This setting controls which languages you are more likely to see throughout the site,
but you may still see other languages, especially English.
</p>
</header>
<fieldset class="grid gap-4">
<% Languages::LIST.each do |code, name| %>
<label class="crayons-field crayons-field--checkbox">
<%= check_box_tag "user[preferred_languages][]",
code, @user.preferred_languages_array&.include?(code),
class: "crayons-checkbox" %>
<div class="crayons-field__label"><%= name %></div>
</label>
<% end %>
</fieldset>
</div>