diff --git a/CHANGELOG.md b/CHANGELOG.md index 01eb0e6..dfb4948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## main (unreleased) +* New layout and style ([#12](https://github.com/petalmd/gravity_mailbox/pull/12)) + ## v0.2.0 (2022-12-15) * New look ([#7](https://github.com/petalmd/gravity_mailbox/pull/7)) diff --git a/README.md b/README.md index c5cadf7..1c8f862 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ [![Gem Version](https://badge.fury.io/rb/gravity_mailbox.svg)](https://badge.fury.io/rb/gravity_mailbox) [![Ruby](https://github.com/petalmd/gravity_mailbox/actions/workflows/main.yml/badge.svg)](https://github.com/petalmd/gravity_mailbox/actions/workflows/main.yml) -# GravityMailbox +

+ +

Development tools that aim to make it simple to visualize mail sent by your Rails app directly through your Rails app. It works in development and also in a staging environment by using the `Rails.cache` to store the mails. @@ -34,7 +36,9 @@ config.action_mailer.perform_deliveries = true * Send mails * Go to http://localhost:3000/gravity_mailbox to see the mails. -image +

+ image +

## Development diff --git a/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/_mail.html.erb b/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/_mail.html.erb index 9edc7a6..a8109b4 100644 --- a/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/_mail.html.erb +++ b/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/_mail.html.erb @@ -1,5 +1,5 @@ -
+
<%= mail.subject %> diff --git a/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/index.html.erb b/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/index.html.erb index 7af33e9..9df9161 100644 --- a/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/index.html.erb +++ b/lib/gravity_mailbox/templates/gravity_mailbox/mailbox/index.html.erb @@ -1,5 +1,5 @@ <% content_for :style do %> - body, iframe { + body, iframe { height: 100vh; } @@ -8,6 +8,14 @@ width: 100%; } + .navbar { + background-color: #007bff !important; + } + + .navbar-brand > h1 { + font-family: 'Righteous', cursive !important; + } + .mail-list-column { height: 100vh; overflow: scroll; @@ -21,14 +29,42 @@ font-family: arial, sans-serif; color: #000; cursor: pointer; + width: 100%; + text-align: left; + } + + .mail-list-item { + background-color: #fff!important; + padding: 1rem; + box-shadow: inset 0 -1px 0 0 rgb(100 121 143 / 12%) !important; } - .selected-mail { + .mail-list-item.selected-mail { background-color: #ffffff!important; + border-left: 8px solid #ed900c; + padding-left: calc(1rem - 8px); } - .mail-list-item { - background-color: hsl(206deg 27% 96%); + .mail-list-item:hover { + cursor: pointer !important; + border-left: 8px solid lightgrey; + padding-left: calc(1rem - 8px); + } + + .mail-list-item.selected-mail:hover { + border-left: 8px solid #ed900c; + } + + #iframe-mail-container { + background-color: whitesmoke !important; + } + + .dropdown-trigger:hover { + cursor: pointer !important; + } + + .dropdown-item:hover { + background-color: whitesmoke !important; } <% end %> @@ -67,45 +103,71 @@
- <% @mails.each_with_index do |mail, index| %> - <%= render partial: 'mail', locals: { mail: mail, index: index } %> - <% end %> + <% @mails.each_with_index do |mail, index| %> + <%= render partial: 'mail', locals: { mail: mail, index: index } %> + <% end %>
- +
diff --git a/lib/gravity_mailbox/templates/layouts/application.html.erb b/lib/gravity_mailbox/templates/layouts/application.html.erb index 95f2037..9fc4583 100644 --- a/lib/gravity_mailbox/templates/layouts/application.html.erb +++ b/lib/gravity_mailbox/templates/layouts/application.html.erb @@ -3,14 +3,16 @@ - + + + - <%= yield %> - - +<%= yield %> + +