Commit 6932a57c authored by michael.simon's avatar michael.simon
Browse files

Add more changeable header variables

parent 4b5c15f1
...@@ -20,10 +20,18 @@ public class HeadBarBean { ...@@ -20,10 +20,18 @@ public class HeadBarBean {
public ApplicationConfig getAppConfig() { public ApplicationConfig getAppConfig() {
return appConfig; return appConfig;
} }
public String getStylesheet() { public String getStylesheet() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_css", ""); return getApplicationBase() + getOrDefault(request.getServerName() + "_css", "");
} }
public String getStylesheetExtended() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_css_ext", "/resources/css/std-ext.css");
}
public String getOverrideStdStylesheet() {
return getApplicationBase() + getOrDefault(request.getServerName() + "override_std_css", "/resources/css/std.css");
}
public String getHeaderImage() { public String getHeaderImage() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_header_icon", "/resources/img/logo.svg"); return getApplicationBase() + getOrDefault(request.getServerName() + "_header_icon", "/resources/img/logo.svg");
......
...@@ -18,16 +18,16 @@ ...@@ -18,16 +18,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#009682" /> <meta name="theme-color" content="#009682" />
<meta http-equiv="cleartype" content="on" /> <meta http-equiv="cleartype" content="on" />
<title>#{title}</title> <title>#{headBarBean.headerTitle}</title>
</f:facet> </f:facet>
<link rel="stylesheet" href="https://static.scc.kit.edu/fancybox/dist/jquery.fancybox.min.css" /> <link rel="stylesheet" href="https://static.scc.kit.edu/fancybox/dist/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://static.scc.kit.edu/kit-2020/fontawesome/css/all.min.css" /> <link rel="stylesheet" href="https://static.scc.kit.edu/kit-2020/fontawesome/css/all.min.css" />
<h:outputStylesheet name="css/std.css"/> <link rel="stylesheet" href="#{headBarBean.overrideStdStylesheet}"/>
<h:outputStylesheet name="css/std-ext.css"/> <link rel="stylesheet" href="#{headBarBean.stylesheetExtended}"/>
<h:panelGroup rendered="#{not empty headBarBean.stylesheet}"> <h:panelGroup rendered="#{not empty headBarBean.stylesheet}">
<link rel="stylesheet" href="#{headBarBean.stylesheet}"/> <link rel="stylesheet" href="#{headBarBean.stylesheet}"/>
</h:panelGroup> </h:panelGroup>
<h:outputScript library="javax.faces" name="jsf.js" target="head"/> <h:outputScript library="javax.faces" name="jsf.js" target="head"/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment