mirror of
https://git.victorphan.net/basketballcantho/Teedy_custom.git
synced 2026-08-05 22:03:11 +07:00
#79: Resource to generate a dynamic CSS
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.sismics.docs.rest.resource;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
/**
|
||||
* Theme REST resources.
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
@Path("/theme")
|
||||
public class ThemeResource extends BaseResource {
|
||||
/**
|
||||
* Returns custom CSS stylesheet.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
@GET
|
||||
@Path("/stylesheet")
|
||||
@Produces("text/css")
|
||||
public Response stylesheet() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("body {\n");
|
||||
sb.append("}");
|
||||
return Response.ok().entity(sb.toString()).build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user