Basic setup for EE MVC in ccm-cms
parent
3a33be81bb
commit
87b688ddf4
|
|
@ -240,6 +240,14 @@
|
||||||
<include>WEB-INF/</include>
|
<include>WEB-INF/</include>
|
||||||
</includes>
|
</includes>
|
||||||
</overlay>
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<includes>
|
||||||
|
<include>assets/</include>
|
||||||
|
</includes>
|
||||||
|
</overlay>
|
||||||
<overlay>
|
<overlay>
|
||||||
<groupId>org.librecms</groupId>
|
<groupId>org.librecms</groupId>
|
||||||
<artifactId>ccm-cms</artifactId>
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"name": "ccm-cms",
|
||||||
|
"version": "7.0.0",
|
||||||
|
"description": "JavaScript stuff for ccm-cms",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "npm-run-all build:*:*",
|
||||||
|
"build:ccm-admin:js": "parcel build --out-dir target/generated-resources/assets/@content-sections src/main/typescript/content-sections/cms-admin.ts",
|
||||||
|
"build:ccm-admin:css": "sass src/main/scss/content-sections/cms-admin.scss target/generated-resources/assets/@content-sections/cms-admin.css"
|
||||||
|
},
|
||||||
|
"author": "Jens Pelzetter",
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"devDependencies": {
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
|
"parcel-bundler": "^1.12.4",
|
||||||
|
"sass": "^1.26.10",
|
||||||
|
"typescript": "^4.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"bootstrap": "^4.5.2",
|
||||||
|
"bootstrap-icons": "^1.0.0",
|
||||||
|
"jquery": "^3.5.1",
|
||||||
|
"popper.js": "^1.16.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -177,6 +177,9 @@
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>./target/generated-resources</directory>
|
||||||
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<testResources>
|
<testResources>
|
||||||
|
|
@ -201,6 +204,40 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.eirslett</groupId>
|
||||||
|
<artifactId>frontend-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<installDirectory>../node</installDirectory>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Install node.js and NPM</id>
|
||||||
|
<goals>
|
||||||
|
<goal>install-node-and-npm</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<nodeVersion>v14.15.4</nodeVersion>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm install</id>
|
||||||
|
<goals>
|
||||||
|
<goal>npm</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>build</id>
|
||||||
|
<goals>
|
||||||
|
<goal>npm</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<arguments>run build</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.librecms.ui;
|
||||||
|
|
||||||
|
import org.libreccm.ui.IsAuthenticatedFilter;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.ws.rs.ApplicationPath;
|
||||||
|
import javax.ws.rs.core.Application;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@ApplicationPath("/@content-sections")
|
||||||
|
public class CmsUi extends Application {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<Class<?>> getClasses() {
|
||||||
|
final Set<Class<?>> classes = new HashSet<>();
|
||||||
|
|
||||||
|
classes.add(IsAuthenticatedFilter.class);
|
||||||
|
classes.add(ContentSectionsController.class);
|
||||||
|
|
||||||
|
return classes;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.librecms.ui;
|
||||||
|
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
import org.librecms.CmsConstants;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Controller
|
||||||
|
@Path("/")
|
||||||
|
public class ContentSectionsController {
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/")
|
||||||
|
@AuthorizationRequired
|
||||||
|
public String getContentSections() {
|
||||||
|
return "org/librecms/ui/content-sections.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<head>
|
||||||
|
<title>#{title} - LibreCMS Content Sections</title>
|
||||||
|
<link href="#{request.contextPath}/assets/@content-sections/cms-admin.css"
|
||||||
|
rel="stylesheet"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<p><em>Content Sections Placeholder</em></p>
|
||||||
|
</main>
|
||||||
|
<script src="#{request.contextPath}/assets/@content-sections/cms-admin.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
$grid-breakpoints: (
|
||||||
|
xs: 0,
|
||||||
|
sm: 36rem,
|
||||||
|
md: 48rem,
|
||||||
|
lg: 62rem,
|
||||||
|
xl: 75rem
|
||||||
|
);
|
||||||
|
|
||||||
|
$container-max-widths: (
|
||||||
|
sm: 33.75rem,
|
||||||
|
md: 45rem,
|
||||||
|
lg: 60rem,
|
||||||
|
xl: 71.25rem
|
||||||
|
);
|
||||||
|
|
||||||
|
$grid-gutter-width: 1.875rem;
|
||||||
|
|
||||||
|
$form-grid-gutter-width: 0.625rem;
|
||||||
|
|
||||||
|
$tooltip-max-width: 12.5rem;
|
||||||
|
|
||||||
|
$popover-maxwidth: 17.25rem;
|
||||||
|
|
||||||
|
$toast-max-width: 21.875rem;
|
||||||
|
|
||||||
|
$modal-xl: 71.25rem;
|
||||||
|
$modal-lg: 50rem;
|
||||||
|
$modal-md: 31.25rem;
|
||||||
|
$modal-sm: 18.75rem;
|
||||||
|
|
||||||
|
$modal-fade-transform: translate(0, -3.125rem);
|
||||||
|
|
||||||
|
$carousel-indicator-width: 1.875rem;
|
||||||
|
$carousel-control-icon-width: 1.25rem;
|
||||||
|
|
||||||
|
$pre-scrollable-max-height: 21.25rem;
|
||||||
|
|
||||||
|
// Navbar default colors have insufficient contrast
|
||||||
|
$navbar-dark-color: #fff;
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
@import "custom";
|
||||||
|
@import "../../../../node_modules/bootstrap/scss/bootstrap";
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
import "bootstrap";
|
||||||
|
|
@ -351,7 +351,7 @@
|
||||||
<goal>install-node-and-npm</goal>
|
<goal>install-node-and-npm</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<nodeVersion>v12.18.3</nodeVersion>
|
<nodeVersion>v14.15.4</nodeVersion>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
$grid-breakpoints: (
|
$grid-breakpoints: (
|
||||||
xs: 0,
|
xs: 0,
|
||||||
sm: 36rem,
|
sm: 36rem,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue