Skip to content

Commit

Permalink
clean up tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
thedumbtechguy committed Apr 15, 2024
1 parent 0523910 commit e3dd003
Show file tree
Hide file tree
Showing 8 changed files with 1,642 additions and 828 deletions.
10 changes: 5 additions & 5 deletions app/views/application/_resource_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
href="#"
class="flex py-3 px-4 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"
>
<div class="flex-shrink-0">
<div class="shrink-0">
<img
class="w-11 h-11 rounded-full"
src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/bonnie-green.png"
Expand Down Expand Up @@ -153,7 +153,7 @@
href="#"
class="flex py-3 px-4 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"
>
<div class="flex-shrink-0">
<div class="shrink-0">
<img
class="w-11 h-11 rounded-full"
src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/jese-leos.png"
Expand Down Expand Up @@ -199,7 +199,7 @@
href="#"
class="flex py-3 px-4 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"
>
<div class="flex-shrink-0">
<div class="shrink-0">
<img
class="w-11 h-11 rounded-full"
src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/joseph-mcfall.png"
Expand Down Expand Up @@ -247,7 +247,7 @@
href="#"
class="flex py-3 px-4 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"
>
<div class="flex-shrink-0">
<div class="shrink-0">
<img
class="w-11 h-11 rounded-full"
src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/roberta-casas.png"
Expand Down Expand Up @@ -296,7 +296,7 @@
href="#"
class="flex py-3 px-4 hover:bg-gray-100 dark:hover:bg-gray-600"
>
<div class="flex-shrink-0">
<div class="shrink-0">
<img
class="w-11 h-11 rounded-full"
src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/robert-brown.png"
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/form/form_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<% if f.object.errors.present? %>
<div class="flex p-4 px-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400" role="alert">
<svg class="flex-shrink-0 inline w-4 h-4 me-3 mt-[2px]" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
<svg class="shrink-0 inline w-4 h-4 me-3 mt-[2px]" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
</svg>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
>
<svg
aria-hidden="true"
class="flex-shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white"
class="shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/toolbar/toolbar_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def classname
private

def toolbar_actions_classes
"w-full md:w-auto flex flex-col md:flex-row space-y-1 md:space-y-0 items-stretch md:items-center justify-end flex-shrink-0"
"w-full md:w-auto flex flex-col md:flex-row space-y-1 md:space-y-0 items-stretch md:items-center justify-end shrink-0"
end
end
end
Expand Down
7 changes: 4 additions & 3 deletions app/views/layouts/resource.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>

<%= yield(:assets) %>
<link rel="stylesheet" href="<%= Plutonium.stylesheet_link %>" />
<script src="<%= Plutonium.script_link %>"></script>
<%# <script src="/plutonium-assets/application.js"></script> %>
<%== Plutonium::Config.stylesheet_tag.call self %>
<%== Plutonium::Config.script_tag.call self %>
<%= yield(:head) %>
</head>
<body class="antialiased bg-gray-50 dark:bg-gray-900">
Expand Down
6 changes: 6 additions & 0 deletions lib/plutonium/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ module Config

mattr_accessor :cache_discovery
@@cache_discovery = defined?(Rails.env) && !Rails.env.development?

mattr_accessor :stylesheet_tag
@@stylesheet_tag = ->(view_context) { "<link rel=\"stylesheet\" href=\"#{Plutonium.stylesheet_link}\" />" }

mattr_accessor :script_tag
@@script_tag = ->(view_context) { "<script src=\"#{Plutonium.script_link}\"></script>" }
end
end

0 comments on commit e3dd003

Please sign in to comment.