forked from lix-project/hydra
make logo configurable via HYDRA_LOGO env var
This commit is contained in:
parent
d4c96a47c9
commit
a8b3ebd514
|
@ -17,7 +17,7 @@ sub begin :Private {
|
|||
$c->stash->{version} = $ENV{"HYDRA_RELEASE"} || "<devel>";
|
||||
$c->stash->{nixVersion} = $ENV{"NIX_RELEASE"} || "<devel>";
|
||||
$c->stash->{curTime} = time;
|
||||
|
||||
$c->stash->{logo} = $ENV{"HYDRA_LOGO"} ? "/logo" : "/static/images/hydra.png" ;
|
||||
if (scalar(@args) == 0 || $args[0] ne "static") {
|
||||
$c->stash->{nrRunningBuilds} = $c->model('DB::BuildSchedulingInfo')->search({ busy => 1 }, {})->count();
|
||||
$c->stash->{nrQueuedBuilds} = $c->model('DB::BuildSchedulingInfo')->count();
|
||||
|
@ -224,4 +224,11 @@ sub change_password_submit : Path('change-password/submit') : Args(0) {
|
|||
$c->res->redirect("/");
|
||||
}
|
||||
|
||||
sub logo :Local {
|
||||
my ($self, $c) = @_;
|
||||
my $path = $ENV{"HYDRA_LOGO"} or die("Logo not set!");
|
||||
$c->serve_static_file($path);
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<div id="page">
|
||||
|
||||
<div id="header">
|
||||
<div id="logo"><a class="no-hover" href="/"><img src="/static/images/hydra.png" alt="Hydra Logo" /></a></div>
|
||||
<div id="logo"><a class="no-hover" href="/"><img src="[% logo %]" alt="Hydra Logo" /></a></div>
|
||||
[% PROCESS topbar.tt %]
|
||||
[% PROCESS contextbar.tt %]
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue