File tree Expand file tree Collapse file tree 6 files changed +36
-36
lines changed Expand file tree Collapse file tree 6 files changed +36
-36
lines changed Original file line number Diff line number Diff line change 16
16
// Styles for authentication pages (login, signup, etc.)
17
17
// -------------------------------------------------------------------------
18
18
19
- .portal-page {
19
+ .portal-form-container {
20
20
height : 55vh ;
21
- padding-top : 10% ;
21
+ padding : 10% ;
22
22
}
23
23
24
24
.portal-form-inputs {
Original file line number Diff line number Diff line change @@ -2,27 +2,27 @@ import Plot
2
2
import Foundation
3
3
4
4
enum ForgotPassword {
5
-
5
+
6
6
struct Model {
7
7
var errorMessage : String = " "
8
8
}
9
-
9
+
10
10
class View : PublicPage {
11
-
11
+
12
12
let model : Model
13
-
13
+
14
14
init ( path: String , model: Model ) {
15
15
self . model = model
16
16
super. init ( path: path)
17
17
}
18
-
18
+
19
19
override func pageTitle( ) -> String ? {
20
20
" Forgot Password "
21
21
}
22
-
22
+
23
23
override func content( ) -> Node < HTML . BodyContext > {
24
24
. div(
25
- . class( " portal-page " ) ,
25
+ . class( " portal-form-container " ) ,
26
26
. h2( " An email will be sent with a reset code " ) ,
27
27
. forgotPasswordForm( ) ,
28
28
. text( model. errorMessage)
Original file line number Diff line number Diff line change @@ -2,27 +2,27 @@ import Plot
2
2
import Foundation
3
3
4
4
enum PortalPage {
5
-
5
+
6
6
struct Model {
7
7
var errorMessage : String = " "
8
8
}
9
-
9
+
10
10
class View : PublicPage {
11
-
11
+
12
12
let model : Model
13
-
13
+
14
14
init ( path: String , model: Model ) {
15
15
self . model = model
16
16
super. init ( path: path)
17
17
}
18
-
18
+
19
19
override func pageTitle( ) -> String ? {
20
20
" Portal "
21
21
}
22
-
22
+
23
23
override func content( ) -> Node < HTML . BodyContext > {
24
24
. div(
25
- . class( " portal-page " ) ,
25
+ . class( " portal-form-container " ) ,
26
26
. h2( " Portal " ) ,
27
27
. logoutButton( ) ,
28
28
. deleteButton( ) ,
@@ -45,7 +45,7 @@ extension Node where Context: HTML.BodyContext {
45
45
)
46
46
)
47
47
}
48
-
48
+
49
49
static func deleteButton( ) -> Self {
50
50
. form(
51
51
. class( " portal-form-inputs " ) ,
Original file line number Diff line number Diff line change @@ -6,23 +6,23 @@ enum Signup {
6
6
struct Model {
7
7
var errorMessage : String = " "
8
8
}
9
-
9
+
10
10
class View : PublicPage {
11
-
11
+
12
12
let model : Model
13
-
13
+
14
14
init ( path: String , model: Model ) {
15
15
self . model = model
16
16
super. init ( path: path)
17
17
}
18
-
18
+
19
19
override func pageTitle( ) -> String ? {
20
20
" Sign up "
21
21
}
22
-
22
+
23
23
override func content( ) -> Node < HTML . BodyContext > {
24
24
. div(
25
- . class( " portal-page " ) ,
25
+ . class( " portal-form-container " ) ,
26
26
. h2( " Signup " ) ,
27
27
. signupForm( ) ,
28
28
. text( model. errorMessage)
Original file line number Diff line number Diff line change @@ -6,23 +6,23 @@ enum SuccessfulChange {
6
6
struct Model {
7
7
var successMessage : String = " "
8
8
}
9
-
9
+
10
10
class View : PublicPage {
11
-
11
+
12
12
let model : Model
13
-
13
+
14
14
init ( path: String , model: Model ) {
15
15
self . model = model
16
16
super. init ( path: path)
17
17
}
18
-
18
+
19
19
override func pageTitle( ) -> String ? {
20
20
" Success "
21
21
}
22
-
22
+
23
23
override func content( ) -> Node < HTML . BodyContext > {
24
24
. div(
25
- . class( " portal-page " ) ,
25
+ . class( " portal-form-container " ) ,
26
26
. text( self . model. successMessage) ,
27
27
. loginRedirectButton( )
28
28
)
Original file line number Diff line number Diff line change @@ -2,28 +2,28 @@ import Plot
2
2
import Foundation
3
3
4
4
enum Verify {
5
-
5
+
6
6
struct Model {
7
7
var email : String
8
8
var errorMessage : String = " "
9
9
}
10
-
10
+
11
11
class View : PublicPage {
12
-
12
+
13
13
let model : Model
14
-
14
+
15
15
init ( path: String , model: Model ) {
16
16
self . model = model
17
17
super. init ( path: path)
18
18
}
19
-
19
+
20
20
override func pageTitle( ) -> String ? {
21
21
" Verify "
22
22
}
23
-
23
+
24
24
override func content( ) -> Node < HTML . BodyContext > {
25
25
. div(
26
- . class( " portal-page " ) ,
26
+ . class( " portal-form-container " ) ,
27
27
. h2( " Please enter the confirmation code sent to your email " ) ,
28
28
. verifyForm( email: model. email) ,
29
29
. text( model. errorMessage)
You can’t perform that action at this time.
0 commit comments