Skip to content

Commit

Permalink
feat(podcasts): styling filters
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonhundt committed Oct 4, 2023
1 parent 4228475 commit b49059c
Showing 1 changed file with 37 additions and 35 deletions.
72 changes: 37 additions & 35 deletions app/views/podcasts/_podcast_filters.html.erb
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
<div class="mt-4 mb-2" data-controller="dynamic-form">

<div class="d-flex align-items-center justify-content-between">

<h1 class="text-black fw-bold m-0"><%= t(".my_podcasts") %></h1>

<div class="dropdown mx-4">
<button class="btn btn-outline-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Sorting options">
<span class="material-icons" style="color: green" aria-hidden="true" aria-hidden="true">sort</span>
<%= t(".sorts.#{PodcastSorting.key(params[:sort])}") %>
</button>

<ul class="dropdown-menu">
<% PodcastSorting::SORTS.each do |key, value| %>
<li>
<%= search_sort_button t(".sorts.#{key}"), value %>
</li>
<% end %>
</ul>
</div>

<div class="dropdown mx-2 flex-grow-1">
<button class="btn btn-outline-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Paging options">
<span class="material-icons" style="color: green" aria-hidden="true" aria-hidden="true">settings</span>
<%= t(".pages.#{search_per_page_key}") %>
</button>

<ul class="dropdown-menu">
<% search_per_page_options.each do |key, value| %>
<li>
<%= search_per_page_button t(".pages.#{key}"), value %>
</li>
<% end %>
</ul>
</div>

<div class="form-floating w-25">
<div class="d-flex align-items-center justify-content-between mb-4">

<h1 class="text-black fw-bold my-0 mb-0 me-4"><%= t(".my_podcasts") %></h1>

<div class="flex-grow-1 d-flex justify-items-start">
<div class="dropdown mx-2">
<button class="btn btn-outline-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Sorting options">
<span class="material-icons text-black-50" aria-hidden="true" aria-hidden="true">sort</span>
<%= t(".sorts.#{PodcastSorting.key(params[:sort])}") %>
</button>

<ul class="dropdown-menu">
<% PodcastSorting::SORTS.each do |key, value| %>
<li>
<%= search_sort_button t(".sorts.#{key}"), value %>
</li>
<% end %>
</ul>
</div>

<div class="dropdown mx-2">
<button class="btn btn-outline-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Paging options">
<span class="material-icons text-black-50" aria-hidden="true" aria-hidden="true">settings</span>
<%= t(".pages.#{search_per_page_key}") %>
</button>

<ul class="dropdown-menu">
<% search_per_page_options.each do |key, value| %>
<li>
<%= search_per_page_button t(".pages.#{key}"), value %>
</li>
<% end %>
</ul>
</div>
</div>

<div class="form-floating flex-grow-1">
<%= search_query_field t(".search_podcasts") %>
</div>
</div>
Expand Down

0 comments on commit b49059c

Please sign in to comment.