Initial bld bootstrap template

This commit is contained in:
Geert Bevin 2023-04-18 11:53:34 -04:00
parent 01dc74fdb0
commit 0c13c8b968
30 changed files with 647 additions and 0 deletions

View file

@ -0,0 +1,16 @@
package hello;
import rife.engine.*;
public class AppSite extends Site {
public void setup() {
var hello = get("/hello", c -> c.print(c.template("hello")));
get("/", c -> c.redirect(hello));
}
public static void main(String[] args) {
new Server()
.staticResourceBase("src/main/webapp")
.start(new AppSite());
}
}

View file

@ -0,0 +1,11 @@
package hello;
import rife.engine.Server;
public class AppSiteUber extends AppSite {
public static void main(String[] args) {
new Server()
.staticUberJarResourceBase("webapp")
.start(new AppSiteUber());
}
}

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><!--v title-->Hello App<!--/v--></title>
<link rel="stylesheet" href="{{v webapp:rootUrl/}}css/style.css?{{v context:paramRandom/}}">
</head>
<body>
<p>Hello World App</p>
</body>
</html>

View file

@ -0,0 +1,18 @@
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<filter>
<filter-name>RIFE2</filter-name>
<filter-class>rife.servlet.RifeFilter</filter-class>
<init-param>
<param-name>rifeSiteClass</param-name>
<param-value>hello.AppSite</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>RIFE2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

View file

@ -0,0 +1,21 @@
:root {
/* fonts */
--main-font: sans-serif;
/* font sizes */
--main-font-size: 18px;
/* colors */
--main-background-color: #0d0d0d;
--main-text-color: #d0d0d0;
/* margins and padding */
--content-padding: 2em;
}
body {
background: var(--main-background-color);
font-family: var(--main-font);
font-style: var(--main-font-size);
color: var(--main-text-color);
padding: var(--content-padding);
}