maily 0.11.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/MIT-LICENSE +1 -1
- data/app/assets/images/maily/logo.png +0 -0
- data/app/controllers/maily/emails_controller.rb +15 -0
- data/app/helpers/maily/application_helper.rb +14 -1
- data/app/views/layouts/maily/application.html.erb +1 -1
- data/app/views/maily/shared/_flash_messages.html.erb +3 -3
- data/app/views/maily/shared/_header.html.erb +5 -2
- data/app/views/maily/shared/_stylesheet.html.erb +271 -0
- data/lib/generators/maily/install_generator.rb +1 -1
- data/lib/maily/engine.rb +1 -7
- data/lib/maily/generator.rb +1 -3
- data/lib/maily/version.rb +1 -1
- metadata +5 -20
- data/app/assets/stylesheets/maily/_variables.scss +0 -6
- data/app/assets/stylesheets/maily/application.scss +0 -305
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 8a71e9271060d187f12a6a5d719548bd79ec2d9518a089374c84b671924a9820
         | 
| 4 | 
            +
              data.tar.gz: faf2268d8dccb44e8c4b09d883d16928c786b2774fce5b52eb998edd1eebff78
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3e7f4a8e4004a3e39f77bac0b812d7340952eccdda134525a47e3c405bca8a136092e3c6079381f966bad0d3cb17fd90d8fca77d5ded242bf593cc47ad9b25ba
         | 
| 7 | 
            +
              data.tar.gz: bd248a071b75a4791408bf7f43837f9bbcd0160fbea84c61d63399836dcb371caf4f6e941ded8481a6a3dd767be7ef8a66df4cf01c9d2df549504b2dd1cd67a3
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -2,6 +2,26 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            All notable changes to this project will be documented in this file.
         | 
