Commits

Anonymous committed a2377d8

Base skin selection on configuration

Comments (0)

Files changed (2)

chempound-webapp/src/main/java/net/chempound/webapp/GlobalData.java

     private final TripleStore tripleStore;
     private final URI baseUri;
     private final String version = "0.2";
+    private final String skinName = "default";
+    private final String skinFile = "default.ftl";
 
     private final ConfigurationProperties data = new ConfigurationProperties();
 
         return data;
     }
 
+    public String getSkinName() {
+        return skinName;
+    }
+
+    public String getSkinFile() {
+        return skinFile;
+    }
 }

chempound-webapp/src/main/resources/net/chempound/templates/include/layout.ftl

 title="Chempound Repository"
 >
 <#local content><#nested/></#local>
-<#include "/skins/default/default.ftl"/>
+<#include "/skins/${@.skinName}/${@.skinFile}"/>
 </#macro>