Boson.php
185 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePress\Core\Themes\Shortcode\Registration; |
| 4 | |
| 5 | use ProfilePress\Core\Themes\Shortcode\RegistrationThemeInterface; |
| 6 | |
| 7 | class Boson implements RegistrationThemeInterface |
| 8 | { |
| 9 | public function get_name() |
| 10 | { |
| 11 | return 'Boson'; |
| 12 | } |
| 13 | |
| 14 | public function success_message() |
| 15 | { |
| 16 | return '<div class="profilepress-reg-status">Registration Successful</div>'; |
| 17 | } |
| 18 | |
| 19 | public function get_structure() |
| 20 | { |
| 21 | return <<<CODE |
| 22 | <div class="boson-container"> |
| 23 | <div class="login"> |
| 24 | <h1>Sign Up</h1> |
| 25 | |
| 26 | <p>[reg-username placeholder="Username"]</p> |
| 27 | |
| 28 | <p>[reg-password placeholder="Password"]</p> |
| 29 | |
| 30 | <p>[reg-email placeholder="Email"]</p> |
| 31 | |
| 32 | <p>[reg-website placeholder="Website" required]</p> |
| 33 | |
| 34 | <p>[reg-nickname placeholder="Nickname"]</p> |
| 35 | |
| 36 | <p>[reg-first-name placeholder="First Name" required]</p> |
| 37 | |
| 38 | <p>[reg-last-name placeholder="Last Name" required]</p> |
| 39 | |
| 40 | <p class="submit">[reg-submit value="Register"]</p> |
| 41 | |
| 42 | <p style="text-align:center">Have an account? [link-login label="Login"]</p> |
| 43 | </div> |
| 44 | </div> |
| 45 | CODE; |
| 46 | |
| 47 | } |
| 48 | |
| 49 | public function get_css() |
| 50 | { |
| 51 | return <<<CSS |
| 52 | /* css class for the form generated errors */ |
| 53 | .profilepress-reg-status { |
| 54 | color: #555; |
| 55 | font-size: 15px; |
| 56 | font-weight: bold; |
| 57 | margin: 10px 0; |
| 58 | max-width: 350px; |
| 59 | width: 100%; |
| 60 | box-sizing: border-box; |
| 61 | text-align: center; |
| 62 | } |
| 63 | |
| 64 | /* Boson Registration form CSS */ |
| 65 | |
| 66 | .boson-container { |
| 67 | box-sizing: border-box; |
| 68 | max-width: 350px; |
| 69 | width: 100%; |
| 70 | } |
| 71 | .boson-container a { |
| 72 | color: #527881; |
| 73 | text-decoration: underline; |
| 74 | text-align: center; |
| 75 | } |
| 76 | .boson-container > .login { |
| 77 | position: relative; |
| 78 | padding: 20px 20px 20px; |
| 79 | box-sizing: border-box; |
| 80 | max-width: 350px; |
| 81 | width: 100%; |
| 82 | background: white; |
| 83 | border-radius: 3px; |
| 84 | -webkit-box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3); |
| 85 | box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3); |
| 86 | } |
| 87 | |
| 88 | .boson-container > .login h1 { |
| 89 | margin: -20px -20px 21px; |
| 90 | line-height: 40px; |
| 91 | font-size: 15px; |
| 92 | font-weight: bold; |
| 93 | color: #555; |
| 94 | text-align: center; |
| 95 | text-shadow: 0 1px white; |
| 96 | background: #f3f3f3; |
| 97 | border-bottom: 1px solid #cfcfcf; |
| 98 | border-radius: 3px 3px 0 0; |
| 99 | background-image: -webkit-linear-gradient(top, whiteffd, #eef2f5); |
| 100 | background-image: -moz-linear-gradient(top, whiteffd, #eef2f5); |
| 101 | background-image: -o-linear-gradient(top, whiteffd, #eef2f5); |
| 102 | background-image: linear-gradient(to bottom, whiteffd, #eef2f5); |
| 103 | -webkit-box-shadow: 0 1px whitesmoke; |
| 104 | box-shadow: 0 1px whitesmoke; |
| 105 | } |
| 106 | .boson-container > .login p { |
| 107 | margin: 10px 0; |
| 108 | font-size: 16px; |
| 109 | color: #555; |
| 110 | } |
| 111 | .boson-container > .login input[type=text], .boson-container > .login input[type=email], .boson-container > .login input[type=password], .boson-container > .login select { |
| 112 | width: 100%; |
| 113 | -webkit-box-sizing: border-box; |
| 114 | -moz-box-sizing: border-box; |
| 115 | box-sizing: border-box; |
| 116 | } |
| 117 | .boson-container > .login p.remember_me { |
| 118 | float: left; |
| 119 | line-height: 31px; |
| 120 | } |
| 121 | .boson-container > .login p.submit { |
| 122 | text-align: center; |
| 123 | } |
| 124 | :-moz-placeholder { |
| 125 | color: #c9c9c9 !important; |
| 126 | font-size: 13px; |
| 127 | } |
| 128 | ::-webkit-input-placeholder { |
| 129 | color: #ccc; |
| 130 | font-size: 13px; |
| 131 | } |
| 132 | .boson-container > .login input[type=text], .boson-container > .login input[type=email], .boson-container > .login input[type=password], .boson-container > .login select { |
| 133 | margin: 5px; |
| 134 | padding: 0 10px; |
| 135 | height: 34px; |
| 136 | color: #404040; |
| 137 | background: white; |
| 138 | border: 1px solid; |
| 139 | border-color: #c4c4c4 #d1d1d1 #d4d4d4; |
| 140 | border-radius: 2px; |
| 141 | outline: 5px solid #eff4f7; |
| 142 | -moz-outline-radius: 3px; |
| 143 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12); |
| 144 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12); |
| 145 | } |
| 146 | .boson-container > .login input[type=text]:focus, .boson-container > .login input[type=email]:focus, .boson-container > .login select:focus, .boson-container > .login input[type=password]:focus { |
| 147 | border-color: #7dc9e2; |
| 148 | outline-color: #dceefc; |
| 149 | outline-offset: 0; |
| 150 | } |
| 151 | .boson-container > .login input[type=submit] { |
| 152 | cursor: pointer; |
| 153 | padding: 1px 18px; |
| 154 | height: 29px; |
| 155 | width: 80%; |
| 156 | font-size: 12px; |
| 157 | font-weight: bold; |
| 158 | color: #527881; |
| 159 | text-shadow: 0 1px #e3f1f1; |
| 160 | background: #cde5ef; |
| 161 | border: 1px solid; |
| 162 | border-color: #b4ccce #b3c0c8 #9eb9c2; |
| 163 | border-radius: 16px; |
| 164 | outline: 0; |
| 165 | -webkit-box-sizing: content-box; |
| 166 | -moz-box-sizing: content-box; |
| 167 | box-sizing: content-box; |
| 168 | background-image: -webkit-linear-gradient(top, #edf5f8, #cde5ef); |
| 169 | background-image: -moz-linear-gradient(top, #edf5f8, #cde5ef); |
| 170 | background-image: -o-linear-gradient(top, #edf5f8, #cde5ef); |
| 171 | background-image: linear-gradient(to bottom, #edf5f8, #cde5ef); |
| 172 | -webkit-box-shadow: inset 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.15); |
| 173 | box-shadow: inset 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.15); |
| 174 | } |
| 175 | .boson-container > .login input[type=submit]:active { |
| 176 | background: #cde5ef; |
| 177 | border-color: #9eb9c2 #b3c0c8 #b4ccce; |
| 178 | -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2); |
| 179 | box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2); |
| 180 | } |
| 181 | |
| 182 | CSS; |
| 183 | |
| 184 | } |
| 185 | } |