plain
6 years ago
admin-expiring-job.php
6 years ago
admin-new-job.php
6 years ago
admin-updated-job.php
6 years ago
email-footer.php
2 years ago
email-header.php
2 years ago
email-job-details.php
7 years ago
email-styles.php
2 years ago
employer-expiring-job.php
6 years ago
email-styles.php
196 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email stylesheet. |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/job_manager/emails/email-styles.php. |
| 6 | * |
| 7 | * @see https://wpjobmanager.com/document/template-overrides/ |
| 8 | * @author Automattic |
| 9 | * @package wp-job-manager |
| 10 | * @category Template |
| 11 | * @version 1.31.0 |
| 12 | */ |
| 13 | |
| 14 | if ( ! defined( 'ABSPATH' ) ) { |
| 15 | exit; // Exit if accessed directly. |
| 16 | } |
| 17 | |
| 18 | $style_vars = []; |
| 19 | $style_vars['color_bg'] = '#FFF'; |
| 20 | $style_vars['color_fg'] = '#000'; |
| 21 | $style_vars['color_light'] = '#F6F7F7'; |
| 22 | $style_vars['color_stroke'] = '#E6E6E6'; |
| 23 | $style_vars['color_link'] = '#0453EB'; |
| 24 | $style_vars['color_button'] = $style_vars['color_link']; |
| 25 | $style_vars['color_button_text'] = '#FFF'; |
| 26 | $style_vars['font_family'] = '-apple-system, "SF Pro Text", BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif'; |
| 27 | |
| 28 | /** |
| 29 | * Change the style vars used in email generation stylesheet. |
| 30 | * |
| 31 | * @since 1.31.0 |
| 32 | * |
| 33 | * @param array $style_vars Variables used in style generation. |
| 34 | */ |
| 35 | $style_vars = apply_filters( 'job_manager_email_style_vars', $style_vars ); |
| 36 | |
| 37 | /** |
| 38 | * Inject styles before the core styles. |
| 39 | * |
| 40 | * @since 1.31.0 |
| 41 | * |
| 42 | * @param array $style_vars Variables used in style generation. |
| 43 | */ |
| 44 | do_action( 'job_manager_email_style_before', $style_vars ); |
| 45 | |
| 46 | $color_bg = esc_attr( $style_vars['color_bg'] ); |
| 47 | $color_fg = esc_attr( $style_vars['color_fg'] ); |
| 48 | $color_light = esc_attr( $style_vars['color_light'] ); |
| 49 | $color_stroke = esc_attr( $style_vars['color_stroke'] ); |
| 50 | $color_link = esc_attr( $style_vars['color_link'] ); |
| 51 | $color_button = esc_attr( $style_vars['color_button'] ); |
| 52 | $color_button_text = esc_attr( $style_vars['color_button_text'] ); |
| 53 | $font_family = wp_strip_all_tags( $style_vars['font_family'] ); |
| 54 | |
| 55 | echo <<<CSS |
| 56 | |
| 57 | body { |
| 58 | padding: 0; |
| 59 | margin: 0; |
| 60 | } |
| 61 | |
| 62 | #wrapper { |
| 63 | background-color: {$color_light}; |
| 64 | color: {$color_fg}; |
| 65 | margin: 0; |
| 66 | padding: 0; |
| 67 | font-size: initial; |
| 68 | font-family: {$font_family}; |
| 69 | } |
| 70 | |
| 71 | .content-wrap { |
| 72 | max-width: 600px; |
| 73 | padding: 32px 12px; |
| 74 | background: {$color_bg}; |
| 75 | border-radius: 2px; |
| 76 | line-height: 150%; |
| 77 | word-wrap: break-word; |
| 78 | margin: 0 auto; |
| 79 | } |
| 80 | |
| 81 | p { |
| 82 | margin: 12px 0; |
| 83 | } |
| 84 | |
| 85 | a { |
| 86 | color: {$color_link}; |
| 87 | text-decoration: underline; |
| 88 | } |
| 89 | |
| 90 | a:hover { |
| 91 | color: inherit !important; |
| 92 | } |
| 93 | |
| 94 | .button-single { |
| 95 | margin: 24px 0; |
| 96 | text-align: center; |
| 97 | padding: 12px 24px; |
| 98 | background: {$color_button}; |
| 99 | color: {$color_button_text}; |
| 100 | cursor: pointer; |
| 101 | font-style: normal; |
| 102 | font-weight: 600; |
| 103 | line-height: 180%; |
| 104 | text-decoration: unset; |
| 105 | display: block; |
| 106 | border-radius: 2px; |
| 107 | } |
| 108 | |
| 109 | .button-single:hover { |
| 110 | background: {$color_fg}; |
| 111 | color: {$color_bg}; |
| 112 | } |
| 113 | |
| 114 | .box { |
| 115 | border: 1px solid {$color_stroke}; |
| 116 | padding: 24px; |
| 117 | margin: 24px 0; |
| 118 | } |
| 119 | |
| 120 | .footer { |
| 121 | margin: 24px 0; |
| 122 | } |
| 123 | |
| 124 | .small-separator { |
| 125 | margin: 24px 0; |
| 126 | width: 80px; |
| 127 | height: 1px; |
| 128 | background: {$color_light}; |
| 129 | } |
| 130 | |
| 131 | .actions { |
| 132 | margin: 24px 0; |
| 133 | text-align: center; |
| 134 | padding: 18px 24px; |
| 135 | background: {$color_light}; |
| 136 | } |
| 137 | |
| 138 | .action { |
| 139 | color: {$color_link}; |
| 140 | text-decoration: underline; |
| 141 | } |
| 142 | |
| 143 | .footer__content { |
| 144 | margin: 24px 0; |
| 145 | font-size: 87.5%; |
| 146 | } |
| 147 | |
| 148 | |
| 149 | .email-container { |
| 150 | margin-bottom: 10px; |
| 151 | } |
| 152 | |
| 153 | td.detail-label, |
| 154 | td.detail-value { |
| 155 | vertical-align: middle; |
| 156 | border: 1px solid {$color_light}; |
| 157 | } |
| 158 | |
| 159 | td.detail-label { |
| 160 | word-wrap: break-word; |
| 161 | width: 40%; |
| 162 | } |
| 163 | |
| 164 | |
| 165 | @media screen and (min-width: 600px) { |
| 166 | .email-wrap { |
| 167 | padding: 24px !important; |
| 168 | } |
| 169 | |
| 170 | .content-wrap { |
| 171 | padding: 48px 32px !important; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | @media screen and (max-width: 325px) { |
| 176 | .actions .action { |
| 177 | display: block !important; |
| 178 | line-height: 32px; |
| 179 | } |
| 180 | |
| 181 | .actions .action-separator { |
| 182 | display: none !important; |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | CSS; |
| 187 | |
| 188 | /** |
| 189 | * Inject styles after the core styles. |
| 190 | * |
| 191 | * @since 1.31.0 |
| 192 | * |
| 193 | * @param array $style_vars Variables used in style generation. |
| 194 | */ |
| 195 | do_action( 'job_manager_email_style_after', $style_vars ); |
| 196 |