-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
@import "styles/tooltip"; | ||
@import "styles/forms"; | ||
@import "styles/responsive"; | ||
|
||
body:after { | ||
position: fixed; | ||
width: 109px; | ||
height: 28px; | ||
top: 15px; | ||
right: -25px; | ||
text-align: center; | ||
font-size: 16px; | ||
font-family: sans-serif; | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
color: white; | ||
line-height: 30px; | ||
transform: rotate(45deg); | ||
} | ||
|
||
|
33 changes: 33 additions & 0 deletions
33
server/src/main/java/access/api/EnvironmentController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package access.api; | ||
|
||
import jakarta.servlet.http.HttpServletResponse; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.util.StringUtils; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.io.IOException; | ||
|
||
@RestController | ||
public class EnvironmentController { | ||
|
||
|
||
private final String disclaimerBackgroundColor; | ||
private final String disclaimerContent; | ||
|
||
public EnvironmentController(@Value("${gui.disclaimer.background-color}") String disclaimerBackgroundColor, | ||
@Value("${gui.disclaimer.content}") String disclaimerContent) { | ||
this.disclaimerBackgroundColor = disclaimerBackgroundColor; | ||
this.disclaimerContent = disclaimerContent; | ||
} | ||
|
||
@GetMapping("/api/v1/disclaimer") | ||
public void disclaimer(HttpServletResponse response) throws IOException { | ||
response.setContentType("text/css"); | ||
response.getWriter().write("body::after {background: " + disclaimerBackgroundColor + ";content: \"" + | ||
disclaimerContent + "\";}"); | ||
response.getWriter().flush(); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters