Skip to content

Commit

Permalink
styles
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 30, 2024
1 parent bedc447 commit ef93e5c
Show file tree
Hide file tree
Showing 24 changed files with 178 additions and 185 deletions.
4 changes: 2 additions & 2 deletions app/views/articles/_article_item.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</p>
</div>

<div class="flex items-center mt-3 space-x-3 text-gray-500 dark:text-gray-400">
<div class="flex items-center mt-3 space-x-3 border-subtle">
<%= link_to user_path(post.user.username), class: "flex items-center gap-3" do %>
<div class="relative flex-shrink-0 w-5 h-5">
<span style="box-sizing: border-box; display: block; overflow: hidden; width: initial; height: initial; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px; position: absolute; inset: 0px;">
Expand All @@ -48,4 +48,4 @@
<%= l( post.created_at, format: :long_with_day )%>
</time>
</div>
</div>
</div>
32 changes: 16 additions & 16 deletions app/views/articles/mine.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="px-4 sm:px-6 lg:px-8">
<div class="mb-6 my-4">
<div class="">
<div class="border-b--- border-gray-200 dark:border-gray-700">
<div class="border-b--- border-subtle dark:border-gray-700">
<nav class="-mb-px flex space-x-8 text-2xl" aria-label="Tabs">
<%= link_to t("articles.my_articles"), mine_articles_path(tab: "all"), class: @tab == "all" ? 'tab-active' : 'tab-default' %>
<%= link_to t("articles.drafts"), mine_articles_path(tab: "draft"), class: @tab == "draft" ? 'tab-active' : 'tab-default' %>
Expand All @@ -17,17 +17,17 @@

<div class="sm:flex sm:items-center">
<div class="sm:flex-auto">
<h1 class="text-xl font-semibold text-gray-900 dark:text-gray-100">
<h1 class="text-xl font-semibold text-default ">
<%= @tab.capitalize %> Articles
</h1>
<p class="mt-2 text-sm text-gray-700 dark:text-gray-300">
Your articles.
</p>
</div>
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
<%= link_to t('new_article'),
new_article_path,
class: 'inline-flex items-center justify-center rounded-md border border-transparent bg-brand-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:ring-offset-2 sm:w-auto'
<%= link_to t('new_article'),
new_article_path,
class: 'inline-flex items-center justify-center rounded-md border border-transparent bg-brand-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:ring-offset-2 sm:w-auto'
%>
</div>
</div>
Expand All @@ -36,35 +36,35 @@
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
<table class="min-w-full divide-y divide-gray-300 dark:text-gray-700">
<thead class="bg-gray-50">
<table class="min-w-full divide-y divide-muted">
<thead class="bg-muted">
<tr>
<th scope="col" class="px-3 py-3 text-left text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-200 dark:bg-gray-900">Title</th>
<th scope="col" class="px-3 py-3 text-left text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-200 dark:bg-gray-900">Author</th>
<th scope="col" class="px-3 py-3 text-left text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-200 dark:bg-gray-900">Status</th>
<th scope="col" class="relative py-3 pl-3 pr-4 sm:pr-6 dark:text-gray-200 dark:bg-gray-900 ">
<th scope="col" class="px-3 py-3 text-left text-xs font-medium uppercase tracking-wide text-muted ">Title</th>
<th scope="col" class="px-3 py-3 text-left text-xs font-medium uppercase tracking-wide text-muted ">Author</th>
<th scope="col" class="px-3 py-3 text-left text-xs font-medium uppercase tracking-wide text-muted ">Status</th>
<th scope="col" class="relative py-3 pl-3 pr-4 sm:pr-6 ">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 dark:divide-gray-800 bg-default">
<% @posts.each do |post| %>
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 dark:text-gray-200 dark:bg-gray-900 sm:pl-6">
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-default sm:pl-6">
<div class="w-56 truncate">
<%= post.title || "-- untitled" %>
</div>
</td>

