improved css

This commit is contained in:
Stephan Richter
2020-09-12 23:34:44 +02:00
parent 316ee45dd3
commit 1a3a14762a
3 changed files with 51 additions and 28 deletions

View File

@@ -68,25 +68,18 @@ public class Plan {
private Tag menu() throws IOException {
Tag menu = new Tag("div").clazz("menu");
Tag tileMenu = new Tag("div").clazz("tile").content("Add tile");
StringBuffer tiles = new StringBuffer();
tiles.append(new StraightH().html());
tiles.append(new StraightV().html());
tiles.append(new DiagES().html());
tiles.append(new DiagSW().html());
tiles.append(new DiagNE().html());
tiles.append(new DiagWN().html());
tiles.append(new EndE().html());
tiles.append(new EndW().html());
tiles.append(new TurnoutSE().html());
tiles.append(new TurnoutWS().html());
tiles.append(new TurnoutSW().html());
new Tag("div").clazz("list").content(tiles.toString()).addTo(tileMenu).addTo(menu);
tileMenu().addTo(menu);
actionMenu().addTo(menu);
return menu;
}
private Tag actionMenu() {
Tag menu = new Tag("div").clazz("actions").content("Actions");
return menu;
}
public String process(HashMap<String, String> params) {
try {
String mode = params.get(MODE);
@@ -120,4 +113,22 @@ public class Plan {
private String t(String message, Object...fills) {
return Translation.get(Application.class, message, fills);
}
private Tag tileMenu() throws IOException {
Tag tileMenu = new Tag("div").clazz("addtile").content("Add tile");
StringBuffer tiles = new StringBuffer();
tiles.append(new StraightH().html());
tiles.append(new StraightV().html());
tiles.append(new DiagES().html());
tiles.append(new DiagSW().html());
tiles.append(new DiagNE().html());
tiles.append(new DiagWN().html());
tiles.append(new EndE().html());
tiles.append(new EndW().html());
tiles.append(new TurnoutSE().html());
tiles.append(new TurnoutWS().html());
tiles.append(new TurnoutSW().html());
return new Tag("div").clazz("list").content(tiles.toString()).addTo(tileMenu);
}
}