| 4 4 |  | 
| 5 | 
            +
            ## [1.0.0]
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            - Avoid the dependency on Sprockets (#48)
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            ## [0.12.3]
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            - Styles: fix input placeholder color in Firefox
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            ## [0.12.2]
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            - Refine logo and UI (#45)
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            ## [0.12.1]
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            - Sprockets v4 fixes (#44)
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            ## [0.12.0]
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            - Support inline attachments (#30)
         | 
| 24 | 
            +
             | 
| 5 25 | 
             
            ## [0.11.0]
         | 
| 6 26 |  | 
| 7 27 | 
             
            - Support arrays in hooks (#42)
         | 
| @@ -123,6 +143,11 @@ All notable changes to this project will be documented in this file. | |
| 123 143 |  | 
| 124 144 | 
             
            - First real usable release :tada:
         | 
| 125 145 |  | 
| 146 | 
            +
            [1.0.0]: https://github.com/markets/maily/compare/v0.12.3...v1.0.0
         | 
| 147 | 
            +
            [0.12.3]: https://github.com/markets/maily/compare/v0.12.2...v0.12.3
         | 
| 148 | 
            +
            [0.12.2]: https://github.com/markets/maily/compare/v0.12.1...v0.12.2
         | 
| 149 | 
            +
            [0.12.1]: https://github.com/markets/maily/compare/v0.12.0...v0.12.1
         | 
| 150 | 
            +
            [0.12.0]: https://github.com/markets/maily/compare/v0.11.0...v0.12.0
         | 
| 126 151 | 
             
            [0.11.0]: https://github.com/markets/maily/compare/v0.10.1...v0.11.0
         | 
| 127 152 | 
             
            [0.10.1]: https://github.com/markets/maily/compare/v0.10.0...v0.10.1
         | 
| 128 153 | 
             
            [0.10.0]: https://github.com/markets/maily/compare/v0.9.1...v0.10.0
         | 
    
        data/MIT-LICENSE
    CHANGED
    
    
| Binary file | 
| @@ -25,6 +25,7 @@ module Maily | |
| 25 25 |  | 
| 26 26 | 
             
                  content = content.raw_source
         | 
| 27 27 | 
             
                  content = view_context.simple_format(content) if @email.sub_type == 'plain' || params[:part] == 'text'
         | 
| 28 | 
            +
                  content = prepare_inline_attachments(@email, content)
         | 
| 28 29 |  | 
| 29 30 | 
             
                  render html: content.html_safe, layout: false
         | 
| 30 31 | 
             
                end
         | 
| @@ -79,5 +80,19 @@ module Maily | |
| 79 80 | 
             
                    yield
         | 
| 80 81 | 
             
                  end
         | 
| 81 82 | 
             
                end
         | 
| 83 | 
            +
             | 
| 84 | 
            +
                def prepare_inline_attachments(email, content)
         | 
| 85 | 
            +
                  content.gsub(/src=(?:"cid:[^"]+"|'cid:[^']+')/i) do |match|
         | 
| 86 | 
            +
                    if part = find_part(email, match[9..-2])
         | 
| 87 | 
            +
                      %[src="data:#{part.mime_type};base64,#{Base64.encode64(part.body.raw_source)}"]
         | 
| 88 | 
            +
                    else
         | 
| 89 | 
            +
                      match
         | 
| 90 | 
            +
                    end
         | 
| 91 | 
            +
                  end
         | 
| 92 | 
            +
                end
         | 
| 93 | 
            +
             | 
| 94 | 
            +
                def find_part(email, cid)
         | 
| 95 | 
            +
                  email.all_parts.find { |p| p.attachment? && p.cid == cid }
         | 
| 96 | 
            +
                end
         | 
| 82 97 | 
             
              end
         | 
| 83 98 | 
             
            end
         | 
| @@ -14,8 +14,21 @@ module Maily | |
| 14 14 | 
             
                  'selected_mail' if mailer.name == params[:mailer] && email.name == params[:email]
         | 
| 15 15 | 
             
                end
         | 
| 16 16 |  | 
| 17 | 
            +
                def logo
         | 
| 18 | 
            +
                  image_tag(file_to_base64('maily/logo.png', 'image/png'))
         | 
| 19 | 
            +
                end
         | 
| 20 | 
            +
             | 
| 17 21 | 
             
                def icon(name)
         | 
| 18 | 
            -
                  image_tag | 
| 22 | 
            +
                  image_tag(file_to_base64("maily/icons/#{name}.svg", 'image/svg+xml'), class: :icon)
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                private
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                def file_to_base64(path, mime_type)
         | 
| 28 | 
            +
                  file = Maily::Engine.root.join('app/assets/images').join(path)
         | 
| 29 | 
            +
                  base64_contents = Base64.strict_encode64(file.read)
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                  "data:#{mime_type};base64,#{base64_contents}"
         | 
| 19 32 | 
             
                end
         | 
| 20 33 | 
             
              end
         | 
| 21 34 | 
             
            end
         | 
| @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            <% if flash[:alert].present? %>
         | 
| 2 | 
            -
              <div class="alert | 
| 2 | 
            +
              <div class="alert"><%= flash[:alert].html_safe %></div>
         | 
| 3 3 | 
             
            <% end %>
         | 
| 4 4 |  | 
| 5 5 | 
             
            <% if flash[:notice].present? %>
         | 
| 6 | 
            -
              <div class="alert | 
| 7 | 
            -
            <% end %>
         | 
| 6 | 
            +
              <div class="alert"><%= flash[:notice].html_safe %></div>
         | 
| 7 | 
            +
            <% end %>
         | 
| @@ -1,6 +1,9 @@ | |
| 1 1 | 
             
            <header class="header">
         | 
| 2 2 | 
             
              <a href="<%= root_path %>" class="logo_link">
         | 
| 3 | 
            -
                <%=  | 
| 4 | 
            -
             | 
| 3 | 
            +
                <%= logo %>
         | 
| 4 | 
            +
              </a>
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              <a href="<%= main_app.root_path %>" class="back_to_app">
         | 
| 7 | 
            +
                Back to app
         | 
| 5 8 | 
             
              </a>
         | 
| 6 9 | 
             
            </header>
         | 
| @@ -0,0 +1,271 @@ | |
| 1 | 
            +
            <%
         | 
| 2 | 
            +
              blue       = "#59abc6"
         | 
| 3 | 
            +
              grey       = "#cccccc"
         | 
| 4 | 
            +
              bluegrey   = "#2f738a"
         | 
| 5 | 
            +
              darkgrey   = "#666666"
         | 
| 6 | 
            +
              textColor  = "#333333"
         | 
| 7 | 
            +
              linkColor  = blue
         | 
| 8 | 
            +
              hoverColor = bluegrey
         | 
| 9 | 
            +
            %>
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            <style>
         | 
| 12 | 
            +
              /* Body */
         | 
| 13 | 
            +
              body {
         | 
| 14 | 
            +
                color: <%= textColor %>;
         | 
| 15 | 
            +
                font-size: 1em;
         | 
| 16 | 
            +
                font-family: "Helvetica Neue", Helvetica, sans-serif;
         | 
| 17 | 
            +
              }
         | 
| 18 | 
            +
             | 
| 19 | 
            +
              /* Links & Buttons */
         | 
| 20 | 
            +
              a {
         | 
| 21 | 
            +
                color: <%= linkColor %>;
         | 
| 22 | 
            +
                text-decoration: none;
         | 
| 23 | 
            +
              }
         | 
| 24 | 
            +
              a:hover {
         | 
| 25 | 
            +
                color: <%= hoverColor %>;
         | 
| 26 | 
            +
              }
         | 
| 27 | 
            +
              .button {
         | 
| 28 | 
            +
                cursor: pointer;
         | 
| 29 | 
            +
                box-sizing: border-box;
         | 
| 30 | 
            +
                -moz-box-sizing: border-box;
         | 
| 31 | 
            +
                padding: 0;
         | 
| 32 | 
            +
                border: none;
         | 
| 33 | 
            +
                background: none;
         | 
| 34 | 
            +
                color: <%= linkColor %>;
         | 
| 35 | 
            +
              }
         | 
| 36 | 
            +
              .button:hover {
         | 
| 37 | 
            +
                color: <%= hoverColor %>;
         | 
| 38 | 
            +
              }
         | 
| 39 | 
            +
             | 
| 40 | 
            +
              /* Inputs */
         | 
| 41 | 
            +
              input {
         | 
| 42 | 
            +
                font-size: 100%;
         | 
| 43 | 
            +
                font-family: inherit;
         | 
| 44 | 
            +
                height: 1.2em;
         | 
| 45 | 
            +
                border: solid 1px <%= grey %>;
         | 
| 46 | 
            +
                border-radius: 6px;
         | 
| 47 | 
            +
                background: "#ffffff";
         | 
| 48 | 
            +
                line-height: 1;
         | 
| 49 | 
            +
                padding-left: 0.5em;
         | 
| 50 | 
            +
              }
         | 
| 51 | 
            +
             | 
| 52 | 
            +
              ::-webkit-input-placeholder, ::-moz-placeholder {
         | 
| 53 | 
            +
                font-weight: 300;
         | 
| 54 | 
            +
                font-size: 0.8em;
         | 
| 55 | 
            +
                color: <%= darkgrey %>;
         | 
| 56 | 
            +
              }
         | 
| 57 | 
            +
             | 
| 58 | 
            +
              /* Header */
         | 
| 59 | 
            +
              header.header, footer.footer {
         | 
| 60 | 
            +
                position: fixed;
         | 
| 61 | 
            +
                left: 0;
         | 
| 62 | 
            +
                z-index: 99;
         | 
| 63 | 
            +
                width: 100%;
         | 
| 64 | 
            +
                background-color: rgba(255, 255, 255, 0.95);
         | 
| 65 | 
            +
              }
         | 
| 66 | 
            +
              header.header {
         | 
| 67 | 
            +
                padding: 0.6em;
         | 
| 68 | 
            +
                top: 0;
         | 
| 69 | 
            +
                box-shadow: 0 0.0625em 0.3125em rgba(0, 0, 0, 0.15);
         | 
| 70 | 
            +
              }
         | 
| 71 | 
            +
              header.header .logo_link {
         | 
| 72 | 
            +
                margin-left: 1em;
         | 
| 73 | 
            +
              }
         | 
| 74 | 
            +
              header.header .logo_link img {
         | 
| 75 | 
            +
                height: 45px;
         | 
| 76 | 
            +
              }
         | 
| 77 | 
            +
              header.header .back_to_app {
         | 
| 78 | 
            +
                float: right;
         | 
| 79 | 
            +
                margin-right: 2em;
         | 
| 80 | 
            +
                margin-top: 1em;
         | 
| 81 | 
            +
              }
         | 
| 82 | 
            +
             | 
| 83 | 
            +
              /* Footer */
         | 
| 84 | 
            +
              footer.footer {
         | 
| 85 | 
            +
                padding: 0 1em;
         | 
| 86 | 
            +
                bottom: 0;
         | 
| 87 | 
            +
                box-shadow: 0 -0.0625em 0.3125em rgba(0, 0, 0, 0.15);
         | 
| 88 | 
            +
                font-family: inherit;
         | 
| 89 | 
            +
                font-size: 0.9em;
         | 
| 90 | 
            +
              }
         | 
| 91 | 
            +
             | 
| 92 | 
            +
              /* Main content */
         | 
| 93 | 
            +
              .wrap_content {
         | 
| 94 | 
            +
                display: inline-block;
         | 
| 95 | 
            +
                box-sizing: border-box;
         | 
| 96 | 
            +
                -moz-box-sizing: border-box;
         | 
| 97 | 
            +
                padding: 6em 0.75em 4em;
         | 
| 98 | 
            +
                width: 100%;
         | 
| 99 | 
            +
              }
         | 
| 100 | 
            +
              .content {
         | 
| 101 | 
            +
                margin-right: 2em;
         | 
| 102 | 
            +
                margin-left: 1em;
         | 
| 103 | 
            +
                padding-left: 20%;
         | 
| 104 | 
            +
              }
         | 
| 105 | 
            +
              ul.action_bar {
         | 
| 106 | 
            +
                margin: 0 0 5px;
         | 
| 107 | 
            +
                padding: 0;
         | 
| 108 | 
            +
                list-style: none;
         | 
| 109 | 
            +
                font-size: 1.2em;
         | 
| 110 | 
            +
              }
         | 
| 111 | 
            +
              ul.action_bar, ul.action_bar ul {
         | 
| 112 | 
            +
                display: inline-block;
         | 
| 113 | 
            +
                width: 100%;
         | 
| 114 | 
            +
              }
         | 
| 115 | 
            +
              ul.action_bar li, ul.action_bar ul li {
         | 
| 116 | 
            +
                float: left;
         | 
| 117 | 
            +
                margin-right: 0.5em;
         | 
| 118 | 
            +
              }
         | 
| 119 | 
            +
              ul.action_bar li:last-child, ul.action_bar ul li:last-child {
         | 
| 120 | 
            +
                margin-right: 0;
         | 
| 121 | 
            +
              }
         | 
| 122 | 
            +
              ul.action_bar ul {
         | 
| 123 | 
            +
                margin: 0;
         | 
| 124 | 
            +
                padding: 0;
         | 
| 125 | 
            +
                list-style: none;
         | 
| 126 | 
            +
              }
         | 
| 127 | 
            +
              ul.action_bar li.languages {
         | 
| 128 | 
            +
                float: right;
         | 
| 129 | 
            +
              }
         | 
| 130 | 
            +
              ul.action_bar li.languages a {
         | 
| 131 | 
            +
                font-size: 0.9em;
         | 
| 132 | 
            +
              }
         | 
| 133 | 
            +
              li.splitter {
         | 
| 134 | 
            +
                width: 1px;
         | 
| 135 | 
            +
                border-left: 1px <%= grey %> solid;
         | 
| 136 | 
            +
                text-indent: -999999em;
         | 
| 137 | 
            +
              }
         | 
| 138 | 
            +
              .mail_description {
         | 
| 139 | 
            +
                margin-bottom: 2em;
         | 
| 140 | 
            +
              }
         | 
| 141 | 
            +
              .mail_deliver ul li {
         | 
| 142 | 
            +
                float: left;
         | 
| 143 | 
            +
                margin-right: 0.4em;
         | 
| 144 | 
            +
              }
         | 
| 145 | 
            +
              .mail_preview {
         | 
| 146 | 
            +
                height: 100%;
         | 
| 147 | 
            +
                box-sizing: border-box;
         | 
| 148 | 
            +
                -moz-box-sizing: border-box;
         | 
| 149 | 
            +
                padding: 1em;
         | 
| 150 | 
            +
                border: solid 1px <%= grey %>;
         | 
| 151 | 
            +
                border-radius: 3px;
         | 
| 152 | 
            +
              }
         | 
| 153 | 
            +
              .mail_preview .mail_details {
         | 
| 154 | 
            +
                margin: 0 0 1em 0;
         | 
| 155 | 
            +
                padding: 0;
         | 
| 156 | 
            +
                color: <%= darkgrey %>;
         | 
| 157 | 
            +
                list-style: none;
         | 
| 158 | 
            +
                font-size: 0.8em;
         | 
| 159 | 
            +
              }
         | 
| 160 | 
            +
              .mail_preview .mail_details li {
         | 
| 161 | 
            +
                line-height: 1.5em;
         | 
| 162 | 
            +
              }
         | 
| 163 | 
            +
              .mail_preview .mail_attachments {
         | 
| 164 | 
            +
                padding: 1em 0 0 0;
         | 
| 165 | 
            +
                border-top: solid 1px <%= grey %>;
         | 
| 166 | 
            +
                color: <%= darkgrey %>;
         | 
| 167 | 
            +
                list-style: none;
         | 
| 168 | 
            +
                font-size: 0.8em;
         | 
| 169 | 
            +
              }
         | 
| 170 | 
            +
              .mail_preview .mail_attachments ul {
         | 
| 171 | 
            +
                display: inline-block;
         | 
| 172 | 
            +
                margin: 0;
         | 
| 173 | 
            +
                padding: 0;
         | 
| 174 | 
            +
                width: 100%;
         | 
| 175 | 
            +
                list-style: none;
         | 
| 176 | 
            +
              }
         | 
| 177 | 
            +
              .mail_preview .mail_attachments ul li {
         | 
| 178 | 
            +
                float: left;
         | 
| 179 | 
            +
                margin: 1em 1em 0 0;
         | 
| 180 | 
            +
              }
         | 
| 181 | 
            +
              .mail_preview iframe.mail_iframe {
         | 
| 182 | 
            +
                padding-top: 1em;
         | 
| 183 | 
            +
                border: none;
         | 
| 184 | 
            +
                border-top: solid 1px <%= grey %>;
         | 
| 185 | 
            +
                border-radius: 3px;
         | 
| 186 | 
            +
                min-height: 100px;
         | 
| 187 | 
            +
              }
         | 
| 188 | 
            +
              .welcome_message {
         | 
| 189 | 
            +
                margin-top: 3em;
         | 
| 190 | 
            +
                max-width: 80%;
         | 
| 191 | 
            +
              }
         | 
| 192 | 
            +
              .format_mail {
         | 
| 193 | 
            +
                position: relative;
         | 
| 194 | 
            +
                display: inline-block;
         | 
| 195 | 
            +
                float: right;
         | 
| 196 | 
            +
                margin: -2em 0 0 0;
         | 
| 197 | 
            +
                padding: 0;
         | 
| 198 | 
            +
                width: 6.5em;
         | 
| 199 | 
            +
                list-style: none;
         | 
| 200 | 
            +
              }
         | 
| 201 | 
            +
              .format_mail li {
         | 
| 202 | 
            +
                float: left;
         | 
| 203 | 
            +
              }
         | 
| 204 | 
            +
              .format_mail li a.format_selected {
         | 
| 205 | 
            +
                color: <%= hoverColor %>;
         | 
| 206 | 
            +
                font-weight: bold;
         | 
| 207 | 
            +
              }
         | 
| 208 | 
            +
              .format_mail li + li {
         | 
| 209 | 
            +
                margin: 0 0 0 0.4em;
         | 
| 210 | 
            +
                padding: 0 0 0 0.4em;
         | 
| 211 | 
            +
                border-left: solid 1px <%= grey %>;
         | 
| 212 | 
            +
              }
         | 
| 213 | 
            +
              .mail_updatearea {
         | 
| 214 | 
            +
                position: relative;
         | 
| 215 | 
            +
                overflow: visible;
         | 
| 216 | 
            +
                min-height: 450px;
         | 
| 217 | 
            +
                width: 100%;
         | 
| 218 | 
            +
                height: 100%;
         | 
| 219 | 
            +
                border: none;
         | 
| 220 | 
            +
              }
         | 
| 221 | 
            +
             | 
| 222 | 
            +
              /* Sidebar */
         | 
| 223 | 
            +
              aside.sidebar {
         | 
| 224 | 
            +
                float: left;
         | 
| 225 | 
            +
                width: 20%;
         | 
| 226 | 
            +
                max-height: 90vh;
         | 
| 227 | 
            +
                overflow-y: scroll;
         | 
| 228 | 
            +
              }
         | 
| 229 | 
            +
              aside.sidebar section.nav_list {
         | 
| 230 | 
            +
                margin: 0 0 1.5em 1.5em;
         | 
| 231 | 
            +
              }
         | 
| 232 | 
            +
              aside.sidebar section.nav_list .nav_title {
         | 
| 233 | 
            +
                margin: 0 0 0.4em;
         | 
| 234 | 
            +
                font-weight: 400;
         | 
| 235 | 
            +
                font-size: 1.2em;
         | 
| 236 | 
            +
              }
         | 
| 237 | 
            +
              aside.sidebar section.nav_list ul {
         | 
| 238 | 
            +
                margin: 0;
         | 
| 239 | 
            +
                padding: 0;
         | 
| 240 | 
            +
                list-style: none;
         | 
| 241 | 
            +
              }
         | 
| 242 | 
            +
              aside.sidebar section.nav_list ul li {
         | 
| 243 | 
            +
                margin-bottom: 0.4em;
         | 
| 244 | 
            +
                list-style: none;
         | 
| 245 | 
            +
              }
         | 
| 246 | 
            +
              aside.sidebar section.nav_list ul li a {
         | 
| 247 | 
            +
                color: <%= linkColor %>;
         | 
| 248 | 
            +
                text-decoration: none;
         | 
| 249 | 
            +
                font-size: 0.9em;
         | 
| 250 | 
            +
              }
         | 
| 251 | 
            +
              aside.sidebar section.nav_list ul li a:hover, aside.sidebar section.nav_list ul li a.selected_mail {
         | 
| 252 | 
            +
                color: <%= hoverColor %>;
         | 
| 253 | 
            +
                font-weight: bold;
         | 
| 254 | 
            +
              }
         | 
| 255 | 
            +
             | 
| 256 | 
            +
              /* Alert messages */
         | 
| 257 | 
            +
              .alert {
         | 
| 258 | 
            +
                border-radius: 3px;
         | 
| 259 | 
            +
                padding: 16px;
         | 
| 260 | 
            +
                margin-bottom: 1.1em;
         | 
| 261 | 
            +
                color: "#ffffff";
         | 
| 262 | 
            +
                background-color: <%= bluegrey %>;
         | 
| 263 | 
            +
              }
         | 
| 264 | 
            +
             | 
| 265 | 
            +
              /* Icons */
         | 
| 266 | 
            +
              img.icon {
         | 
| 267 | 
            +
                width: 20px;
         | 
| 268 | 
            +
                font-size: 0.9em;
         | 
| 269 | 
            +
                vertical-align: bottom;
         | 
| 270 | 
            +
              }
         | 
| 271 | 
            +
            </style>
         | 
    
        data/lib/maily/engine.rb
    CHANGED
    
    
    
        data/lib/maily/generator.rb
    CHANGED
    
    
    
        data/lib/maily/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: maily
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 1.0.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - markets
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2020-10-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -16,28 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version:  | 
| 19 | 
            +
                    version: '4.2'
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version:  | 
| 27 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            -
              name: sassc-rails
         | 
| 29 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            -
                requirements:
         | 
| 31 | 
            -
                - - ">="
         | 
| 32 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: '0'
         | 
| 34 | 
            -
              type: :runtime
         | 
| 35 | 
            -
              prerelease: false
         | 
| 36 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            -
                requirements:
         | 
| 38 | 
            -
                - - ">="
         | 
| 39 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version: '0'
         | 
| 26 | 
            +
                    version: '4.2'
         | 
| 41 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 28 | 
             
              name: rspec-rails
         | 
| 43 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -80,8 +66,6 @@ files: | |
| 80 66 | 
             
            - app/assets/images/maily/icons/globe.svg
         | 
| 81 67 | 
             
            - app/assets/images/maily/icons/paperclip.svg
         | 
| 82 68 | 
             
            - app/assets/images/maily/logo.png
         | 
| 83 | 
            -
            - app/assets/stylesheets/maily/_variables.scss
         | 
| 84 | 
            -
            - app/assets/stylesheets/maily/application.scss
         | 
| 85 69 | 
             
            - app/controllers/maily/application_controller.rb
         | 
| 86 70 | 
             
            - app/controllers/maily/emails_controller.rb
         | 
| 87 71 | 
             
            - app/helpers/maily/application_helper.rb
         | 
| @@ -95,6 +79,7 @@ files: | |
| 95 79 | 
             
            - app/views/maily/shared/_header.html.erb
         | 
| 96 80 | 
             
            - app/views/maily/shared/_javascript.html.erb
         | 
| 97 81 | 
             
            - app/views/maily/shared/_sidebar.html.erb
         | 
| 82 | 
            +
            - app/views/maily/shared/_stylesheet.html.erb
         | 
| 98 83 | 
             
            - config/routes.rb
         | 
| 99 84 | 
             
            - lib/generators/maily/install_generator.rb
         | 
| 100 85 | 
             
            - lib/generators/templates/initializer.rb
         | 
| @@ -1,305 +0,0 @@ | |
| 1 | 
            -
            @import url("https://fonts.googleapis.com/css?family=Josefin+Sans:light");
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            @import "maily/variables";
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            /* Body */
         | 
| 6 | 
            -
            body {
         | 
| 7 | 
            -
              color: $textColor;
         | 
| 8 | 
            -
              font-size: 1em;
         | 
| 9 | 
            -
              font-family: "Helvetica Neue", Helvetica, sans-serif;
         | 
| 10 | 
            -
             | 
| 11 | 
            -
              a {
         | 
| 12 | 
            -
                color: $linkColor;
         | 
| 13 | 
            -
                text-decoration: none;
         | 
| 14 | 
            -
                &:hover {
         | 
| 15 | 
            -
                  color: darken($linkColor, 20%);
         | 
| 16 | 
            -
                }
         | 
| 17 | 
            -
              }
         | 
| 18 | 
            -
            }
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            /* Inputs */
         | 
| 21 | 
            -
            input {
         | 
| 22 | 
            -
              font-size: 100%;
         | 
| 23 | 
            -
              font-family: inherit;
         | 
| 24 | 
            -
              height: 1.2em;
         | 
| 25 | 
            -
              border: solid 1px $grey;
         | 
| 26 | 
            -
              border-radius: 2px;
         | 
| 27 | 
            -
              background: #fff;
         | 
| 28 | 
            -
              line-height: 1;
         | 
| 29 | 
            -
            }
         | 
| 30 | 
            -
             | 
| 31 | 
            -
            ::-webkit-input-placeholder {
         | 
| 32 | 
            -
              padding: 0 .2em;
         | 
| 33 | 
            -
              vertical-align: bottom;
         | 
| 34 | 
            -
              font-weight: 300;
         | 
| 35 | 
            -
            }
         | 
| 36 | 
            -
            :-moz-placeholder { font-size: 0.6em; }
         | 
| 37 | 
            -
            ::-moz-placeholder { font-size: 0.6em; }
         | 
| 38 | 
            -
            :-ms-input-placeholder { font-size: 0.6em; }
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            /* Header */
         | 
| 41 | 
            -
            header.header, footer.footer {
         | 
| 42 | 
            -
              position: fixed;
         | 
| 43 | 
            -
              left: 0;
         | 
| 44 | 
            -
              z-index: 99;
         | 
| 45 | 
            -
              width: 100%;
         | 
| 46 | 
            -
              background-color: rgba(255,255,255, .95);
         | 
| 47 | 
            -
            }
         | 
| 48 | 
            -
             | 
| 49 | 
            -
            header.header {
         | 
| 50 | 
            -
              padding: 1em;
         | 
| 51 | 
            -
              top: 0;
         | 
| 52 | 
            -
              box-shadow: 0 .0625em .3125em rgba(0,0,0, .15);
         | 
| 53 | 
            -
             | 
| 54 | 
            -
              .logo_link {
         | 
| 55 | 
            -
                color: $textColor;
         | 
| 56 | 
            -
                font: 400 2em/1 'Josefin Sans';
         | 
| 57 | 
            -
                margin-left: 10px;
         | 
| 58 | 
            -
             | 
| 59 | 
            -
                img, span {
         | 
| 60 | 
            -
                  vertical-align: text-bottom;
         | 
| 61 | 
            -
                }
         | 
| 62 | 
            -
              }
         | 
| 63 | 
            -
            }
         | 
| 64 | 
            -
             | 
| 65 | 
            -
            /* Footer */
         | 
| 66 | 
            -
            footer.footer {
         | 
| 67 | 
            -
              padding: 0 1em;
         | 
| 68 | 
            -
              bottom: 0;
         | 
| 69 | 
            -
              box-shadow: 0 -.0625em .3125em rgba(0,0,0, .15);
         | 
| 70 | 
            -
              font-family: "Helvetica Neue", Helvetica, sans-serif;
         | 
| 71 | 
            -
              font-size: .9em;
         | 
| 72 | 
            -
            }
         | 
| 73 | 
            -
             | 
| 74 | 
            -
            /* Main content */
         | 
| 75 | 
            -
            .wrap_content {
         | 
| 76 | 
            -
              display: inline-block;
         | 
| 77 | 
            -
              box-sizing: border-box;
         | 
| 78 | 
            -
              -moz-box-sizing: border-box;
         | 
| 79 | 
            -
              padding: 6em .75em 4em;
         | 
| 80 | 
            -
              width: 100%;
         | 
| 81 | 
            -
            }
         | 
| 82 | 
            -
             | 
| 83 | 
            -
            .content {
         | 
| 84 | 
            -
              margin-right: 2em;
         | 
| 85 | 
            -
              margin-left: 1em;
         | 
| 86 | 
            -
              padding-left: 20%;
         | 
| 87 | 
            -
             | 
| 88 | 
            -
              ul.action_bar {
         | 
| 89 | 
            -
                margin: 0 0 5px;
         | 
| 90 | 
            -
                padding: 0;
         | 
| 91 | 
            -
                list-style: none;
         | 
| 92 | 
            -
                font-size: 1.2em;
         | 
| 93 | 
            -
             | 
| 94 | 
            -
                &, & ul {
         | 
| 95 | 
            -
                  display: inline-block;
         | 
| 96 | 
            -
                  width: 100%;
         | 
| 97 | 
            -
                }
         | 
| 98 | 
            -
             | 
| 99 | 
            -
                li, ul li {
         | 
| 100 | 
            -
                  float: left;
         | 
| 101 | 
            -
                  margin-right: .5em;
         | 
| 102 | 
            -
                  &:last-child { margin-right: 0; }
         | 
| 103 | 
            -
                }
         | 
| 104 | 
            -
             | 
| 105 | 
            -
                ul {
         | 
| 106 | 
            -
                  margin: 0;
         | 
| 107 | 
            -
                  padding: 0;
         | 
| 108 | 
            -
                  list-style: none;
         | 
| 109 | 
            -
                }
         | 
| 110 | 
            -
             | 
| 111 | 
            -
                li.languages {
         | 
| 112 | 
            -
                  float: right;
         | 
| 113 | 
            -
                }
         | 
| 114 | 
            -
              }
         | 
| 115 | 
            -
             | 
| 116 | 
            -
              li.splitter {
         | 
| 117 | 
            -
                width: 1px;
         | 
| 118 | 
            -
                border-left: 1px $grey solid;
         | 
| 119 | 
            -
                text-indent: -999999em;
         | 
| 120 | 
            -
              }
         | 
| 121 | 
            -
             | 
| 122 | 
            -
              .mail_description {
         | 
| 123 | 
            -
                margin-bottom: 2em;
         | 
| 124 | 
            -
              }
         | 
| 125 | 
            -
             | 
| 126 | 
            -
              .mail_deliver {
         | 
| 127 | 
            -
                ul {
         | 
| 128 | 
            -
                  li {
         | 
| 129 | 
            -
                    float: left;
         | 
| 130 | 
            -
                    margin-right: .4em;
         | 
| 131 | 
            -
                  }
         | 
| 132 | 
            -
                }
         | 
| 133 | 
            -
              }
         | 
| 134 | 
            -
             | 
| 135 | 
            -
              .mail_preview {
         | 
| 136 | 
            -
                height: 100%;
         | 
| 137 | 
            -
                box-sizing: border-box;
         | 
| 138 | 
            -
                -moz-box-sizing: border-box;
         | 
| 139 | 
            -
                padding: 1em;
         | 
| 140 | 
            -
                border: solid 1px $grey;
         | 
| 141 | 
            -
                border-radius: 3px;
         | 
| 142 | 
            -
             | 
| 143 | 
            -
                .mail_details {
         | 
| 144 | 
            -
                  margin: 0 0 1em 0;
         | 
| 145 | 
            -
                  padding: 0;
         | 
| 146 | 
            -
                  color: $darkgrey;
         | 
| 147 | 
            -
                  list-style: none;
         | 
| 148 | 
            -
                  font-size: .8em;
         | 
| 149 | 
            -
             | 
| 150 | 
            -
                  li { line-height: 1.5em; }
         | 
| 151 | 
            -
                }
         | 
| 152 | 
            -
             | 
| 153 | 
            -
                .mail_attachments {
         | 
| 154 | 
            -
                  padding: 1em 0 0 0;
         | 
| 155 | 
            -
                  border-top: solid 1px $grey;
         | 
| 156 | 
            -
                  color: $darkgrey;
         | 
| 157 | 
            -
                  list-style: none;
         | 
| 158 | 
            -
                  font-size: .8em;
         | 
| 159 | 
            -
             | 
| 160 | 
            -
                  ul {
         | 
| 161 | 
            -
                    display: inline-block;
         | 
| 162 | 
            -
                    margin: 0;
         | 
| 163 | 
            -
                    padding: 0;
         | 
| 164 | 
            -
                    width: 100%;
         | 
| 165 | 
            -
                    list-style: none;
         | 
| 166 | 
            -
             | 
| 167 | 
            -
                    li {
         | 
| 168 | 
            -
                      float: left;
         | 
| 169 | 
            -
                      margin: 1em 1em 0 0;
         | 
| 170 | 
            -
                    }
         | 
| 171 | 
            -
                  }
         | 
| 172 | 
            -
                }
         | 
| 173 | 
            -
             | 
| 174 | 
            -
                iframe.mail_iframe {
         | 
| 175 | 
            -
                  padding-top: 1em;
         | 
| 176 | 
            -
                  border: none;
         | 
| 177 | 
            -
                  border-top: solid 1px $grey;
         | 
| 178 | 
            -
                  border-radius: 2px;
         | 
| 179 | 
            -
                  min-height: 100px;
         | 
| 180 | 
            -
                }
         | 
| 181 | 
            -
              }
         | 
| 182 | 
            -
             | 
| 183 | 
            -
              .welcome_message {
         | 
| 184 | 
            -
                margin-top: 3em;
         | 
| 185 | 
            -
                max-width: 80%;
         | 
| 186 | 
            -
              }
         | 
| 187 | 
            -
             | 
| 188 | 
            -
              .button {
         | 
| 189 | 
            -
                box-sizing: border-box;
         | 
| 190 | 
            -
                -moz-box-sizing: border-box;
         | 
| 191 | 
            -
                padding: 0;
         | 
| 192 | 
            -
                border: none;
         | 
| 193 | 
            -
                background: none;
         | 
| 194 | 
            -
                color: $linkColor;
         | 
| 195 | 
            -
                &:hover {
         | 
| 196 | 
            -
                  color: darken($linkColor, 20%);
         | 
| 197 | 
            -
                }
         | 
| 198 | 
            -
              }
         | 
| 199 | 
            -
             | 
| 200 | 
            -
              .format_mail {
         | 
| 201 | 
            -
                position: relative;
         | 
| 202 | 
            -
                display: inline-block;
         | 
| 203 | 
            -
                float: right;
         | 
| 204 | 
            -
                margin: -2em 0 0 0;
         | 
| 205 | 
            -
                padding: 0;
         | 
| 206 | 
            -
                width: 6.5em;
         | 
| 207 | 
            -
                list-style: none;
         | 
| 208 | 
            -
             | 
| 209 | 
            -
                li {
         | 
| 210 | 
            -
                  float: left;
         | 
| 211 | 
            -
             | 
| 212 | 
            -
                  a.format_selected {
         | 
| 213 | 
            -
                    color: darken($linkColor, 20%);
         | 
| 214 | 
            -
                    font-weight: bold;
         | 
| 215 | 
            -
                  }
         | 
| 216 | 
            -
             | 
| 217 | 
            -
                  + li {
         | 
| 218 | 
            -
                    margin: 0 0 0 .4em;
         | 
| 219 | 
            -
                    padding: 0 0 0 .4em;
         | 
| 220 | 
            -
                    border-left: solid 1px $grey;
         | 
| 221 | 
            -
                  }
         | 
| 222 | 
            -
                }
         | 
| 223 | 
            -
              }
         | 
| 224 | 
            -
             | 
| 225 | 
            -
              .mail_updatearea {
         | 
| 226 | 
            -
                position: relative;
         | 
| 227 | 
            -
                overflow: visible;
         | 
| 228 | 
            -
                min-height: 450px;
         | 
| 229 | 
            -
                width: 100%;
         | 
| 230 | 
            -
                height: 100%;
         | 
| 231 | 
            -
                border: none;
         | 
| 232 | 
            -
              }
         | 
| 233 | 
            -
            }
         | 
| 234 | 
            -
             | 
| 235 | 
            -
            /* Sidebar */
         | 
| 236 | 
            -
            aside.sidebar {
         | 
| 237 | 
            -
              float: left;
         | 
| 238 | 
            -
              width: 20%;
         | 
| 239 | 
            -
              max-height: 90vh;
         | 
| 240 | 
            -
              overflow-y: scroll;
         | 
| 241 | 
            -
             | 
| 242 | 
            -
              section.nav_list {
         | 
| 243 | 
            -
                margin: 0 0 1.5em 1.5em;
         | 
| 244 | 
            -
             | 
| 245 | 
            -
                .nav_title {
         | 
| 246 | 
            -
                  margin: 0 0 .4em;
         | 
| 247 | 
            -
                  font-weight: 400;
         | 
| 248 | 
            -
                  font-size: 1.2em;
         | 
| 249 | 
            -
                }
         | 
| 250 | 
            -
             | 
| 251 | 
            -
                ul {
         | 
| 252 | 
            -
                  margin: 0;
         | 
| 253 | 
            -
                  padding: 0;
         | 
| 254 | 
            -
                  list-style: none;
         | 
| 255 | 
            -
             | 
| 256 | 
            -
                  li {
         | 
| 257 | 
            -
                    margin-bottom: .4em;
         | 
| 258 | 
            -
                    list-style: none;
         | 
| 259 | 
            -
             | 
| 260 | 
            -
                    a {
         | 
| 261 | 
            -
                      color: $linkColor;
         | 
| 262 | 
            -
                      text-decoration: none;
         | 
| 263 | 
            -
                      font-size: .9em;
         | 
| 264 | 
            -
             | 
| 265 | 
            -
                      &.selected_mail {
         | 
| 266 | 
            -
                        color: darken($linkColor, 20%);
         | 
| 267 | 
            -
                        font-weight: bold;
         | 
| 268 | 
            -
             | 
| 269 | 
            -
                        &:before {
         | 
| 270 | 
            -
                          content: "\003E";
         | 
| 271 | 
            -
                          font-weight: bolder;
         | 
| 272 | 
            -
                          font-size: 1.2em;
         | 
| 273 | 
            -
                          margin-right: 2px;
         | 
| 274 | 
            -
                        }
         | 
| 275 | 
            -
                      }
         | 
| 276 | 
            -
                      &:hover {
         | 
| 277 | 
            -
                        color: darken($linkColor, 20%);
         | 
| 278 | 
            -
                      }
         | 
| 279 | 
            -
                    }
         | 
| 280 | 
            -
                  }
         | 
| 281 | 
            -
                }
         | 
| 282 | 
            -
              }
         | 
| 283 | 
            -
            }
         | 
| 284 | 
            -
             | 
| 285 | 
            -
            /* Alert messages */
         | 
| 286 | 
            -
            .alert {
         | 
| 287 | 
            -
              border-radius: 3px;
         | 
| 288 | 
            -
              padding: 16px;
         | 
| 289 | 
            -
              margin-bottom: 1.1em;
         | 
| 290 | 
            -
            }
         | 
| 291 | 
            -
            .alert-warning {
         | 
| 292 | 
            -
              color: $red;
         | 
| 293 | 
            -
              background-color: lighten($red, 40%);
         | 
| 294 | 
            -
            }
         | 
| 295 | 
            -
            .alert-success {
         | 
| 296 | 
            -
              color: #fff;
         | 
| 297 | 
            -
              background-color: darken($blue, 20%);
         | 
| 298 | 
            -
            }
         | 
| 299 | 
            -
             | 
| 300 | 
            -
            /* Icons */
         | 
| 301 | 
            -
            img.icon {
         | 
| 302 | 
            -
              width: 20px;
         | 
| 303 | 
            -
              font-size: .9em;
         | 
| 304 | 
            -
              vertical-align: bottom;
         | 
| 305 | 
            -
            }
         |