<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-200 dark:bg-gray-900">
<td class="whitespace-nowrap px-3 py-4 text-sm text-muted ">
<%= post.user.username %>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-200 dark:bg-gray-900">
<td class="whitespace-nowrap px-3 py-4 text-sm text-muted ">
<%= post.state %>
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 dark:text-gray-200 dark:bg-gray-900 divide-x space-x-2">
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 divide-x space-x-2">
<%= link_to t('Edit'), edit_article_path(post), class: 'text-brand-600 hover:text-brand-900' %>
<%= link_to t('Preview'), preview_article_path(post.signed_id), class: 'text-brand-600 hover:text-brand-900 pl-2' %>
<% if post.slug %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/comments/_comment_item.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<%= comment.user.username %>
<% end %>
</div>
<p class="mt-0.5 text-sm text-gray-500 dark:text-gray-400">
<p class="mt-0.5 text-sm border-subtle">
Commented <%= l comment.created_at, format: :short %>
</p>
</div>
Expand All @@ -50,4 +50,4 @@
</div>
</div>
</div>
</li>
</li>
10 changes: 5 additions & 5 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</div>

<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<div class="bg-white dark:bg-gray-900 py-8 px-4 shadow sm:rounded-lg sm:px-10">
<%= form_for(resource, as: resource_name,
<div class="bg-default py-8 px-4 shadow sm:rounded-lg sm:px-10">

<%= form_for(resource, as: resource_name,
url: session_path(resource_name), html: { class: "space-y-2 flex flex-col" }) do |f| %>
<div>
<div class="mt-1">
Expand All @@ -29,7 +29,7 @@
</div>

<div>

<div class="mt-1">
<%= f.password_field :password,
required: true,
Expand Down Expand Up @@ -67,4 +67,4 @@

</div>
</div>
</div>
</div>
5 changes: 1 addition & 4 deletions app/views/devise/shared/_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div>
<%= button_to omniauth_authorize_path(resource_name, provider), data: { turbo: false },
class: "w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-800 rounded-md shadow-sm bg-default text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-900" do %>
class: "w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-800 rounded-md shadow-sm bg-default text-sm font-medium border-subtle hover:bg-gray-50 dark:hover:bg-gray-900" do %>
<span class="sr-only"><%= gettext("Sign in with #{OmniAuth::Utils.camelize(provider)}") %></span>
<%= raw icon_for(provider) %>
<% end %>
Expand Down Expand Up @@ -53,6 +53,3 @@
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
<% end %>
</div>



18 changes: 9 additions & 9 deletions app/views/event_hosts/_event_host.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<li id="<%= "event-hosts-item-#{event_host.id}" %>"
class="col-span-1 divide-y divide-gray-200 dark:divide-gray-800 rounded-lg bg-white dark:bg-gray-900 shadow">
<li id="<%= "event-hosts-item-#{event_host.id}" %>"
class="col-span-1 divide-y divide-gray-200 dark:divide-gray-800 rounded-lg bg-default shadow">
<div class="flex w-full items-center justify-between space-x-6 p-6">
<div class="flex-1 truncate">
<div class="flex flex-col items-start space-x-3 justify-center">
Expand All @@ -15,7 +15,7 @@
<li><%= event_host.user.username %></li>
</ul>
<% end %>

<div class="flex space-x-2">
<div class="flex space-x-2">
<% if event_host.listed_on_page %>
Expand All @@ -34,15 +34,15 @@
</div>

<div class="sm:col-span-6">
<%= link_to edit_event_event_host_path(event_host.event, event_host),
class: "mt-2 inline-flex justify-center items-center text-white-600 block text-xs",
<%= link_to edit_event_event_host_path(event_host.event, event_host),
class: "mt-2 inline-flex justify-center items-center text-white-600 block text-xs",
data: { turbo_frame: 'modal' } do %>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125"></path>
</svg>
<% end %>
<%= link_to event_event_host_path(event_host.event, event_host),
<%= link_to event_event_host_path(event_host.event, event_host),
class: "mt-2 inline-flex justify-center items-center text-white-600 block text-xs",
data: {confirm: "??", turbo_method: :delete, turbo_confirm: "Are you sure?"} do %>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
Expand All @@ -52,12 +52,12 @@
</div>
</div>

<p class="mt-1 truncate text-sm text-gray-500 dark:text-gray-400">
<p class="mt-1 truncate text-sm border-subtle">
<%= event_host.description %>
</p>
</div>

<%= image_tag event_host.user.avatar_url(:small), class: "h-10 w-10 flex-shrink-0 rounded-full bg-gray-300 dark:bg-gray-700" %>

</div>
</li>
</li>
28 changes: 14 additions & 14 deletions app/views/event_purchases/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% if purchase.new_record? %>
<%= form_for [@event, purchase], url: event_event_purchases_path(@event) do |form|%>


<table class="min-w-full divide-y divide-gray-300 dark:divide-gray-700">
<thead class="bg-gray-50-- dark:bg-gray-900--">
<tr class="hidden sm:table-row">
Expand All @@ -27,35 +27,35 @@
<div class="font-medium text-gray-900 dark:text-gray-100">
<%= ticket.title %>
</div>
<div class="text-gray-500 dark:text-gray-400">
<div class="border-subtle">
<%= ticket.short_description %>
</div>
</div>
</div>
</td>

<td class="hidden sm:table-cell whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-400">
<td class="hidden sm:table-cell whitespace-nowrap px-3 py-4 text-sm border-subtle">
<div class="text-gray-900 dark:text-gray-100 text-2xl">
<%= number_to_currency(ticket.price, unit: "$#{ticket.event.ticket_currency} " ) %>
</div>
</td>

<td class="whitespace-nowrap-- px-3 py-4 text-sm text-gray-500 dark:text-gray-400">
<td class="whitespace-nowrap-- px-3 py-4 text-sm border-subtle">
<div class="flex flex-col space-y-2 sm:space-y-0">
<div class="flex items-center sm:hidden">
<div class="">
<div class="font-medium text-gray-900 dark:text-gray-100">
<%= ticket.title %>
</div>
<div class="text-gray-500 dark:text-gray-400 break-all">
<div class="border-subtle break-all">
<span class="overflow-wrap">
<%= ticket.short_description %>
</span>
</div>
</div>
</div>
<div class="flex sm:justify-center items-center space-x-3">

<% if ticket.free? %>
<div class="flex items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-600">
Expand All @@ -70,10 +70,10 @@
<%= form.fields_for :virtual_purchased, purchase.virtual_purchased do |ff| %>
<%= ff.hidden_field :ticket_id, value: ticket.id %>
<%= ff.number_field :quantity,
min: 0,
maddx: ticket.qty,
step: 1,
label: false
min: 0,
maddx: ticket.qty,
step: 1,
label: false
%>
<% end %>
</div>
Expand All @@ -82,11 +82,11 @@

</tr>
<% end %>

</tbody>
</table>


<div class="flex justify-items-end">
<%= form.submit "Place Order" %>
</div>
Expand All @@ -99,4 +99,4 @@
serás redirigido a esta pagina de pago:
<%= link_to @payment_url, @payment_url, target: "_blank" %>
</div>
<% end %>
<% end %>
12 changes: 4 additions & 8 deletions app/views/event_recordings/_event_recording.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<li id="<%= "event-recording-item-#{event_recording.id}" %>"class="relative col-span-1 divide-y divide-gray-200 dark:divide-gray-800 rounded-lg bg-white dark:bg-gray-900 shadow">
<li id="<%= "event-recording-item-#{event_recording.id}" %>"class="relative col-span-1 divide-y divide-gray-200 dark:divide-gray-800 rounded-lg bg-default shadow">
<iframe
src="<%= event_recording.iframe %>"
frameborder="0"
Expand All @@ -10,15 +10,15 @@
</iframe>
<div class="flex justify-center space-x-2">

<%= link_to edit_event_event_recording_path(event_recording.event, event_recording),
class: "mt-2 inline-flex justify-center items-center text-white-600 block text-xs",
<%= link_to edit_event_event_recording_path(event_recording.event, event_recording),
class: "mt-2 inline-flex justify-center items-center text-white-600 block text-xs",
data: { turbo_frame: 'modal' } do %>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125"></path>
</svg>
<% end %>
<%= link_to event_event_recording_path(event_recording.event, event_recording),
<%= link_to event_event_recording_path(event_recording.event, event_recording),
class: "mt-2 inline-flex justify-center items-center text-white-600 block text-xs",
data: {confirm: "??", turbo_method: :delete, turbo_confirm: "Are you sure?"} do %>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
Expand All @@ -27,7 +27,3 @@
<% end %>
</div>
</li>




4 changes: 2 additions & 2 deletions app/views/event_tickets/_qr_view.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
<div class="relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-900 dark:border-2 px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-md sm:p-6">
<div class="relative transform overflow-hidden rounded-lg bg-default dark:border-2 px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-md sm:p-6">
<div class="flex flex-col">
<div class="flex items-center space-x-2">
<div class="flex self-auto items-center justify-center rounded-full bg-green-100 dark:bg-green-900">
Expand Down Expand Up @@ -62,4 +62,4 @@
</div>
</div>

</div>
</div>
Loading

0 comments on commit ef93e5c

Please sign in to comment.