Skip to content

Commit

Permalink
Merge pull request #2 from IHCC-cohorts/fix-custom-logo
Browse files Browse the repository at this point in the history
OxO custom logo issue
  • Loading branch information
matentzn authored Aug 18, 2020
2 parents 7b1d5fc + 6c045c2 commit 19e1246
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.*;


/**
* @author Simon Jupp
Expand Down Expand Up @@ -33,4 +35,11 @@ public void configurePathMatch(PathMatchConfigurer configurer) {


}

public void addResourceHandlers(ResourceHandlerRegistry registry) {
if(System.getenv("OXO_CUSTOM")!=null) {
String resource = "file:" + System.getenv("OXO_CUSTOM")+"/";
registry.addResourceHandler("/custom/**").addResourceLocations(resource);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class CustomisationProperties {
@Value("${oxo.customisation.debrand:false}")
private boolean debrand;

@Value("${oxo.customisation.logo:/img/OXO_logo_2017_colour_background.png")
@Value("${oxo.customisation.logo:/img/OXO_logo_2017_colour_background.png}")
private String logo;

@Value("${oxo.customisation.title:Ontology Xref Service}")
Expand Down
2 changes: 1 addition & 1 deletion oxo-web/src/main/resources/templates/fragments/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="columns medium-12" id="local-title">
<!--<h1><a href="../../" title="Back to Oxo homepage">Ontology Xref Service</a></h1>-->
<a href="../../" title="Back to Oxo homepage">
<img th:src="@{/img/OXO_logo_2017_colour_background.png}" style="height:100px;"/>
<img th:src="@{${logo}}" style="height:100px;"/>
</a>
</div>

Expand Down

0 comments on commit 19e1246

Please sign in to comment.