Skip to content

Commit

Permalink
css tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Jul 17, 2024
1 parent cb61fde commit c947dea
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions app/views/playlists/_products.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<% if @playlist.products.any? %>
<div class="mt-8">
<h2 class="text-2xl font-bold mb-4">Available Products</h2>
<h2 class="text-2xl font-bold mb-4">
<%= t("playlists.available_products") %>
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<% @playlist.products.each do |product| %>
<div class="bg-default border border-emphasis shadow-md rounded-lg overflow-hidden">
Expand Down Expand Up @@ -32,7 +34,7 @@
</p>

<% if product.stock_quantity.to_i > 0 %>
<%= button_to "Add to Cart", product_cart_add_path(product_id: product.id), method: :post, class: "w-full bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded" %>
<%= button_to "Add to Cart", product_cart_add_path(product_id: product.id), method: :post, class: "button-sm-outline w-full text-center justify-center" %>
<% else %>
<button class="w-full bg-gray-300 text-emphasis font-bold py-2 px-4 rounded cursor-not-allowed" disabled>Sold Out</button>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<nav class="flex space-x-10">
<% menu = [
{to: user_path(@user.username), name: "All"},
{to: user_tracks_path(@user.username), name: t("profile.tracks") },
{to: user_playlists_path(@user.username), name: t("profile.playlists") },
{to: user_albums_path(@user.username), name: t("profile.albums") },
{to: user_tracks_path(@user.username), name: t("profile.tracks") },
# {to: user_playlists_path(@user.username), name: t("profile.playlists") },
{to: user_reposts_path(@user.username), name: t("profile.reposts") },
{to: user_articles_path(@user.username), name: t("profile.articles"), hidden: !@user.is_admin? },
]%>
Expand Down
9 changes: 5 additions & 4 deletions config/locales/base.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ es:
number:
currency:
format:
delimiter: "."
format: "%n %u"
delimiter: ","
format: "%u%n"
precision: 2
separator: ","
separator: "."
significant: false
strip_insignificant_zeros: false
unit: ""
unit: "$"
format:
delimiter: "."
precision: 3
Expand Down Expand Up @@ -218,4 +218,5 @@ es:
default: "%A, %-d de %B de %Y %H:%M:%S %z"
long: "%-d de %B de %Y %H:%M"
short: "%-d de %b %H:%M"
long_with_day: "%d %B %Y"
pm: pm
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ en:
add_to_playlists: Add to playlist
create: Create a playlist
remove_from_playlist: Remove from playlist
available_products: "Available products"

users:
sign_in: Sign in to your account
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ es:
add_to_playlists: Añadir a lista
create: Crear una lista
remove_from_playlist: Quitar de la lista
available_products: "Productos disponibles"

users:
sign_in: Iniciar sesión en tu cuenta
Expand Down

0 comments on commit c947dea

Please sign in to comment.