* Restructuring to a Maven multi-module project. - Renamed directories to match artifact ids. - Added parent POM. - Added developers to parent POM. - Added dependency management and plugin management. No expectation that the build or release process is fully functional. - Extracted versions into properties like other projects. * Fixed file paths for workflow and documentation. - Added junit to j2html-codegen module. * Temporarily setting packaging for j2html-codegen to pom, to allow workflow to complete. * Removed copied configuration of maven-jar-plugin from parent POM. * Integrating code generation into the main build process. - j2html-codegen is now supplying a Maven plugin that can read a model file and generate corresponding attribute and tag classes as part of the project build. - j2html classes that would conflict with the generated classes have been removed. * Targeting LTS versions only. - JDK 9 & 10 support ended in 2018
34 lines
828 B
Java
34 lines
828 B
Java
public class MainView {
|
|
public static String render(String pageTitle, Tag... tags) {
|
|
return document(
|
|
html(
|
|
head(
|
|
title(pageTitle)
|
|
),
|
|
body(
|
|
header(
|
|
...
|
|
),
|
|
main(
|
|
tags //the view from the partials example
|
|
),
|
|
footer(
|
|
...
|
|
)
|
|
)
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|
|
MainView.render(
|
|
"Signup page",
|
|
h1("Please sign up"),
|
|
form().withMethod("post").with(
|
|
emailInput("Email address"),
|
|
choosePasswordInput("Choose Password"),
|
|
repeatPasswordInput("Repeat Password"),
|
|
submitButton("Sign up")
|
|
)
|
|
);
|