Skip to content

Commit

Permalink
remove inline css properties from header.tpl (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur authored and davidcoutadeur committed Aug 2, 2024
1 parent f772b3d commit 7eff7c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 9 additions & 0 deletions htdocs/js/self-service-password.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
$(document).ready(function(){

// set background image
background_url = $("#background_url").data('backgroundurl');
if (typeof background_url !== 'undefined' && background_url != "")
{
$("html, body").css("background", "url(" + background_url + ")");
$("html, body").css("background-size", "cover");
}

// Menu links popovers
$('[data-toggle="menu-popover"]').popover({
trigger: 'hover',
Expand Down
11 changes: 3 additions & 8 deletions templates/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@
{/if}
<link href="images/favicon.ico" rel="icon" type="image/x-icon" />
<link href="images/favicon.ico" rel="shortcut icon" />
{if $background_image}
<style>
html, body {
background: url({$background_image}) no-repeat center fixed;
background-size: cover;
}
</style>
{/if}
{if $captcha_css}
<style>{$captcha_css nofilter}</style>
{/if}
</head>
<body>
{if $background_image}
<div id="background_url" data-backgroundurl='{$background_image}'></div>
{/if}
<div class="container">

0 comments on commit 7eff7c2

Please sign in to comment.