| @@ -1,210 +1,209 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Email Styles | |
| 4 | - */ | |
| 5 | -if ( !defined( 'ABSPATH' ) ) { | |
| 6 | - exit; | |
| 7 | -} // Exit if accessed directly | |
| 8 | - | |
| 9 | -$settings = weforms_get_settings( 'email_settings', [ | |
| 10 | - 'background_color' => '#f5f5f5', | |
| 11 | - 'body_background_color' => '#ffffff', | |
| 12 | - 'base_color' => '#444444', | |
| 13 | - 'text_color' => '#444444', | |
| 14 | -] ); | |
| 15 | - | |
| 16 | -// Load colours | |
| 17 | -$bg = $settings['background_color']; | |
| 18 | -$body = $settings['body_background_color']; | |
| 19 | -$base = $settings['base_color']; | |
| 20 | -$base_text = '#202020'; | |
| 21 | -$text = $settings['text_color']; | |
| 22 | - | |
| 23 | -$text_lighter_20 = '#555555'; | |
| 24 | - | |
| 25 | -// !important; is a gmail hack to prevent styles being stripped if it doesn't like something. | |
| 26 | -?> | |
| 27 | -#wrapper { | |
| 28 | - background-color: <?php echo esc_attr( $bg ); ?>; | |
| 29 | - margin: 0; | |
| 30 | - padding: 40px 0 0 0; | |
| 31 | - -webkit-text-size-adjust: none !important; | |
| 32 | - width: 100%; | |
| 33 | -} | |
| 34 | - | |
| 35 | -.button { | |
| 36 | - background-color:#4CAF50; | |
| 37 | - border-radius:3px; | |
| 38 | - color:#ffffff; | |
| 39 | - display:inline-block; | |
| 40 | - font-family:sans-serif; | |
| 41 | - font-size:13px; | |
| 42 | - font-weight:bold; | |
| 43 | - line-height: 150%; | |
| 44 | - text-align:center; | |
| 45 | - text-decoration:none; | |
| 46 | - -webkit-text-size-adjust:none; | |
| 47 | - padding: 8px 20px; | |
| 48 | -} | |
| 49 | - | |
| 50 | -.button.sm { | |
| 51 | - padding: 5px 10px; | |
| 52 | -} | |
| 53 | - | |
| 54 | -.button.green { | |
| 55 | - background-color: #4CAF50; | |
| 56 | -} | |
| 57 | - | |
| 58 | -.button.orange { | |
| 59 | - background-color: #FF9800; | |
| 60 | -} | |
| 61 | - | |
| 62 | -.button.blue { | |
| 63 | - background-color: #2196F3; | |
| 64 | -} | |
| 65 | - | |
| 66 | -#template_container { | |
| 67 | - background-color: <?php echo esc_attr( $body ); ?>; | |
| 68 | - border: 1px solid #eee; | |
| 69 | - margin-bottom: 25px; | |
| 70 | -} | |
| 71 | - | |
| 72 | -#template_header { | |
| 73 | - color: #444; | |
| 74 | - border-bottom: 0; | |
| 75 | - font-weight: bold; | |
| 76 | - line-height: 100%; | |
| 77 | - vertical-align: middle; | |
| 78 | - font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 79 | -} | |
| 80 | - | |
| 81 | -#template_footer td { | |
| 82 | - padding: 0; | |
| 83 | -} | |
| 84 | - | |
| 85 | -#template_footer #credit { | |
| 86 | - border:0; | |
| 87 | - color: #999; | |
| 88 | - font-family: Arial; | |
| 89 | - font-size:12px; | |
| 90 | - line-height:125%; | |
| 91 | - text-align:center; | |
| 92 | - padding: 0 48px 48px 48px; | |
| 93 | -} | |
| 94 | - | |
| 95 | -#body_content { | |
| 96 | - background-color: <?php echo esc_attr( $body ); ?>; | |
| 97 | -} | |
| 98 | - | |
| 99 | -#body_content table td { | |
| 100 | - padding: 20px 20px; | |
| 101 | -} | |
| 102 | - | |
| 103 | -#body_content table td td { | |
| 104 | - padding: 12px; | |
| 105 | -} | |
| 106 | - | |
| 107 | -#body_content table td th { | |
| 108 | - padding: 12px; | |
| 109 | -} | |
| 110 | - | |
| 111 | -#body_content p { | |
| 112 | - margin: 0 0 20px; | |
| 113 | -} | |
| 114 | - | |
| 115 | -#body_content_inner { | |
| 116 | - color: <?php echo esc_attr( $text_lighter_20 ); ?>; | |
| 117 | - font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 118 | - font-size: 14px; | |
| 119 | - line-height: 170%; | |
| 120 | - text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 121 | -} | |
| 122 | - | |
| 123 | -.td { | |
| 124 | - color: <?php echo esc_attr( $text_lighter_20 ); ?>; | |
| 125 | - border: none; | |
| 126 | -} | |
| 127 | - | |
| 128 | -.text { | |
| 129 | - color: <?php echo esc_attr( $text ); ?>; | |
| 130 | - font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 131 | -} | |
| 132 | - | |
| 133 | -#body_content_inner tr.field-label th { | |
| 134 | - padding: 6px 12px; | |
| 135 | - background-color: #f8f8f8; | |
| 136 | -} | |
| 137 | - | |
| 138 | -#body_content_inner tr.field-value td { | |
| 139 | - padding: 6px 12px 12px 12px; | |
| 140 | -} | |
| 141 | - | |
| 142 | -.link { | |
| 143 | - color: <?php echo esc_attr( $base ); ?>; | |
| 144 | -} | |
| 145 | - | |
| 146 | -#header_wrapper { | |
| 147 | - padding: 36px 48px 0; | |
| 148 | - display: block; | |
| 149 | -} | |
| 150 | - | |
| 151 | -h1 { | |
| 152 | - font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 153 | - font-size: 30px; | |
| 154 | - font-weight: 300; | |
| 155 | - line-height: 150%; | |
| 156 | - margin: 0; | |
| 157 | - text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 158 | - -webkit-font-smoothing: antialiased; | |
| 159 | -} | |
| 160 | - | |
| 161 | -h2 { | |
| 162 | - color: <?php echo esc_attr( $base ); ?>; | |
| 163 | - display: block; | |
| 164 | - font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 165 | - font-size: 18px; | |
| 166 | - font-weight: bold; | |
| 167 | - line-height: 130%; | |
| 168 | - margin: .5em 0; | |
| 169 | - text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 170 | -} | |
| 171 | - | |
| 172 | -h3 { | |
| 173 | - color: <?php echo esc_attr( $base ); ?>; | |
| 174 | - display: block; | |
| 175 | - font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 176 | - font-size: 16px; | |
| 177 | - font-weight: bold; | |
| 178 | - line-height: 130%; | |
| 179 | - margin: .5em 0; | |
| 180 | - text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 181 | -} | |
| 182 | - | |
| 183 | -#body_content_inner h1 { | |
| 184 | - margin: 0 0 .5em 0; | |
| 185 | -} | |
| 186 | - | |
| 187 | -#body_content_inner p + h1, | |
| 188 | -#body_content_inner p + h2, | |
| 189 | -#body_content_inner p + h3, | |
| 190 | -#body_content_inner p + h4 { | |
| 191 | - margin-top: 2em; | |
| 192 | -} | |
| 193 | - | |
| 194 | -a { | |
| 195 | - color: <?php echo esc_attr( $base ); ?>; | |
| 196 | - font-weight: normal; | |
| 197 | - text-decoration: underline; | |
| 198 | -} | |
| 199 | - | |
| 200 | -img { | |
| 201 | - border: none; | |
| 202 | - display: inline; | |
| 203 | - font-size: 14px; | |
| 204 | - font-weight: bold; | |
| 205 | - height: auto; | |
| 206 | - line-height: 100%; | |
| 207 | - outline: none; | |
| 208 | - text-decoration: none; | |
| 209 | - text-transform: capitalize; | |
| 210 | -} | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Email Styles | |
| 4 | + */ | |
| 5 | + | |
| 6 | +if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| 7 | + | |
| 8 | +$settings = weforms_get_settings( 'email_settings', array( | |
| 9 | + 'background_color' => '#f5f5f5', | |
| 10 | + 'body_background_color' => '#ffffff', | |
| 11 | + 'base_color' => '#444444', | |
| 12 | + 'text_color' => '#444444' | |
| 13 | +) ); | |
| 14 | + | |
| 15 | +// Load colours | |
| 16 | +$bg = $settings['background_color']; | |
| 17 | +$body = $settings['body_background_color']; | |
| 18 | +$base = $settings['base_color']; | |
| 19 | +$base_text = '#202020'; | |
| 20 | +$text = $settings['text_color']; | |
| 21 | + | |
| 22 | +$text_lighter_20 = '#555555'; | |
| 23 | + | |
| 24 | +// !important; is a gmail hack to prevent styles being stripped if it doesn't like something. | |
| 25 | +?> | |
| 26 | +#wrapper { | |
| 27 | + background-color: <?php echo esc_attr( $bg ); ?>; | |
| 28 | + margin: 0; | |
| 29 | + padding: 40px 0 0 0; | |
| 30 | + -webkit-text-size-adjust: none !important; | |
| 31 | + width: 100%; | |
| 32 | +} | |
| 33 | + | |
| 34 | +.button { | |
| 35 | + background-color:#4CAF50; | |
| 36 | + border-radius:3px; | |
| 37 | + color:#ffffff; | |
| 38 | + display:inline-block; | |
| 39 | + font-family:sans-serif; | |
| 40 | + font-size:13px; | |
| 41 | + font-weight:bold; | |
| 42 | + line-height: 150%; | |
| 43 | + text-align:center; | |
| 44 | + text-decoration:none; | |
| 45 | + -webkit-text-size-adjust:none; | |
| 46 | + padding: 8px 20px; | |
| 47 | +} | |
| 48 | + | |
| 49 | +.button.sm { | |
| 50 | + padding: 5px 10px; | |
| 51 | +} | |
| 52 | + | |
| 53 | +.button.green { | |
| 54 | + background-color: #4CAF50; | |
| 55 | +} | |
| 56 | + | |
| 57 | +.button.orange { | |
| 58 | + background-color: #FF9800; | |
| 59 | +} | |
| 60 | + | |
| 61 | +.button.blue { | |
| 62 | + background-color: #2196F3; | |
| 63 | +} | |
| 64 | + | |
| 65 | +#template_container { | |
| 66 | + background-color: <?php echo esc_attr( $body ); ?>; | |
| 67 | + border: 1px solid #eee; | |
| 68 | + margin-bottom: 25px; | |
| 69 | +} | |
| 70 | + | |
| 71 | +#template_header { | |
| 72 | + color: #444; | |
| 73 | + border-bottom: 0; | |
| 74 | + font-weight: bold; | |
| 75 | + line-height: 100%; | |
| 76 | + vertical-align: middle; | |
| 77 | + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 78 | +} | |
| 79 | + | |
| 80 | +#template_footer td { | |
| 81 | + padding: 0; | |
| 82 | +} | |
| 83 | + | |
| 84 | +#template_footer #credit { | |
| 85 | + border:0; | |
| 86 | + color: #999; | |
| 87 | + font-family: Arial; | |
| 88 | + font-size:12px; | |
| 89 | + line-height:125%; | |
| 90 | + text-align:center; | |
| 91 | + padding: 0 48px 48px 48px; | |
| 92 | +} | |
| 93 | + | |
| 94 | +#body_content { | |
| 95 | + background-color: <?php echo esc_attr( $body ); ?>; | |
| 96 | +} | |
| 97 | + | |
| 98 | +#body_content table td { | |
| 99 | + padding: 20px 20px; | |
| 100 | +} | |
| 101 | + | |
| 102 | +#body_content table td td { | |
| 103 | + padding: 12px; | |
| 104 | +} | |
| 105 | + | |
| 106 | +#body_content table td th { | |
| 107 | + padding: 12px; | |
| 108 | +} | |
| 109 | + | |
| 110 | +#body_content p { | |
| 111 | + margin: 0 0 20px; | |
| 112 | +} | |
| 113 | + | |
| 114 | +#body_content_inner { | |
| 115 | + color: <?php echo esc_attr( $text_lighter_20 ); ?>; | |
| 116 | + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 117 | + font-size: 14px; | |
| 118 | + line-height: 170%; | |
| 119 | + text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 120 | +} | |
| 121 | + | |
| 122 | +.td { | |
| 123 | + color: <?php echo esc_attr( $text_lighter_20 ); ?>; | |
| 124 | + border: none; | |
| 125 | +} | |
| 126 | + | |
| 127 | +.text { | |
| 128 | + color: <?php echo esc_attr( $text ); ?>; | |
| 129 | + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 130 | +} | |
| 131 | + | |
| 132 | +#body_content_inner tr.field-label th { | |
| 133 | + padding: 6px 12px; | |
| 134 | + background-color: #f8f8f8; | |
| 135 | +} | |
| 136 | + | |
| 137 | +#body_content_inner tr.field-value td { | |
| 138 | + padding: 6px 12px 12px 12px; | |
| 139 | +} | |
| 140 | + | |
| 141 | +.link { | |
| 142 | + color: <?php echo esc_attr( $base ); ?>; | |
| 143 | +} | |
| 144 | + | |
| 145 | +#header_wrapper { | |
| 146 | + padding: 36px 48px 0; | |
| 147 | + display: block; | |
| 148 | +} | |
| 149 | + | |
| 150 | +h1 { | |
| 151 | + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 152 | + font-size: 30px; | |
| 153 | + font-weight: 300; | |
| 154 | + line-height: 150%; | |
| 155 | + margin: 0; | |
| 156 | + text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 157 | + -webkit-font-smoothing: antialiased; | |
| 158 | +} | |
| 159 | + | |
| 160 | +h2 { | |
| 161 | + color: <?php echo esc_attr( $base ); ?>; | |
| 162 | + display: block; | |
| 163 | + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 164 | + font-size: 18px; | |
| 165 | + font-weight: bold; | |
| 166 | + line-height: 130%; | |
| 167 | + margin: .5em 0; | |
| 168 | + text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 169 | +} | |
| 170 | + | |
| 171 | +h3 { | |
| 172 | + color: <?php echo esc_attr( $base ); ?>; | |
| 173 | + display: block; | |
| 174 | + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | |
| 175 | + font-size: 16px; | |
| 176 | + font-weight: bold; | |
| 177 | + line-height: 130%; | |
| 178 | + margin: .5em 0; | |
| 179 | + text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; | |
| 180 | +} | |
| 181 | + | |
| 182 | +#body_content_inner h1 { | |
| 183 | + margin: 0 0 .5em 0; | |
| 184 | +} | |
| 185 | + | |
| 186 | +#body_content_inner p + h1, | |
| 187 | +#body_content_inner p + h2, | |
| 188 | +#body_content_inner p + h3, | |
| 189 | +#body_content_inner p + h4 { | |
| 190 | + margin-top: 2em; | |
| 191 | +} | |
| 192 | + | |
| 193 | +a { | |
| 194 | + color: <?php echo esc_attr( $base ); ?>; | |
| 195 | + font-weight: normal; | |
| 196 | + text-decoration: underline; | |
| 197 | +} | |
| 198 | + | |
| 199 | +img { | |
| 200 | + border: none; | |
| 201 | + display: inline; | |
| 202 | + font-size: 14px; | |
| 203 | + font-weight: bold; | |
| 204 | + height: auto; | |
| 205 | + line-height: 100%; | |
| 206 | + outline: none; | |
| 207 | + text-decoration: none; | |
| 208 | + text-transform: capitalize; | |
| 209 | +} | |