diff --git a/Gemfile b/Gemfile index 20d1473..5debb5f 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,7 @@ gem 'flipper-active_record' gem 'flipper-ui' gem 'gpgme', '~> 2.0.24' gem 'zbase32', '~> 0.1.1' +gem 'kramdown' # HTTP requests gem 'faraday' diff --git a/Gemfile.lock b/Gemfile.lock index c96c0c3..7111c12 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -549,6 +549,7 @@ DEPENDENCIES image_processing (~> 1.12.2) importmap-rails jbuilder (~> 2.7) + kramdown letter_opener letter_opener_web listen (~> 3.2) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index e679da8..bba2f9b 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -7,7 +7,6 @@ @import "components/buttons"; @import "components/dashboard_services"; @import "components/forms"; -@import "components/links"; @import "components/notifications"; @import "components/pagination"; @import "components/tables"; diff --git a/app/assets/stylesheets/components/base.css b/app/assets/stylesheets/components/base.css index 6824786..5f207af 100644 --- a/app/assets/stylesheets/components/base.css +++ b/app/assets/stylesheets/components/base.css @@ -6,6 +6,7 @@ body { @apply leading-none bg-cover bg-fixed; background-image: linear-gradient(35deg, rgba(255,0,255,0.2) 0, rgba(13,79,153,0.8) 100%), url('/img/bg-1.jpg'); + color: black; } body#admin { @@ -32,6 +33,10 @@ @apply pt-8 sm:pt-12; } + main section h3:not(:first-child) { + @apply mt-8; + } + main section:first-of-type { @apply pt-0; } @@ -55,4 +60,11 @@ main ul li { @apply leading-6; } + + main a:not(nav > *) { + @apply text-blue-600; + &:hover { @apply underline; } + &:visited { @apply text-indigo-600; } + &:active { @apply text-red-600; } + } } diff --git a/app/assets/stylesheets/components/buttons.css b/app/assets/stylesheets/components/buttons.css index 34fb68c..5bb4198 100644 --- a/app/assets/stylesheets/components/buttons.css +++ b/app/assets/stylesheets/components/buttons.css @@ -1,5 +1,15 @@ @layer components { + .btn-text-dark { @apply text-black; } + .btn-text-dark:hover { @apply text-black no-underline; } + .btn-text-dark:visited { @apply text-black; } + .btn-text-dark:active { @apply text-black; } + .btn-text-light { @apply text-white; } + .btn-text-light:hover { @apply text-white no-underline; } + .btn-text-light:visited { @apply text-white; } + .btn-text-light:active { @apply text-white; } + .btn { + @apply btn-text-dark; @apply inline-block font-semibold rounded-md leading-none cursor-pointer text-center transition-colors duration-75 focus:outline-none focus:ring-4; } @@ -28,17 +38,20 @@ } .btn-blue { - @apply bg-blue-500 hover:bg-blue-600 text-white + @apply btn-text-light; + @apply bg-blue-500 hover:bg-blue-600 focus:ring-blue-400 focus:ring-opacity-75; } .btn-emerald { - @apply bg-emerald-500 hover:bg-emerald-600 text-white + @apply btn-text-light; + @apply bg-emerald-500 hover:bg-emerald-600 focus:ring-emerald-400 focus:ring-opacity-75; } .btn-red { - @apply bg-red-600 hover:bg-red-700 text-white + @apply btn-text-light; + @apply bg-red-600 hover:bg-red-700 focus:ring-red-500 focus:ring-opacity-75; } diff --git a/app/assets/stylesheets/components/links.css b/app/assets/stylesheets/components/links.css deleted file mode 100644 index 92c9c75..0000000 --- a/app/assets/stylesheets/components/links.css +++ /dev/null @@ -1,8 +0,0 @@ -@layer components { - .ks-text-link { - @apply text-blue-600; - &:hover { @apply underline; } - &:visited { @apply text-indigo-600; } - &:active { @apply text-red-600; } - } -} diff --git a/app/assets/stylesheets/components/pagination.css b/app/assets/stylesheets/components/pagination.css index f6ab6c6..38fffbf 100644 --- a/app/assets/stylesheets/components/pagination.css +++ b/app/assets/stylesheets/components/pagination.css @@ -34,7 +34,7 @@ .pagy-nav .page a, .page.gap { @apply bg-white border-gray-300 text-gray-500 hover:bg-gray-100 relative inline-flex items-center border px-4 py-2 text-sm font-medium - focus:z-20; + no-underline focus:z-20; } .pagy-nav .page.active { diff --git a/app/components/edit_content_button_component.html.erb b/app/components/edit_content_button_component.html.erb new file mode 100644 index 0000000..129d44e --- /dev/null +++ b/app/components/edit_content_button_component.html.erb @@ -0,0 +1,30 @@ +
+ <%= form.label :content, @editable_content.key.capitalize, class: 'font-bold' %> +
+ <% if @editable_content.rich_text %> ++ <%= form.textarea :content, class: "md:w-[56rem] md:h-[28rem]" %> +
++ <%= form.submit "Save", class: "ml-2 btn-md btn-blue" %> +
+ <% else %> ++ <%= form.text_field :content, class: "w-80" %> +
++ <%= form.submit "Save", class: "btn-md btn-blue w-full" %> +
+ <% end %> + <% end %> + <% end %> +