Add HTML rendering for sessions and card images; refactor output handling in SimpleSession
This commit is contained in:
2
knockoutwhistweb/app/views/output/card.scala.html
Normal file
2
knockoutwhistweb/app/views/output/card.scala.html
Normal file
@@ -0,0 +1,2 @@
|
||||
@(src: String)(alt: String)
|
||||
<img src="@routes.Assets.versioned(src)" alt="@alt"/>
|
||||
3
knockoutwhistweb/app/views/output/text.scala.html
Normal file
3
knockoutwhistweb/app/views/output/text.scala.html
Normal file
@@ -0,0 +1,3 @@
|
||||
@(text: String)
|
||||
<p>@text</p>
|
||||
|
||||
10
knockoutwhistweb/app/views/sessions.scala.html
Normal file
10
knockoutwhistweb/app/views/sessions.scala.html
Normal file
@@ -0,0 +1,10 @@
|
||||
@(toRender: List[String])
|
||||
|
||||
@main("Sessions") {
|
||||
<div id="sessions">
|
||||
@for(line <- toRender) {
|
||||
<a href="@routes.HomeController.ingame(line)">@line</a><br>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@(toRender: String)
|
||||
@(toRender: List[Html])
|
||||
|
||||
@main("Tui") {
|
||||
<div id="tui">
|
||||
@for(line <- toRender.split('\n')) {
|
||||
<a href="@routes.Relative.ingame(line)">@line</a>
|
||||
@for(line <- toRender) {
|
||||
@line
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user