-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af38498
commit ea57a90
Showing
19 changed files
with
676 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
ehealthid-rp/src/main/java/com/oviva/ehealthid/relyingparty/ws/ui/Pages.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.oviva.ehealthid.relyingparty.ws.ui; | ||
|
||
import com.oviva.ehealthid.fedclient.IdpEntry; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class Pages { | ||
|
||
private final TemplateRenderer renderer; | ||
|
||
public Pages(TemplateRenderer renderer) { | ||
this.renderer = renderer; | ||
} | ||
|
||
public String selectIdpForm(List<IdpEntry> identityProviders) { | ||
return renderer.render( | ||
"select-idp.html.mustache", Map.of("identityProviders", identityProviders)); | ||
} | ||
|
||
public String error(String message) { | ||
return renderer.render("error.html.mustache", Map.of("message", message)); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
ehealthid-rp/src/main/java/com/oviva/ehealthid/relyingparty/ws/ui/TemplateRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.oviva.ehealthid.relyingparty.ws.ui; | ||
|
||
import com.github.mustachejava.DefaultMustacheFactory; | ||
import com.github.mustachejava.MustacheFactory; | ||
import java.io.StringWriter; | ||
|
||
public class TemplateRenderer { | ||
|
||
private MustacheFactory mf = new DefaultMustacheFactory("www"); | ||
|
||
public TemplateRenderer() {} | ||
|
||
public TemplateRenderer(MustacheFactory mf) { | ||
this.mf = mf; | ||
} | ||
|
||
public String render(String name, Object scope) { | ||
|
||
var template = mf.compile(name); | ||
var w = new StringWriter(); | ||
template.execute(w, scope); | ||
return w.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
html body { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
font-family: Inter, sans-serif; | ||
font-style: normal; | ||
line-height: 150%; /* 36px */ | ||
letter-spacing: 0.15px; | ||
color: #000E30; | ||
background-color: #F7ECE7; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
.container { | ||
max-width: 400px; | ||
margin: 1em auto 2em; | ||
padding: 20px; | ||
border-radius: 12px; | ||
background: #FFF; | ||
} | ||
|
||
h1 { | ||
font-family: "DM Serif Text", serif; | ||
font-size: 24px; | ||
} | ||
|
||
a { | ||
color: #00645F; | ||
} | ||
|
||
@media (max-width: 500px) { | ||
.container { | ||
margin: 0 auto; | ||
border: none; | ||
} | ||
|
||
html body { | ||
background: #FFF; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{<layout.html.mustache}} | ||
{{$body}} | ||
<h1>Log in with GesundheitsID</h1> | ||
<p> | ||
{{#message}}{{message}}{{/message}} | ||
{{^message}} | ||
Oops, something unexpected happened. Please go back and try again. | ||
{{/message}} | ||
</p> | ||
{{/body}} | ||
{{/layout.html.mustache}} |
Oops, something went wrong.